Compare commits
3 Commits
512c81c431
...
bafd274a8b
Author | SHA1 | Date |
---|---|---|
Gabriel Augendre | bafd274a8b | |
Aditya Telange | 33e48f9892 | |
Gabriel Augendre | 71b5c16e7f |
|
@ -36,12 +36,21 @@
|
|||
{{- range $pages.GroupByPublishDate "2006" }}
|
||||
{{- if ne .Key "0001" }}
|
||||
<div class="archive-year">
|
||||
<h2 class="archive-year-header">
|
||||
{{- replace .Key "0001" "" }}<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
{{- $year := replace .Key "0001" "" }}
|
||||
<h2 class="archive-year-header" id="{{ $year }}">
|
||||
<a class="archive-header-link" href="#{{ $year }}">
|
||||
{{- $year -}}
|
||||
</a>
|
||||
<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
</h2>
|
||||
{{- range .Pages.GroupByDate "January" }}
|
||||
<div class="archive-month">
|
||||
<h3 class="archive-month-header">{{- .Key }}<sup class="archive-count"> {{ len .Pages }}</sup></h3>
|
||||
<h3 class="archive-month-header" id="{{ $year }}-{{ .Key }}">
|
||||
<a class="archive-header-link" href="#{{ $year }}-{{ .Key }}">
|
||||
{{- .Key -}}
|
||||
</a>
|
||||
<sup class="archive-count"> {{ len .Pages }}</sup>
|
||||
</h3>
|
||||
<div class="archive-posts">
|
||||
{{- range .Pages }}
|
||||
{{- if eq .Kind "page" }}
|
||||
|
|
|
@ -106,6 +106,38 @@
|
|||
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
|
||||
{{ end -}}
|
||||
|
||||
{{- /* theme-toggle is disabled and theme is auto */}}
|
||||
{{- if (and site.Params.disableThemeToggle (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--theme: rgb(29, 30, 32);
|
||||
--entry: rgb(46, 46, 51);
|
||||
--primary: rgb(218, 218, 219);
|
||||
--secondary: rgb(155, 156, 157);
|
||||
--tertiary: rgb(65, 66, 68);
|
||||
--content: rgb(196, 196, 197);
|
||||
--hljs-bg: rgb(46, 46, 51);
|
||||
--code-bg: rgb(55, 56, 62);
|
||||
--border: rgb(51, 51, 51);
|
||||
}
|
||||
|
||||
.list {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-track {
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||||
border-color: var(--theme);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
{{- end }}
|
||||
|
||||
<noscript>
|
||||
<style>
|
||||
#theme-toggle,
|
||||
|
@ -114,7 +146,7 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
{{- if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
|
||||
{{- if (and (not site.Params.disableThemeToggle) (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
|
||||
</script>
|
||||
{{- end }}
|
||||
{{- /* theme-toggle is disabled and theme is auto */}}
|
||||
{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
|
||||
<script>
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.body.classList.add('dark');
|
||||
}
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
<header class="header">
|
||||
|
|
Loading…
Reference in New Issue