Page refactor

This commit is contained in:
Marc Riera 2022-09-05 22:11:37 +02:00 committed by GitHub
parent a9470ab54c
commit 807790af8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 2074 additions and 491 deletions

View file

@ -0,0 +1,58 @@
<style type="text/css">
<!-- General -->
#body .flex-block-wrapper {
max-width: 100%;
min-width: 100%;
}
.flex-block-wrapper table {
overflow-x: auto;
width: 100%;
}
<!-- Detail pages -->
.datatable {
table-layout: fixed;
width: 100%;
}
.datatable .col-pic {
width: 20%;
}
.datatable .col-headers {
width: 20%;
}
.datatable .col-data {
width: 60%;
}
.datatable img {
max-height: 180px;
}
.compattable {
table-layout: fixed;
width: 100%;
}
.compattable .col-model {
width: 40%;
}
.compattable .col-support {
width: 10%;
}
.compattable .col-notes {
width: 50%;
}
table #native {
background-color: rgba(189,233,186,.35);
}
table #partial {
background-color: rgba(255,215,140,.35);
}
</style>

View file

@ -0,0 +1,57 @@
## Overview
<table class="datatable">
<colgroup>
<col class="col-pic">
<col class="col-headers">
<col class="col-data">
</colgroup>
<tr>
<td rowspan="0" id="image">{{ if (index .Site.Data.controllers (.Get 0)).image}}<img src="/images/controllers/{{ (index .Site.Data.controllers (.Get 0)).image }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).name }}</td>
</tr>
<tr>
<td><strong>Release date</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).date | time.Format ":date_long" }}</td>
</tr>
<tr>
<td><strong>Serial code</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).code }}</td>
</tr>
<tr>
<td><strong>Notes</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).notes }}</td>
</tr>
</table>
## Supported software (WIP)
<table class="compattable">
<colgroup>
<col class="col-model">
<col class="col-support">
<col class="col-notes">
</colgroup>
<tr>
<th>Software</th>
<th>Support</th>
<th>Notes</th>
</tr>
{{ range sort .Site.Data.software "name" }}
{{ $software_name := .name }}
{{ $software_ref := .ref }}
{{ $software_platform := .platform }}
{{ range .controllers }}
{{ if eq .model ($.Get 0) }}
<tr>
<td><a href="{{ $software_ref }}">{{ $software_name }} ({{ index $.Site.Data.platforms $software_platform }})</a></td>
<td id="{{ if or .unofficial .partial }}partial{{ else }}native{{ end }}">{{ if .unofficial }}Unofficial{{ else if .partial }}Partial{{ else }}Native{{ end }}</td>
<td>{{ .notes }} {{ if .adapter }}<a href="{{ index $.Site.Data.adapters .adapter "ref" }}">{{ index $.Site.Data.adapters .adapter "notes" }}</a>{{ end }}</td>
</tr>
{{ end }}
{{ end }}
{{ end }}
</table>
## Technical details

View file

@ -0,0 +1 @@
Select a software from the menu on the left to view its details and controller compatibility.

View file

@ -0,0 +1,64 @@
## Overview
<table class="datatable">
<colgroup>
<col class="col-pic">
<col class="col-headers">
<col class="col-data">
</colgroup>
<tr>
<td rowspan="0" id="image">{{ if (index .Site.Data.software (.Get 0)).image}}<img src="/images/software/{{ (index .Site.Data.software (.Get 0)).image }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).name }}</td>
</tr>
{{ if (index .Site.Data.software (.Get 0)).namejp }}
<tr>
<td><strong>Japanese name</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).namejp }}</td>
</tr>
{{ end }}
<tr>
<td><strong>Release date</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).date | time.Format ":date_long" }}</td>
</tr>
{{ if (index .Site.Data.software (.Get 0)).code }}
<tr>
<td><strong>Serial code</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).code }}</td>
</tr>
{{ end }}
{{ if (index .Site.Data.software (.Get 0)).url }}
<tr>
<td><strong>Website</strong></td>
<td><a href="{{ (index .Site.Data.software (.Get 0)).url }}" target="_blank">{{ (index .Site.Data.software (.Get 0)).url }}</a></td>
</tr>
{{ end }}
<tr>
<td><strong>Notes</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).notes }}</td>
</tr>
</table>
{{ with (index .Site.Data.software (.Get 0)).controllers }}
## Supported controllers
<table class="compattable">
<colgroup>
<col class="col-model">
<col class="col-support">
<col class="col-notes">
</colgroup>
<tr>
<th>Model</th>
<th>Support</th>
<th>Notes</th>
</tr>
{{ range . }}
<tr>
<td><a href="{{ (index $.Site.Data.controllers .model).ref }}">{{ (index $.Site.Data.controllers .model).name }}</a></td>
<td id="{{ if or .unofficial .partial }}partial{{ else }}native{{ end }}">{{ if .unofficial }}Unofficial{{ else if .partial }}Partial{{ else }}Native{{ end }}</td>
<td>{{ .notes }} {{ if .adapter }}<a href="{{ index $.Site.Data.adapters .adapter "ref" }}">{{ index $.Site.Data.adapters .adapter "notes" }}</a>{{ end }}</td>
</tr>
{{ end }}
</table>
{{ end }}

View file

@ -0,0 +1,28 @@
## Overview
<table class="datatable">
<colgroup>
<col class="col-pic">
<col class="col-headers">
<col class="col-data">
</colgroup>
<tr>
<td rowspan="0" id="image">{{ if (index .Site.Data.controllers (.Get 0)).image}}<img src="/images/controllers/{{ (index .Site.Data.controllers (.Get 0)).image }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).name }}</td>
</tr>
<tr>
<td><strong>Release date</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).date | time.Format ":date_long" }}</td>
</tr>
<tr>
<td><strong>Serial code</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).code }}</td>
</tr>
<tr>
<td><strong>Notes</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).notes }}</td>
</tr>
</table>
## Technical details