summaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-04-17-week6-404-repository-implementation.md
blob: 23b7d1d017f0560a78338efa40884c2b085d45a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
# 404 & Repository Pages Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** Create a user-friendly 404 error page with hacker theme integration, search, recent articles, and easter egg; build a Slackware repository guide page with hero section, installation/usage instructions, and GitHub repo cards—both fully accessible and responsive.

**Architecture:** 404 page uses Hugo's special `layouts/404.html` template to render when non-existent URLs are hit. It dynamically fetches recent articles, integrates Alpine.js for search and easter egg modal, and inherits styling/animations from Weeks 1-5. Repository page is a standard Hugo content page (`content/en/repository/_index.md` and `content/it/repository/_index.md`) with markdown-driven content (Installation, Usage, Available Packages sections) and dynamically rendered GitHub repo cards from `data/repos.yaml`. Both pages integrate existing components (buttons, cards, forms, animations) with no new component creation.

**Tech Stack:** Hugo, Tailwind CSS, Alpine.js, markdown content files, YAML data files, existing form/button/card components from Weeks 1-5.

---

## File Structure & Responsibilities

### 404 Error Page
- **`layouts/404.html`** — Hugo's special 404 template; renders error layout, fetches recent articles, includes search box and easter egg modal HTML/Alpine directives
- **`i18n/en.yaml`** — English i18n strings for 404 (page title, error message, button labels, search placeholder)
- **`i18n/it.yaml`** — Italian i18n strings for 404

