Skip to content

Commit a419f50

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 8d2e8e8 + 3bb0ca2 commit a419f50

13 files changed

Lines changed: 147 additions & 78 deletions

File tree

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MIT License
22

33
Copyright (c) 2020 nanxiaobei and adityatelange
4-
Copyright (c) 2021-2025 adityatelange
5-
Copyright (c) 2024-2025 8 Hobbies, LLC
4+
Copyright (c) 2021-2026 adityatelange
5+
Copyright (c) 2024-2026 8 Hobbies, LLC
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

assets/css/common/header.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ button#theme-toggle {
4141
margin: auto 4px;
4242
}
4343

44-
body.dark #moon {
45-
vertical-align: middle;
44+
[data-theme="dark"] #moon {
4645
display: none;
4746
}
4847

49-
body:not(.dark) #sun {
48+
[data-theme="light"] #sun {
5049
display: none;
5150
}
5251

assets/css/common/post-single.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
padding: 0.4em;
269269
}
270270

271-
.dark .toc {
271+
[data-theme="dark"] .toc {
272272
background: var(--entry);
273273
}
274274

assets/css/core/license.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
KamiMod
33
License: MIT https://github.com/8hobbies/KamiMod/blob/master/LICENSE
44
Copyright (c) 2020 nanxiaobei and adityatelange
5-
Copyright (c) 2021-2025 adityatelange
6-
Copyright (c) 2024-2025 8 Hobbies, LLC
5+
Copyright (c) 2021-2026 adityatelange
6+
Copyright (c) 2024-2026 8 Hobbies, LLC
77
*/

assets/css/core/theme-vars.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
--code-block-bg: rgb(28, 29, 33);
1616
--code-bg: rgb(245, 245, 245);
1717
--border: rgb(238, 238, 238);
18+
color-scheme: light;
1819
}
1920

20-
.dark {
21+
:root[data-theme="dark"] {
2122
--theme: rgb(29, 30, 32);
2223
--entry: rgb(46, 46, 51);
2324
--primary: rgb(218, 218, 219);
@@ -27,12 +28,13 @@
2728
--code-block-bg: rgb(46, 46, 51);
2829
--code-bg: rgb(55, 56, 62);
2930
--border: rgb(51, 51, 51);
31+
color-scheme: dark;
3032
}
3133

3234
.list {
3335
background: var(--code-bg);
3436
}
3537

36-
.dark.list {
38+
[data-theme="dark"] .list {
3739
background: var(--theme);
3840
}

assets/css/includes/scroll-bar.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
background: 0 0;
44
}
55

6-
.list:not(.dark)::-webkit-scrollbar-track {
7-
background: var(--code-bg);
8-
}
9-
106
::-webkit-scrollbar-thumb {
117
background: var(--tertiary);
128
border: 5px solid var(--theme);
139
border-radius: var(--radius);
1410
}
1511

16-
.list:not(.dark)::-webkit-scrollbar-thumb {
12+
[data-theme="light"] .list::-webkit-scrollbar-thumb {
1713
border: 5px solid var(--code-bg);
1814
}
1915

assets/js/license.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
PaperMod v8+
33
License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
44
Copyright (c) 2020 nanxiaobei and adityatelange
5-
Copyright (c) 2021-2025 adityatelange
5+
Copyright (c) 2021-2026 adityatelange
66
*/

i18n/ca.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66

77
- id: read_time
88
translation:
9-
one : "1 min"
10-
other: "{{ .Count }} min"
9+
one : "1 minut"
10+
other: "{{ .Count }} minuts"
11+
12+
- id: words
13+
translation:
14+
one : "paraula"
15+
other: "{{ .Count }} paraules"
1116

1217
- id: toc
1318
translation: "Taula de Continguts"
@@ -17,3 +22,12 @@
1722

1823
- id: home
1924
translation: "Inici"
25+
26+
- id: edit_post
27+
translation: "Editar"
28+
29+
- id: code_copy
30+
translation: "copiar"
31+
32+
- id: code_copied
33+
translation: "copiat!"

layouts/_default/baseof.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
{{- end -}}
44

55
<!DOCTYPE html>
6-
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
6+
{{- $theme := site.Params.defaultTheme | default "auto" }}
7+
{{- if eq $theme "dark" }}
8+
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="dark">
9+
{{- else if eq $theme "light" }}
10+
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="light">
11+
{{- else }}
12+
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="auto">
13+
{{- end }}
714

815
<head>
916
{{- partial "head.html" . }}
1017
</head>
1118

12-
<body class="
13-
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}}
14-
{{- print "list" -}}
15-
{{- end -}}
16-
{{- if eq site.Params.defaultTheme `dark` -}}
17-
{{- print " dark" }}
18-
{{- end -}}
19-
" id="top">
20-
{{- partialCached "header.html" . .Page -}}
19+
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) }}
20+
<body class="list" id="top">
21+
{{- else }}
22+
<body id="top">
23+
{{- end }}
24+
{{ partialCached "header.html" . .Page -}}
2125
<main class="main">
2226
{{- block "main" . }}{{ end }}
2327
</main>

layouts/_default/llms.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- /* Recursive printer for sections */ -}}
2+
{{- define "llms_print_section" -}}
3+
{{- $section := .section -}}
4+
{{- $depth := .depth -}}
5+
{{- if or (gt (len $section.RegularPages) 0) (gt (len $section.Sections) 0) -}}
6+
{{- $hashes := strings.Repeat (add $depth 1) "#" }}
7+
8+
{{ printf "%s %s" $hashes $section.Title }}
9+
10+
{{- /* Pages in this section */ -}}
11+
{{- range $p := $section.RegularPages }}
12+
{{- if and (not $p.Params.searchHidden) (ne $p.Layout `archives`) (ne $p.Layout `search`) }}
13+
- [{{ $p.Title }}]({{ $p.Permalink }})
14+
{{- end -}}
15+
{{- end -}}
16+
17+
{{- /* Recurse into subsections */ -}}
18+
{{- range $s := $section.Sections -}}
19+
{{- template "llms_print_section" (dict "section" $s "depth" (add $depth 1)) -}}
20+
{{- end -}}
21+
{{- end -}}
22+
{{- end -}}
23+
24+
{{- /* Main template starts here */ -}}
25+
# {{ site.Title }}
26+
27+
{{- /* Pages not in any section */ -}}
28+
{{- $orphans := where site.RegularPages "Section" "" -}}
29+
{{ if gt (len $orphans) 0 }}
30+
31+
{{- range $p := $orphans -}}
32+
{{ if and (not $p.Params.searchHidden) (ne $p.Layout `archives`) (ne $p.Layout `search`) (not $p.IsHome) }}
33+
- [{{ $p.Title }}]({{ $p.Permalink }})
34+
{{- end -}}
35+
{{- end -}}
36+
37+
{{- end -}}
38+
39+
{{- range site.Sections -}}
40+
{{- template "llms_print_section" (dict "section" . "depth" 1) -}}
41+
{{- end }}

0 commit comments

Comments
 (0)