Skip to content

Commit 77437c9

Browse files
authored
Merge pull request #118 from D19ital/main
Add device-specific firmware instructions
2 parents d24e938 + 9ae384b commit 77437c9

5 files changed

Lines changed: 230 additions & 18 deletions

File tree

assets/css/custom.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,37 @@ html.dark .firmware-picker .firmware-picker__group {
322322
outline-offset: 2px;
323323
}
324324

325+
.firmware-picker__instruction {
326+
margin-top: 1.25rem;
327+
padding-top: 1rem;
328+
border-top: 1px solid rgb(229 231 235);
329+
}
330+
331+
html.dark .firmware-picker__instruction {
332+
border-color: rgb(64 64 64);
333+
}
334+
335+
.firmware-picker .firmware-picker__instruction-title {
336+
margin: 0;
337+
font-weight: 650;
338+
line-height: 1.4;
339+
}
340+
341+
.firmware-picker .firmware-picker__instruction-steps {
342+
margin: 0.75rem 0 0;
343+
padding-left: 1.25rem;
344+
}
345+
346+
.firmware-picker .firmware-picker__instruction-steps li {
347+
margin: 0.375rem 0;
348+
line-height: 1.55;
349+
}
350+
351+
.firmware-picker .firmware-picker__instruction-link {
352+
margin: 0.875rem 0 0;
353+
font-size: 0.875rem;
354+
}
355+
325356
@media (max-width: 640px) {
326357
.firmware-picker__field,
327358
.firmware-picker__result {

content/firmware.en.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22
title: Firmware
33
---
44

5-
Select the exact device model and revision. The available firmware files will appear after selection
5+
Select the device model. The available firmware files will appear after selection
66

77
{{< firmware-picker >}}
88

9-
{{< callout type="warning" >}}
10-
Files for the left and right halves are not interchangeable. If several buttons are shown, download all files required for your device
11-
{{< /callout >}}
12-
13-
{{< callout type="info" >}}
14-
See the documentation for your device for firmware update instructions
15-
{{< /callout >}}
16-
179
{{< cards >}}
1810
{{< card link="https://github.com/ergohaven" title="Source code" icon="github" >}}
1911
{{< /cards >}}

content/firmware.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22
title: Прошивки
33
---
44

5-
Выберите точную модель и ревизию устройства. После выбора появятся доступные файлы прошивки
5+
Выберите модель устройства. После выбора появятся доступные файлы прошивки
66

77
{{< firmware-picker >}}
88

9-
{{< callout type="warning" >}}
10-
Файлы для левой и правой половин не взаимозаменяемы. Если показано несколько кнопок, скачайте все файлы, необходимые для вашего устройства
11-
{{< /callout >}}
12-
13-
{{< callout type="info" >}}
14-
Инструкцию по обновлению прошивки смотрите в документации к вашему устройству
15-
{{< /callout >}}
16-
179
{{< cards >}}
1810
{{< card link="https://github.com/ergohaven" title="Исходный код" icon="github" >}}
1911
{{< /cards >}}

data/firmware_instructions.yaml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
rmk_split:
2+
ru:
3+
title: Как обновить прошивку
4+
steps:
5+
- "Скачайте файлы прошивки для левой и правой половинок и служебную прошивку «RMK — сброс всех настроек»"
6+
- "Подключите левую половинку по USB-C, дважды быстро нажмите <code>Reset</code> и скопируйте на открывшийся диск файл сброса RMK"
7+
- "Повторите сброс для правой половинки"
8+
- "Снова переведите каждую половинку в режим загрузчика и скопируйте соответствующий файл: <code>left</code> для левой, <code>right</code> для правой"
9+
en:
10+
title: How to update the firmware
11+
steps:
12+
- "Download the firmware files for the left and right halves and the “RMK — reset all settings” service firmware"
13+
- "Connect the left half via USB-C, quickly double-press <code>Reset</code>, and copy the RMK reset file to the drive that opens"
14+
- "Repeat the reset for the right half"
15+
- "Put each half into bootloader mode again and copy the matching file: <code>left</code> for the left half and <code>right</code> for the right half"
16+
17+
rmk_single:
18+
ru:
19+
title: Как обновить прошивку
20+
steps:
21+
- "Скачайте прошивку устройства и служебную прошивку «RMK — сброс всех настроек»"
22+
- "Подключите устройство по USB-C, дважды быстро нажмите <code>Reset</code> и скопируйте на открывшийся диск файл сброса RMK"
23+
- "После перезагрузки снова дважды нажмите <code>Reset</code> и скопируйте файл прошивки устройства"
24+
en:
25+
title: How to update the firmware
26+
steps:
27+
- "Download the device firmware and the “RMK — reset all settings” service firmware"
28+
- "Connect the device via USB-C, quickly double-press <code>Reset</code>, and copy the RMK reset file to the drive that opens"
29+
- "After the device restarts, double-press <code>Reset</code> again and copy the device firmware file"
30+
31+
qmk:
32+
ru:
33+
title: Как обновить прошивку
34+
steps:
35+
- "При необходимости сохраните текущую раскладку в Vial или Entropy"
36+
- "Подключите устройство по USB-C и дважды быстро нажмите <code>Reset</code> на нижней части корпуса"
37+
- "Скопируйте скачанный UF2-файл на открывшийся диск — после копирования устройство перезагрузится"
38+
- "Если клавиатура состоит из двух половинок, повторите эти действия для второй половинки"
39+
- "После обновления импортируйте сохранённую раскладку"
40+
en:
41+
title: How to update the firmware
42+
steps:
43+
- "Save the current layout in Vial or Entropy if needed"
44+
- "Connect the device via USB-C and quickly double-press <code>Reset</code> on the bottom of the case"
45+
- "Copy the downloaded UF2 file to the drive that opens — the device will restart after copying"
46+
- "If the keyboard has two halves, repeat these steps for the other half"
47+
- "Import the saved layout after the update"
48+
49+
zmk_split:
50+
ru:
51+
title: Как обновить прошивку
52+
steps:
53+
- "Скачайте все показанные файлы для левой и правой половинок"
54+
- "Подключите левую половинку по USB-C, дважды быстро нажмите <code>Reset</code> и скопируйте на открывшийся диск файл <code>left</code>"
55+
- "Повторите действия для правой половинки, используя файл <code>right</code>"
56+
- "После обновления одновременно нажмите <code>Reset</code> на обеих половинках, чтобы восстановить их соединение"
57+
en:
58+
title: How to update the firmware
59+
steps:
60+
- "Download all displayed files for the left and right halves"
61+
- "Connect the left half via USB-C, quickly double-press <code>Reset</code>, and copy the <code>left</code> file to the drive that opens"
62+
- "Repeat these steps for the right half using the <code>right</code> file"
63+
- "After the update, press <code>Reset</code> on both halves simultaneously to reconnect them"
64+
65+
zmk_qube:
66+
ru:
67+
title: Как обновить прошивку
68+
steps:
69+
- "Скачайте все показанные файлы и служебную прошивку «ZMK — сброс всех настроек»"
70+
- "Для чистой установки по очереди подключите Qube, левую и правую половинки, дважды нажмите <code>Reset</code> на каждом устройстве и скопируйте файл сброса ZMK"
71+
- "Снова переведите устройства в режим загрузчика и установите основные прошивки в порядке: Qube, левая половинка, правая половинка"
72+
- "Используйте только соответствующие файлы <code>qube</code>, <code>left_qube</code> и <code>right</code>"
73+
en:
74+
title: How to update the firmware
75+
steps:
76+
- "Download all displayed files and the “ZMK — reset all settings” service firmware"
77+
- "For a clean installation, connect Qube, the left half, and the right half one at a time, double-press <code>Reset</code> on each device, and copy the ZMK reset file"
78+
- "Put the devices into bootloader mode again and install the main firmware in this order: Qube, left half, right half"
79+
- "Use only the matching <code>qube</code>, <code>left_qube</code>, and <code>right</code> files"
80+
81+
zmk_single:
82+
ru:
83+
title: Как обновить прошивку
84+
steps:
85+
- "Подключите устройство по USB-C и дважды быстро нажмите <code>Reset</code> на нижней части корпуса"
86+
- "Скопируйте скачанный UF2-файл на открывшийся диск — после копирования устройство перезагрузится"
87+
- "Для возврата к заводским настройкам сначала установите служебную прошивку «ZMK — сброс всех настроек», затем повторно установите основную прошивку"
88+
en:
89+
title: How to update the firmware
90+
steps:
91+
- "Connect the device via USB-C and quickly double-press <code>Reset</code> on the bottom of the case"
92+
- "Copy the downloaded UF2 file to the drive that opens — the device will restart after copying"
93+
- "To restore factory settings, install the “ZMK — reset all settings” service firmware first, then install the main firmware again"
94+
95+
zmk_single_reset:
96+
ru:
97+
title: Как обновить прошивку
98+
steps:
99+
- "Скачайте прошивку устройства и служебную прошивку «ZMK — сброс всех настроек»"
100+
- "Подключите устройство по USB-C, дважды быстро нажмите <code>Reset</code> и скопируйте на открывшийся диск файл сброса ZMK"
101+
- "После перезагрузки снова дважды нажмите <code>Reset</code> и скопируйте файл прошивки устройства"
102+
en:
103+
title: How to update the firmware
104+
steps:
105+
- "Download the device firmware and the “ZMK — reset all settings” service firmware"
106+
- "Connect the device via USB-C, quickly double-press <code>Reset</code>, and copy the ZMK reset file to the drive that opens"
107+
- "After the device restarts, double-press <code>Reset</code> again and copy the device firmware file"
108+
109+
service_rmk:
110+
ru:
111+
title: Как использовать прошивку сброса
112+
steps:
113+
- "Подключите устройство или половинку клавиатуры по USB-C и дважды быстро нажмите <code>Reset</code>"
114+
- "Скопируйте файл сброса RMK на открывшийся диск"
115+
- "После перезагрузки установите обычную прошивку для вашей модели; для сплит-клавиатуры повторите действия на обеих половинках"
116+
en:
117+
title: How to use the reset firmware
118+
steps:
119+
- "Connect the device or keyboard half via USB-C and quickly double-press <code>Reset</code>"
120+
- "Copy the RMK reset file to the drive that opens"
121+
- "After the device restarts, install the regular firmware for your model; repeat the steps on both halves of a split keyboard"
122+
123+
service_zmk:
124+
ru:
125+
title: Как использовать прошивку сброса
126+
steps:
127+
- "Подключите устройство или половинку клавиатуры по USB-C и дважды быстро нажмите <code>Reset</code>"
128+
- "Скопируйте файл сброса ZMK на открывшийся диск"
129+
- "После перезагрузки установите обычную прошивку для вашей модели; для сплит-клавиатуры повторите действия на обеих половинках"
130+
en:
131+
title: How to use the reset firmware
132+
steps:
133+
- "Connect the device or keyboard half via USB-C and quickly double-press <code>Reset</code>"
134+
- "Copy the ZMK reset file to the drive that opens"
135+
- "After the device restarts, install the regular firmware for your model; repeat the steps on both halves of a split keyboard"

layouts/shortcodes/firmware-picker.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,53 @@
6767
{{- if and (eq $lang "en") .name_en -}}
6868
{{- $deviceName = .name_en -}}
6969
{{- end }}
70+
{{- $deviceID := .id -}}
71+
{{- $instructionKey := "qmk" -}}
72+
{{- if strings.HasPrefix $deviceID "rmk-trackball" -}}
73+
{{- $instructionKey = "rmk_single" -}}
74+
{{- else if strings.HasPrefix $deviceID "rmk-" -}}
75+
{{- $instructionKey = "rmk_split" -}}
76+
{{- else if strings.HasSuffix $deviceID "-qube" -}}
77+
{{- $instructionKey = "zmk_qube" -}}
78+
{{- else if eq $deviceID "zmk-trackball-royale" -}}
79+
{{- $instructionKey = "zmk_single_reset" -}}
80+
{{- else if strings.HasPrefix $deviceID "zmk-trackball" -}}
81+
{{- $instructionKey = "zmk_single" -}}
82+
{{- else if strings.HasPrefix $deviceID "zmk-" -}}
83+
{{- $instructionKey = "zmk_split" -}}
84+
{{- else if eq $deviceID "service-rmk-reset" -}}
85+
{{- $instructionKey = "service_rmk" -}}
86+
{{- else if eq $deviceID "service-zmk-reset" -}}
87+
{{- $instructionKey = "service_zmk" -}}
88+
{{- end -}}
89+
{{- $instruction := index site.Data.firmware_instructions $instructionKey -}}
90+
{{- $docsPath := "" -}}
91+
{{- $langPrefix := cond (eq $lang "en") "/en" "" -}}
92+
{{- if strings.HasPrefix $deviceID "rmk-k04" -}}
93+
{{- $docsPath = printf "%s/device/k04/" $langPrefix -}}
94+
{{- else if strings.HasPrefix $deviceID "qmk-phenom" -}}
95+
{{- $docsPath = printf "%s/device/phenom/" $langPrefix -}}
96+
{{- else if strings.HasPrefix $deviceID "qmk-macropad" -}}
97+
{{- $docsPath = printf "%s/device/macropad/" $langPrefix -}}
98+
{{- else if eq $deviceID "qmk-sm30" -}}
99+
{{- $docsPath = printf "%s/device/sm30/" $langPrefix -}}
100+
{{- else if strings.HasPrefix $deviceID "qmk-k03" -}}
101+
{{- $docsPath = printf "%s/device/archive/k03/" $langPrefix -}}
102+
{{- else if strings.HasPrefix $deviceID "qmk-imperial44" -}}
103+
{{- $docsPath = printf "%s/device/archive/imperial44/" $langPrefix -}}
104+
{{- else if strings.HasPrefix $deviceID "qmk-hpd" -}}
105+
{{- $docsPath = printf "%s/device/archive/hpd/" $langPrefix -}}
106+
{{- else if strings.HasPrefix $deviceID "qmk-velvet" -}}
107+
{{- $docsPath = printf "%s/device/archive/velvet/" $langPrefix -}}
108+
{{- else if strings.HasSuffix $deviceID "-qube" -}}
109+
{{- $docsPath = printf "%s/device/archive/qube/" $langPrefix -}}
110+
{{- else if strings.HasPrefix $deviceID "zmk-trackball-mini" -}}
111+
{{- $docsPath = printf "%s/device/tb-mini/" $langPrefix -}}
112+
{{- else if eq $deviceID "zmk-trackball-royale" -}}
113+
{{- $docsPath = printf "%s/device/tb-royale/" $langPrefix -}}
114+
{{- else if strings.HasPrefix $deviceID "zmk-" -}}
115+
{{- $docsPath = printf "%s/zmk/zmk-keyboards/" $langPrefix -}}
116+
{{- end }}
70117
<section class="firmware-picker__device" data-firmware-device="{{ .id }}" hidden>
71118
<p class="firmware-picker__group">{{ $groupName }}</p>
72119
<p class="firmware-picker__device-name">{{ $deviceName }}</p>
@@ -82,6 +129,21 @@
82129
</a>
83130
{{- end }}
84131
</div>
132+
{{- with index $instruction $lang }}
133+
<div class="firmware-picker__instruction">
134+
<p class="firmware-picker__instruction-title">{{ .title }} — {{ $deviceName }}</p>
135+
<ol class="firmware-picker__instruction-steps">
136+
{{- range .steps }}
137+
<li>{{ . | safeHTML }}</li>
138+
{{- end }}
139+
</ol>
140+
{{- with $docsPath }}
141+
<p class="firmware-picker__instruction-link">
142+
<a href="{{ . | relURL }}">{{ cond (eq $lang "en") "Full instructions in the device documentation" "Полная инструкция в документации устройства" }}</a>
143+
</p>
144+
{{- end }}
145+
</div>
146+
{{- end }}
85147
</section>
86148
{{- end }}
87149
{{- end }}

0 commit comments

Comments
 (0)