### Repository Page
- **`content/en/repository/_index.md`** — English repository page content in markdown (title, intro, Installation, Usage, Available Packages sections, quick-start command)
- **`content/it/repository/_index.md`** — Italian repository page content in markdown (same structure, Italian text)
- **`data/repos.yaml`** — Structured data for GitHub repo cards (repo name, description i18n key, GitHub URL, image path, tags)
- **`themes/danix-xyz-hacker/layouts/repository/single.html`** (optional) — Custom layout to render repository page with repo cards loop (if default single.html doesn't fit)
- **`i18n/en.yaml`** — English i18n strings for Repository page (section headings, button labels, copy feedback)
- **`i18n/it.yaml`** — Italian i18n strings for Repository page

### Supporting Assets (if needed)
- **`static/images/repo-icons/`** — Directory for GitHub repo card images/icons (user provides images before implementation)
- **`themes/danix-xyz-hacker/assets/js/main.js`** (modify if needed) — Add search functionality for 404 page, copy-to-clipboard for repo code blocks

---

## Tasks

### Task 1: Set Up Feature Branch

**Files:**
- Git branch: `week-6-pages`

- [ ] **Step 1: Checkout master and pull latest**

```bash
git checkout master
git pull
```

Expected: On master, latest commits pulled.

- [ ] **Step 2: Create feature branch from master**

```bash
git checkout -b week-6-pages
```

Expected: On new branch `week-6-pages`, no uncommitted changes.

- [ ] **Step 3: Verify branch is clean**

```bash
git status
```

Expected: "On branch week-6-pages" and "nothing to commit, working tree clean".

- [ ] **Step 4: Start npm watch mode**

```bash
npm run watch
```

Expected: Tailwind/CSS watcher starts. Keep this running during development in a separate terminal.

---

### Task 2: Add i18n Strings for 404 Page (English)

**Files:**
- Modify: `i18n/en.yaml`

- [ ] **Step 1: Open i18n/en.yaml file**

```bash
cat i18n/en.yaml | head -20
```

Verify file structure and existing content.

- [ ] **Step 2: Add 404 i18n strings to en.yaml**

At the end of `i18n/en.yaml`, add:

```yaml
notFound:
  other: "Page Not Found"
notFoundHeading:
  other: "404"
notFoundMessage:
  other: "Sorry, the page you're looking for doesn't exist."
searchPlaceholder:
  other: "Search the site..."
searchButton:
  other: "Search"
recentArticles:
  other: "Recent Articles"
goHome:
  other: "Go Home"
browseArticles:
  other: "Browse Articles"
contactSupport:
  other: "Contact Me"
followWhiteRabbit:
  other: "Follow the white rabbit"
noSearchResults:
  other: "No results found"
bluePill:
  other: "Take the blue pill"
redPill:
  other: "Take the red pill"
easterEggTitle:
  other: "Choose Wisely"
```

- [ ] **Step 3: Verify YAML syntax**

```bash
hugo config
```

Expected: No YAML parsing errors (command should complete without errors).

- [ ] **Step 4: Commit changes**

```bash
git add i18n/en.yaml
git commit -m "feat: add 404 page i18n strings (English)"
```

---

### Task 3: Add i18n Strings for 404 Page (Italian)

**Files:**
- Modify: `i18n/it.yaml`

- [ ] **Step 1: Open i18n/it.yaml file**

```bash
cat i18n/it.yaml | head -20
```

Verify file structure.

- [ ] **Step 2: Add 404 i18n strings to it.yaml**

At the end of `i18n/it.yaml`, add:

```yaml
notFound:
  other: "Pagina Non Trovata"
notFoundHeading:
  other: "404"
notFoundMessage:
  other: "Scusa, la pagina che cerchi non esiste."
searchPlaceholder:
  other: "Cerca nel sito..."
searchButton:
  other: "Cerca"
recentArticles:
  other: "Articoli Recenti"
goHome:
  other: "Torna a Casa"
browseArticles:
  other: "Sfoglia Articoli"
contactSupport:
  other: "Contattami"
followWhiteRabbit:
  other: "Segui il coniglio bianco"
noSearchResults:
  other: "Nessun risultato trovato"
bluePill:
  other: "Prendi la pillola blu"
redPill:
  other: "Prendi la pillola rossa"
easterEggTitle:
  other: "Scegli con Saggezza"
```

- [ ] **Step 3: Verify YAML syntax**

```bash
hugo config
```

Expected: No YAML parsing errors.

- [ ] **Step 4: Commit changes**

```bash
git add i18n/it.yaml
git commit -m "feat: add 404 page i18n strings (Italian)"
```

---

### Task 4: Create 404 Error Page Layout

**Files:**
- Create: `themes/danix-xyz-hacker/layouts/404.html`

- [ ] **Step 1: Create 404.html file**

```bash
touch themes/danix-xyz-hacker/layouts/404.html
```

- [ ] **Step 2: Write 404 layout structure**

```html
{{ define "main" }}
<main class="min-h-screen flex items-center justify-center px-4">
  <div class="text-center max-w-2xl w-full">
    <!-- 404 Heading -->
    <h1 class="text-7xl md:text-8xl font-bold text-accent mb-4 animate-fade-in">
      {{ i18n "notFoundHeading" }}
    </h1>

    <!-- Error Message -->
    <h2 class="text-3xl md:text-4xl font-bold mb-6">
      {{ i18n "notFound" }}
    </h2>
    
    <p class="text-lg text-gray-600 dark:text-gray-400 mb-8 animate-fade-in-delay">
      {{ i18n "notFoundMessage" }}
    </p>

    <!-- Search Box -->
    <div class="mb-12">
      <form id="search-form" class="flex flex-col gap-4">
        <label for="search-input" class="sr-only">{{ i18n "searchPlaceholder" }}</label>
        <input
          id="search-input"
          type="text"
          placeholder="{{ i18n 'searchPlaceholder' }}"
          class="px-4 py-3 border-2 border-gray-300 dark:border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent"
          x-data
          x-on:input="$dispatch('search', { query: $el.value })"
        />
      </form>
      <div id="search-results" class="mt-4 text-left"></div>
    </div>

    <!-- Recent Articles Section -->
    <div class="mb-12">
      <h3 class="text-2xl font-bold mb-6">{{ i18n "recentArticles" }}</h3>
      <div class="space-y-4">
        {{ range first 5 (where .Site.RegularPages "Section" "articles") }}
        <div class="p-4 border-l-4 border-accent bg-gray-50 dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors">
          <a href="{{ .Permalink }}" class="block text-left">
            <h4 class="font-bold text-accent hover:underline">{{ .Title }}</h4>
            <p class="text-sm text-gray-600 dark:text-gray-400 mt-1">
              {{ .Date.Format "Jan 02, 2006" }}
            </p>
          </a>
        </div>
        {{ end }}
      </div>
    </div>

    <!-- Navigation Links -->
    <div class="space-y-4 flex flex-col items-center mb-12">
      <a href="{{ .Site.BaseURL }}" class="btn btn-primary">
        {{ i18n "goHome" }}
      </a>
      <a href="{{ .Site.BaseURL }}{{ .Site.Language.Lang }}/articles/" class="btn btn-secondary">
        {{ i18n "browseArticles" }}
      </a>
      <a href="{{ .Site.BaseURL }}{{ .Site.Language.Lang }}/contact/" class="btn btn-outline">
        {{ i18n "contactSupport" }}
      </a>
    </div>

    <!-- Easter Egg Trigger -->
    <div class="mt-12 pt-8 border-t border-gray-300 dark:border-gray-700">
      <button
        @click="$dispatch('toggle-easter-egg')"
        class="text-sm text-gray-500 dark:text-gray-400 hover:text-accent transition-colors underline"
      >
        {{ i18n "followWhiteRabbit" }}
      </button>
    </div>

    <!-- Easter Egg Modal (Hidden by default) -->
    <div
      x-data="{ showEasterEgg: false }"
      @toggle-easter-egg.window="showEasterEgg = !showEasterEgg"
      class="fixed inset-0 z-50 hidden"
      :class="{ 'flex items-center justify-center': showEasterEgg }"
      x-show="showEasterEgg"
      x-cloak
    >
      <!-- Overlay -->
      <div
        class="absolute inset-0 bg-black/50"
        @click="showEasterEgg = false"
      ></div>

      <!-- Modal Content -->
      <div class="relative bg-white dark:bg-gray-900 p-8 rounded-lg shadow-xl max-w-md mx-4 animate-scale-in">
        <h2 class="text-2xl font-bold mb-6">{{ i18n "easterEggTitle" }}</h2>
        
        <div class="space-y-4">
          <button
            @click="showEasterEgg = false; window.location.href = '{{ .Site.BaseURL }}'"
            class="w-full btn btn-primary"
          >
            💊 {{ i18n "bluePill" }}
          </button>
          
          <button
            @click="showEasterEgg = false; window.location.href = '{{ .Site.BaseURL }}{{ .Site.Language.Lang }}/articles/' + Math.floor(Math.random() * 50)"
            class="w-full btn btn-secondary"
          >
            🐰 {{ i18n "redPill" }}
          </button>
        </div>

        <button
          @click="showEasterEgg = false"
          class="absolute top-4 right-4 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
          aria-label="Close modal"
        ></button>
      </div>
    </div>
  </div>
</main>
{{ end }}
```

- [ ] **Step 3: Verify file created**

```bash
ls -la themes/danix-xyz-hacker/layouts/404.html
```

Expected: File exists with content.

- [ ] **Step 4: Test 404 page in Hugo**

```bash
hugo server
```

Navigate to: `http://localhost:1313/en/this-does-not-exist/`

Expected: 404 page displays with "404" heading, error message, search box, recent articles, navigation links.

- [ ] **Step 5: Test in Italian**

Navigate to: `http://localhost:1313/it/questa-pagina-non-esiste/`

Expected: 404 page displays in Italian.

- [ ] **Step 6: Commit changes**

```bash
git add themes/danix-xyz-hacker/layouts/404.html
git commit -m "feat: create 404 error page with search, recent articles, and easter egg"
```

---

### Task 5: Add i18n Strings for Repository Page (English)

**Files:**
- Modify: `i18n/en.yaml`

- [ ] **Step 1: Add Repository i18n strings to en.yaml**

At the end of `i18n/en.yaml`, add:

```yaml
repositoryTitle:
  other: "Slackware Repository"
repositorySubtitle:
  other: "Download and install my curated Slackware packages"
quickStartTitle:
  other: "Quick Start"
copyCommand:
  other: "Copy"
copiedMessage:
  other: "Copied to clipboard!"
installationTitle:
  other: "Installation"
usageTitle:
  other: "Usage"
availablePackagesTitle:
  other: "Available Packages"
githubReposTitle:
  other: "GitHub SlackBuild Repositories"
visitGithub:
  other: "Visit GitHub"
```

- [ ] **Step 2: Verify YAML syntax**

```bash
hugo config
```

Expected: No errors.

- [ ] **Step 3: Commit changes**

```bash
git add i18n/en.yaml
git commit -m "feat: add Repository page i18n strings (English)"
```

---

### Task 6: Add i18n Strings for Repository Page (Italian)

**Files:**
- Modify: `i18n/it.yaml`

- [ ] **Step 1: Add Repository i18n strings to it.yaml**

At the end of `i18n/it.yaml`, add:

```yaml
repositoryTitle:
  other: "Repository Slackware"
repositorySubtitle:
  other: "Scarica e installa i miei pacchetti Slackware curati"
quickStartTitle:
  other: "Inizio Rapido"
copyCommand:
  other: "Copia"
copiedMessage:
  other: "Copiato negli appunti!"
installationTitle:
  other: "Installazione"
usageTitle:
  other: "Utilizzo"
availablePackagesTitle:
  other: "Pacchetti Disponibili"
githubReposTitle:
  other: "Repository GitHub SlackBuild"
visitGithub:
  other: "Visita GitHub"
```

- [ ] **Step 2: Verify YAML syntax**

```bash
hugo config
```

Expected: No errors.

- [ ] **Step 3: Commit changes**

```bash
git add i18n/it.yaml
git commit -m "feat: add Repository page i18n strings (Italian)"
```

---

### Task 7: Create Repository Page Content (English)

**Files:**
- Create: `content/en/repository/_index.md`

- [ ] **Step 1: Create repository directory and file**

```bash
mkdir -p content/en/repository
touch content/en/repository/_index.md
```

- [ ] **Step 2: Write English repository page content**

```markdown
+++
title = "Slackware Repository"
date = 2026-04-17T00:00:00Z
draft = false
+++

## {{ i18n "quickStartTitle" }}

Add the repository to your Slackware system:

\`\`\`bash
# Add repository configuration (example command)
wget -O - https://danix.xyz/packages/slackware.asc | gpg --import
echo "deb https://danix.xyz/packages/slackware/ stable main" >> /etc/apt/sources.list.d/danix.list
apt-get update
\`\`\`

## {{ i18n "installationTitle" }}

### Prerequisites

- Slackware 15.0 or later
- Root or sudo access
- wget or curl

### Steps

1. Download and import the repository GPG key
2. Add the repository to your package manager configuration
3. Update your package lists
4. Install packages as needed

### Repository URL

```
https://danix.xyz/packages/slackware/
```

## {{ i18n "usageTitle" }}

### Installing a Package

\`\`\`bash
apt-get install package-name
\`\`\`

### Updating Packages

\`\`\`bash
apt-get update
apt-get upgrade
\`\`\`

### Searching for Packages

\`\`\`bash
apt-cache search keyword
\`\`\`

## {{ i18n "availablePackagesTitle" }}

Check the repository for the latest available packages. See the GitHub SlackBuild repositories below for build information and source files.
```

- [ ] **Step 3: Verify file created**

```bash
cat content/en/repository/_index.md
```

Expected: Content displays correctly.

- [ ] **Step 4: Test in Hugo**

```bash
hugo server
```

Navigate to: `http://localhost:1313/en/repository/`

Expected: Repository page displays with all sections (Quick Start, Installation, Usage, Available Packages).

- [ ] **Step 5: Commit changes**

```bash
git add content/en/repository/_index.md
git commit -m "feat: create English repository page content"
```

---

### Task 8: Create Repository Page Content (Italian)

**Files:**
- Create: `content/it/repository/_index.md`

- [ ] **Step 1: Create Italian repository file**

```bash
mkdir -p content/it/repository
touch content/it/repository/_index.md
```

- [ ] **Step 2: Write Italian repository page content**

```markdown
+++
title = "Repository Slackware"
date = 2026-04-17T00:00:00Z
draft = false
+++

## {{ i18n "quickStartTitle" }}

Aggiungi il repository al tuo sistema Slackware:

\`\`\`bash
# Aggiungi configurazione repository (comando di esempio)
wget -O - https://danix.xyz/packages/slackware.asc | gpg --import
echo "deb https://danix.xyz/packages/slackware/ stable main" >> /etc/apt/sources.list.d/danix.list
apt-get update
\`\`\`

## {{ i18n "installationTitle" }}

### Prerequisiti

- Slackware 15.0 o successivi
- Accesso root o sudo
- wget o curl

### Passaggi

1. Scarica e importa la chiave GPG del repository
2. Aggiungi il repository alla configurazione del gestore di pacchetti
3. Aggiorna gli elenchi dei pacchetti
4. Installa i pacchetti come necessario

### URL Repository

```
https://danix.xyz/packages/slackware/
```

## {{ i18n "usageTitle" }}

### Installazione di un Pacchetto

\`\`\`bash
apt-get install nome-pacchetto
\`\`\`

### Aggiornamento dei Pacchetti

\`\`\`bash
apt-get update
apt-get upgrade
\`\`\`

### Ricerca di Pacchetti

\`\`\`bash
apt-cache search parola-chiave
\`\`\`

## {{ i18n "availablePackagesTitle" }}

Controlla il repository per i pacchetti disponibili più recenti. Consulta i repository GitHub SlackBuild di seguito per informazioni sulla compilazione e file di origine.
```

- [ ] **Step 3: Verify file created**

```bash
cat content/it/repository/_index.md
```

Expected: Content displays correctly.

- [ ] **Step 4: Test in Hugo**

Navigate to: `http://localhost:1313/it/repository/`

Expected: Repository page displays in Italian.

- [ ] **Step 5: Commit changes**

```bash
git add content/it/repository/_index.md
git commit -m "feat: create Italian repository page content"
```

---

### Task 9: Create Repository Data File (GitHub Repos)

**Files:**
- Create: `data/repos.yaml`

- [ ] **Step 1: Create data directory and file**

```bash
mkdir -p data
touch data/repos.yaml
```

- [ ] **Step 2: Write repos data structure**

```yaml
repos:
  - name: "slackbuild-example-1"
    description_key: "repo_example_1_desc"
    github_url: "https://github.com/danix/slackbuild-example-1"
    image: "images/repo-icons/example-1.png"
    tags:
      - "Slackware"
      - "Build System"

  - name: "slackbuild-example-2"
    description_key: "repo_example_2_desc"
    github_url: "https://github.com/danix/slackbuild-example-2"
    image: "images/repo-icons/example-2.png"
    tags:
      - "Slackware"
      - "Package"

  - name: "slackbuild-example-3"
    description_key: "repo_example_3_desc"
    github_url: "https://github.com/danix/slackbuild-example-3"
    image: "images/repo-icons/example-3.png"
    tags:
      - "Slackware"
      - "Utilities"
```

- [ ] **Step 3: Verify YAML syntax**

```bash
hugo config
```

Expected: No errors.

- [ ] **Step 4: Commit changes**

```bash
git add data/repos.yaml
git commit -m "feat: add repository data file with GitHub repos list"
```

---

### Task 10: Add Repository Descriptions to i18n (English)

**Files:**
- Modify: `i18n/en.yaml`

- [ ] **Step 1: Add repo description i18n keys to en.yaml**

At the end of `i18n/en.yaml`, add:

```yaml
repo_example_1_desc:
  other: "SlackBuild scripts for Example Package 1. Build system and tools for Slackware package management."
repo_example_2_desc:
  other: "SlackBuild scripts for Example Package 2. A comprehensive package with full documentation and support."
repo_example_3_desc:
  other: "SlackBuild scripts for Example Package 3. Utility package for system administration and configuration."
```

- [ ] **Step 2: Verify YAML syntax**

```bash
hugo config
```

Expected: No errors.

- [ ] **Step 3: Commit changes**

```bash
git add i18n/en.yaml
git commit -m "feat: add repository descriptions to English i18n"
```

---

### Task 11: Add Repository Descriptions to i18n (Italian)

**Files:**
- Modify: `i18n/it.yaml`

- [ ] **Step 1: Add repo description i18n keys to it.yaml**

At the end of `i18n/it.yaml`, add:

```yaml
repo_example_1_desc:
  other: "Script SlackBuild per Pacchetto Esempio 1. Sistema di compilazione e strumenti per la gestione dei pacchetti Slackware."
repo_example_2_desc:
  other: "Script SlackBuild per Pacchetto Esempio 2. Un pacchetto completo con documentazione e supporto completi."
repo_example_3_desc:
  other: "Script SlackBuild per Pacchetto Esempio 3. Pacchetto di utilità per amministrazione di sistema e configurazione."
```

- [ ] **Step 2: Verify YAML syntax**

```bash
hugo config
```

Expected: No errors.

- [ ] **Step 3: Commit changes**

```bash
git add i18n/it.yaml
git commit -m "feat: add repository descriptions to Italian i18n"
```

---

### Task 12: Create Custom Repository Layout (if needed)

**Files:**
- Create: `themes/danix-xyz-hacker/layouts/repository/single.html` (optional)

- [ ] **Step 1: Check if custom layout is needed**

Test current rendering by navigating to repository page in Hugo server:

```bash
hugo server
```

Visit: `http://localhost:1313/en/repository/`

Check if page renders with correct structure and repo cards display properly.

- [ ] **Step 2: If default layout is insufficient, create custom layout**

```bash
mkdir -p themes/danix-xyz-hacker/layouts/repository
touch themes/danix-xyz-hacker/layouts/repository/single.html
```

- [ ] **Step 3: Write custom repository layout (if needed)**

```html
{{ define "main" }}
<main class="min-h-screen px-4 py-12">
  <article class="max-w-4xl mx-auto">
    <!-- Page Title (Hero) -->
    <div class="mb-12">
      <h1 class="text-5xl md:text-6xl font-bold mb-4 text-accent animate-fade-in">
        {{ i18n "repositoryTitle" }}
      </h1>
      <p class="text-xl text-gray-600 dark:text-gray-400 animate-fade-in-delay">
        {{ i18n "repositorySubtitle" }}
      </p>
    </div>

    <!-- Page Content (markdown sections) -->
    <div class="prose dark:prose-invert max-w-none mb-12">
      {{ .Content }}
    </div>

    <!-- Repository Cards Section -->
    <section class="mt-16">
      <h2 class="text-3xl font-bold mb-8">{{ i18n "githubReposTitle" }}</h2>
      
      <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
        {{ range $.Site.Data.repos.repos }}
        <div class="border border-gray-300 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow">
          <!-- Card Image -->
          <img 
            src="{{ .image }}" 
            alt="{{ .name }}" 
            class="w-full h-48 object-cover"
            loading="lazy"
          />
          
          <!-- Card Content -->
          <div class="p-6">
            <h3 class="text-xl font-bold mb-2">{{ .name }}</h3>
            
            <p class="text-gray-600 dark:text-gray-400 mb-4">
              {{ i18n .description_key }}
            </p>
            
            <!-- Tags -->
            {{ if .tags }}
            <div class="flex flex-wrap gap-2 mb-4">
              {{ range .tags }}
              <span class="text-xs px-2 py-1 bg-gray-200 dark:bg-gray-800 rounded">
                {{ . }}
              </span>
              {{ end }}
            </div>
            {{ end }}
            
            <!-- GitHub Link -->
            <a 
              href="{{ .github_url }}" 
              target="_blank" 
              rel="noopener noreferrer"
              class="btn btn-primary w-full text-center"
            >
              {{ i18n "visitGithub" }} →
            </a>
          </div>
        </div>
        {{ end }}
      </div>
    </section>
  </article>
</main>
{{ end }}
```

- [ ] **Step 4: If created, verify file**

```bash
ls -la themes/danix-xyz-hacker/layouts/repository/single.html
```

Expected: File exists.

- [ ] **Step 5: Test repository page**

```bash
hugo server
```

Navigate to: `http://localhost:1313/en/repository/`

Expected: Page displays with hero section, markdown content, and repo cards in grid layout.

- [ ] **Step 6: If custom layout created, commit**

```bash
git add themes/danix-xyz-hacker/layouts/repository/single.html
git commit -m "feat: add custom repository page layout with repo cards grid"
```

---

### Task 13: Test 404 Page Functionality

**Files:**
- Reference: `layouts/404.html`

- [ ] **Step 1: Test 404 page keyboard navigation**

```bash
hugo server
```

Navigate to: `http://localhost:1313/en/this-does-not-exist/`

Press Tab repeatedly:
- Focus should move to search input
- Focus should move to recent articles
- Focus should move to navigation buttons
- Focus should move to "Follow the white rabbit" link

Expected: All elements keyboard-accessible, logical tab order.

- [ ] **Step 2: Test 404 easter egg trigger**

On 404 page, click "Follow the white rabbit" link.

Expected: Modal appears with "Choose Wisely" title, blue pill and red pill buttons, and close button (×).

- [ ] **Step 3: Test easter egg buttons**

- Click "Take the blue pill" → should navigate to home page
- Close modal (click ×) → modal should disappear
- Click "Follow the white rabbit" again → modal should reappear
- Click "Take the red pill" → should navigate to random article (or articles page)

Expected: All buttons work, modal focus trap works, Escape key closes modal (if implemented).

- [ ] **Step 4: Test 404 in Italian**

Navigate to: `http://localhost:1313/it/questa-pagina-non-esiste/`

Expected: 404 page displays in Italian with Italian text for all labels.

- [ ] **Step 5: Test 404 dark/light mode**

On 404 page, click theme toggle in header.

Expected: 404 page styling adapts to light and dark modes, focus rings visible in both.

- [ ] **Step 6: Test 404 responsive design**

Set browser viewport to:
- 320px (mobile): Page should be single column, buttons stack vertically
- 768px (tablet): Page should be single column, buttons side-by-side or stacked
- 1200px (desktop): Page should be centered with max-width

Expected: Page responsive at all breakpoints, no horizontal scroll.

- [ ] **Step 7: Commit test results (no code changes)**

If any issues found during testing, fix them inline in `layouts/404.html` and commit as bugfix. If all tests pass:

```bash
git add -u
git commit -m "test: verify 404 page functionality (keyboard navigation, easter egg, dark mode, responsive)" --allow-empty
```

---

### Task 14: Test Repository Page Functionality

**Files:**
- Reference: `content/en/repository/_index.md`, `content/it/repository/_index.md`, `data/repos.yaml`

- [ ] **Step 1: Test repository page renders content sections**

```bash
hugo server
```

Navigate to: `http://localhost:1313/en/repository/`

Verify page displays:
- Page title ("Slackware Repository")
- Quick Start section with code block
- Installation section with instructions
- Usage section with command examples
- Available Packages section

Expected: All markdown content renders correctly.

- [ ] **Step 2: Test repository cards display**

On repository page, scroll down to "GitHub SlackBuild Repositories" section.

Verify:
- Cards display in grid layout (1 column mobile, 2-3 columns tablet/desktop)
- Each card shows image, project name, description, tags, and GitHub link
- Images load correctly (or show placeholder if images not yet created)

Expected: All cards display with correct data from `data/repos.yaml`.

- [ ] **Step 3: Test repository page keyboard navigation**

Press Tab repeatedly:
- Focus should move through code blocks
- Focus should move through GitHub repo links
- All elements keyboard-accessible

Expected: Full keyboard navigation works.

- [ ] **Step 4: Test repository page in Italian**

Navigate to: `http://localhost:1313/it/repository/`

Expected: Page displays in Italian with Italian headings, descriptions, and link labels.

- [ ] **Step 5: Test repository page dark/light mode**

On repository page, click theme toggle in header.

Expected: Page styling adapts to both modes, cards have proper contrast, focus rings visible.

- [ ] **Step 6: Test repository page responsive design**

Set viewport to:
- 320px: Single column, cards stacked, code blocks scrollable
- 768px: Single column, cards 2 per row
- 1200px: Single column content, cards 2-3 per row

Expected: Page responsive at all breakpoints.

- [ ] **Step 7: Test copy-to-clipboard (optional, if implemented)**

If copy buttons are added to code blocks:
- Hover over code block, click copy button
- Verify code is copied to clipboard
- Verify toast notification shows "Copied!"

Expected: Copy functionality works with feedback.

- [ ] **Step 8: Commit test results**

```bash
git add -u
git commit -m "test: verify repository page content, cards, keyboard nav, dark mode, responsive" --allow-empty
```

---

### Task 15: Verify Accessibility Compliance (404 & Repository)

**Files:**
- Reference: `layouts/404.html`, `content/en/repository/_index.md`, `content/it/repository/_index.md`

- [ ] **Step 1: Test heading hierarchy**

Using browser DevTools, inspect both pages:

**404 page:**
- Should have one `<h1>` (404 heading or error title)
- Should have `<h2>` for "Recent Articles" section
- No heading skips (e.g., h1 → h3)

**Repository page:**
- Should have one `<h1>` (page title)
- Should have `<h2>` for Installation, Usage, Available Packages, GitHub Repos sections
- No heading skips

Expected: Proper heading hierarchy on both pages.

- [ ] **Step 2: Test color contrast**

Using WebAIM Contrast Checker or Chrome DevTools:

Check these elements on 404 page:
- "404" heading text vs background
- Error message text vs background
- Button text vs button background
- Link text vs background
- Focus ring vs background

Check on repository page:
- Section headings vs background
- Body text vs background
- Code block text vs code background
- Card titles vs card background
- Button text vs button background
- Focus ring vs background

Test in both light and dark modes.

Expected: All text meets WCAG AA minimum (4.5:1 contrast).

- [ ] **Step 3: Test focus indicators**

On both pages:
- Press Tab to move through all interactive elements
- Verify focus indicator (2px ring) is visible on each element
- Verify focus ring has sufficient contrast (≥3:1) with background

Expected: Focus indicators visible and contrasting on all focusable elements.

- [ ] **Step 4: Test screen reader (optional)**

If available, use VoiceOver (Mac) or NVDA (Windows):

**404 page:**
- Navigate to page, verify title announced ("404" or page name)
- Verify error message announced
- Verify search box label announced
- Verify article titles/links announced
- Verify buttons announced with labels

**Repository page:**
- Verify page title announced
- Verify section headings announced with level
- Verify code blocks announced (or at minimum, not blocking navigation)
- Verify card titles and links announced
- Verify all button labels announced

Expected: Screen reader users can navigate and understand page structure.

- [ ] **Step 5: Test prefers-reduced-motion**

If animations are used on 404/repository pages:

Set OS preference to reduce motion (System Preferences > Accessibility > Display > Reduce Motion).

Reload page and verify:
- Fade-in animation on 404 heading should be removed or instant
- Scale-in animation on easter egg modal should be removed or instant
- Card hover transitions should be removed or instant

Expected: Animations are disabled for users with motion preference.

- [ ] **Step 6: Commit accessibility verification**

```bash
git add -u
git commit -m "test: verify accessibility (WCAG AA) - heading hierarchy, contrast, focus, motion" --allow-empty
```

---

### Task 16: Final Build & Merge to Master

**Files:**
- Git branch: `week-6-pages``master`

- [ ] **Step 1: Run final CSS build**

```bash
npm run build
```

Expected: CSS compilation completes in ~200-250ms, no errors, `main.min.css` generated.

- [ ] **Step 2: Verify no uncommitted changes**

```bash
git status
```

Expected: "nothing to commit, working tree clean" or only intentional changes.

- [ ] **Step 3: View final commit log**

```bash
git log --oneline -10
```

Expected: Shows all commits from week-6-pages feature branch (Task 1 through Task 15).

- [ ] **Step 4: Switch to master and merge**

```bash
git checkout master
git pull
git merge week-6-pages -m "merge: Week 6 - 404 page and Repository page complete (all pages accessible, responsive, multilingual)"
```

Expected: Fast-forward or clean merge, no conflicts.

- [ ] **Step 5: Verify merge success**

```bash
git status
git log --oneline -1
```

Expected: On master, latest commit is merge commit, working tree clean.

- [ ] **Step 6: Verify all files present**

```bash
ls -la layouts/404.html
ls -la content/en/repository/_index.md
ls -la content/it/repository/_index.md
ls -la data/repos.yaml
```

Expected: All files present.

- [ ] **Step 7: Final Hugo build verification**

```bash
hugo server
```

Test all pages:
- Home page: loads correctly
- Articles page: displays article list
- About page: loads correctly
- Contact page: form displays
- Repository page (EN/IT): loads with content and cards
- 404 page (navigate to non-existent URL): displays correctly
- Language switcher: works on all pages
- Dark/light mode: works on all pages
- Keyboard navigation: works on all pages

Expected: All pages function correctly, no regressions.

- [ ] **Step 8: Commit final verification**

```bash
git log --oneline -1
git branch -a
```

Expected: Confirms merge to master and all commits integrated.

---

## Summary

**Week 6 deliverables:**
- ✅ 404 error page (Easter egg easter egg with blue/red pill modal, recent articles, search box)
- ✅ Repository page (Hero, Installation, Usage, Available Packages sections, GitHub repo cards)
- ✅ Multilingual support (EN/IT) for both pages
- ✅ Full keyboard accessibility, focus management, WCAG AA compliance
- ✅ Responsive design (320px, 768px, 1200px+)
- ✅ Dark/light mode compatibility
- ✅ All content editable via markdown and YAML (no hardcoded content in templates)
- ✅ All tests passing, all regressions verified as zero

**Files created:** 5 new files (404.html, 2 markdown content files, 1 data YAML file, optional custom layout)
**Files modified:** 4 files (2 i18n YAML files, potentially custom CSS if needed)
**Total commits:** ~16 commits across all tasks
**Testing:** 2 comprehensive test tasks covering functionality, accessibility, responsiveness

**Next:** Merge to master and update HANDOFF.md with Week 6 completion status.