diff options
author | Michael Romero <halogenica@users.noreply.github.com> | 2022-06-26 11:11:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 11:11:30 +0300 |
commit | f4cb8354e19f80d691d3f7e545e7a3a124753d37 (patch) | |
tree | b3d5c483efb89b162a080bcd872d8b2831ef6a70 | |
parent | 26a8ab2a41f00682d55c3ef04ca9b6e4ba62a337 (diff) | |
parent | 8ae1a400cb47bf71324407c69e0706ae1f1d926e (diff) |
Merge branch 'master' into master
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | data/beautifulhugo/social.toml | 1 | ||||
-rw-r--r-- | i18n/br.yaml | 4 | ||||
-rw-r--r-- | i18n/de.yaml | 4 | ||||
-rw-r--r-- | i18n/en.yaml | 4 | ||||
-rw-r--r-- | i18n/eo.yaml | 4 | ||||
-rw-r--r-- | i18n/es.yaml | 4 | ||||
-rw-r--r-- | i18n/fr.yaml | 4 | ||||
-rw-r--r-- | i18n/it.yaml | 6 | ||||
-rw-r--r-- | i18n/ja.yaml | 4 | ||||
-rw-r--r-- | i18n/lmo.yaml | 297 | ||||
-rw-r--r-- | i18n/nb.yaml | 4 | ||||
-rw-r--r-- | i18n/nl.yaml | 8 | ||||
-rw-r--r-- | i18n/pl.yaml | 4 | ||||
-rw-r--r-- | i18n/ru.yaml | 6 | ||||
-rw-r--r-- | i18n/tr.yaml | 74 | ||||
-rw-r--r-- | i18n/zh-CN.yaml | 4 | ||||
-rw-r--r-- | i18n/zh-TW.yaml | 4 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 4 | ||||
-rw-r--r-- | layouts/partials/seo/twitter.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/details.html | 4 | ||||
-rw-r--r-- | static/css/codeblock.css | 2 | ||||
-rw-r--r-- | static/css/main.css | 148 |
24 files changed, 553 insertions, 53 deletions
@@ -110,6 +110,8 @@ If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won' To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`. +Note that the Google Analytics tracking code will only be inserted into the page when the site isn't served on Hugo's built-in server, to prevent tracking from local testing environments. + ### Commit SHA on the footer If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`: @@ -158,9 +160,9 @@ There are two extra shortcodes provided (along with the customized figure shortc This simply adds the html5 detail attribute, supported on all *modern* browsers. Use it like this: ``` -{{% details "This is the details title (click to expand)" %}} +{{< details "This is the details title (click to expand)" >}} This is the content (hidden until clicked). -{{% /details %}} +{{< /details >}} ``` #### Split @@ -172,7 +174,7 @@ This adds a two column side-by-side environment (will turn into 1 col for narrow This is column 1. {{< column >}} This is column 2. -{{< endcolumn >}} +{{< endcolumns >}} ``` ## About diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index 0ebf774..ea9f7fa 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -153,6 +153,7 @@ id = "mastodon" url = "https://%s" title = "Mastodon" icon = "fab fa-mastodon" +rel = "me" [[social_icons]] id = "weibo" diff --git a/i18n/br.yaml b/i18n/br.yaml index 75c90e6..ca45382 100644 --- a/i18n/br.yaml +++ b/i18n/br.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "02/Jan/2006 15:04:05" - id: postedOnDate - translation: "Postado em {{ .Count }}" + translation: "Postado em {{ . }}" - id: lastModified - translation: "(Ultima modificação em {{ .Count }})" + translation: "(Ultima modificação em {{ . }})" - id: translationsLabel translation: "Outras linguagens: " - id: translationsSeparator diff --git a/i18n/de.yaml b/i18n/de.yaml index 51da1f3..39d9312 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Gepostet am {{ .Count }}" + translation: "Gepostet am {{ . }}" - id: lastModified - translation: "(Zuletzt geändert am {{ .Count }})" + translation: "(Zuletzt geändert am {{ . }})" - id: translationsLabel translation: "Andere Sprachen: " - id: translationsSeparator diff --git a/i18n/en.yaml b/i18n/en.yaml index 9f12957..eee2c8a 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "Jan 2, 2006 15:04:05" - id: postedOnDate - translation: "Posted on {{ .Count }}" + translation: "Posted on {{ . }}" - id: lastModified - translation: "(Last modified on {{ .Count }})" + translation: "(Last modified on {{ . }})" - id: translationsLabel translation: "Other languages: " - id: translationsSeparator diff --git a/i18n/eo.yaml b/i18n/eo.yaml index 68fd7e2..24242f3 100644 --- a/i18n/eo.yaml +++ b/i18n/eo.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Afiŝiĝis je {{ .Count }}" + translation: "Afiŝiĝis je {{ . }}" - id: lastModified - translation: "(Laste aliiĝis je {{ .Count }})" + translation: "(Laste aliiĝis je {{ . }})" - id: translationsLabel translation: "Aliaj lingvoj: " - id: translationsSeparator diff --git a/i18n/es.yaml b/i18n/es.yaml index c2503b5..0ef597a 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Publicado el {{ .Count }}" + translation: "Publicado el {{ . }}" - id: lastModified - translation: "(Última modificación en {{ .Count }})" + translation: "(Última modificación en {{ . }})" - id: translationsLabel translation: "Otros idiomas: " - id: translationsSeparator diff --git a/i18n/fr.yaml b/i18n/fr.yaml index a88fb46..4b68667 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Posté le {{ .Count }}" + translation: "Posté le {{ . }}" - id: lastModified - translation: "(Dernière modification le {{ .Count }})" + translation: "(Dernière modification le {{ . }})" - id: translationsLabel translation: "Autres langues : " - id: translationsSeparator diff --git a/i18n/it.yaml b/i18n/it.yaml index 7ec7239..09f7313 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan 2006 15:04:05" - id: postedOnDate - translation: "Pubblicato il {{ .Count }}" + translation: "Pubblicato il {{ . }}" - id: lastModified - translation: "(Ultima modifica il {{ .Count }})" + translation: "(Ultima modifica il {{ . }})" - id: translationsLabel translation: "Altre lingue: " - id: translationsSeparator @@ -37,7 +37,7 @@ # Navigation - id: toggleNavigation - translation: "Attiva/disattiva la navigazione" + translation: "Menu" - id: languageSwitcherLabel translation: "Lingua" - id: gcseLabelShort diff --git a/i18n/ja.yaml b/i18n/ja.yaml index d7c0e26..f8603f2 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "{{ .Count }}に投稿" + translation: "{{ . }}に投稿" - id: lastModified - translation: "(最終更新日時{{ .Count }})" + translation: "(最終更新日時{{ . }})" - id: translationsLabel translation: "翻訳:" - id: translationsSeparator diff --git a/i18n/lmo.yaml b/i18n/lmo.yaml new file mode 100644 index 0000000..92ece42 --- /dev/null +++ b/i18n/lmo.yaml @@ -0,0 +1,297 @@ + + +# Content + +- id: dateFormat + + translation: "2 January 2006" + +- id: shortdateFormat + + translation: "2 Jan 2006 15:04:05" + +- id: postedOnDate + + translation: "Publegaa il {{ .Count }}" + +- id: lastModified + + translation: "(Darrera modifega ell {{ .Count }})" + +- id: translationsLabel + + translation: "Alter lengov: " + +- id: translationsSeparator + + translation: ", " + +- id: readMore + + translation: "Lensg" + +- id: olderPosts + + translation: "Articol pussee vegg" + +- id: newerPosts + + translation: "Articoli pussee noeuv" + +- id: previousPost + + translation: "Articolo de prima" + +- id: nextPost + + translation: "Articolo dopo" + +- id: readTime + + translation: "megnuu" + +- id: words + + translation: "paroll" + + + + + +# 404 page + +- id: pageNotFound + + translation: "Ocio, quella pagina chi la esist no. (errore 404)" + + + +# Footer + +- id: poweredBy # Accepts HTML + + translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + + + +# Navigation + +- id: toggleNavigation + + translation: "Attiva/disattiva la navigazion" + +- id: languageSwitcherLabel + + translation: "Lengua" + +- id: gcseLabelShort + + translation: "Cerca" + +- id: gcseLabelLong + + translation: "Cerca {{ .Site.Title }}" + +- id: gcseClose + + translation: "Sara su" + + + +# Staticman + +- id: noComment + + translation: "Nissub comment" + +- id: oneComment + + translation: "comment" + +- id: moreComment + + translation: "comment" + +- id: useMarkdown + + translation: "Te pòdet doperà la sintassi Markdown" + +- id: yourName + + translation: "El tò nomm" + +- id: yourEmail + + translation: "La toa adressa e-mail" + +- id: yourWebsite + + translation: "El tò sitt web" + + + +# Delayed Disqus + +- id: show + + translation: "Mostra" + +- id: comments + + translation: "comment" + + + +# Related posts + +- id: seeAlso + + translation: "Varda anca" + +# Content + +- id: dateFormat + + translation: "2 January 2006" + +- id: shortdateFormat + + translation: "2 Jan 2006 15:04:05" + +- id: postedOnDate + + translation: "Publegaa il {{ .Count }}" + +- id: lastModified + + translation: "(Darrera modifega ell {{ .Count }})" + +- id: translationsLabel + + translation: "Alter lengov: " + +- id: translationsSeparator + + translation: ", " + +- id: readMore + + translation: "Lensg" + +- id: olderPosts + + translation: "Articol pussee vegg" + +- id: newerPosts + + translation: "Articoli pussee noeuv" + +- id: previousPost + + translation: "Articolo de prima" + +- id: nextPost + + translation: "Articolo dopo" + +- id: readTime + + translation: "megnuu" + +- id: words + + translation: "paroll" + + + + + +# 404 page + +- id: pageNotFound + + translation: "Ocio, quella pagina chi la esist no. (errore 404)" + + + +# Footer + +- id: poweredBy # Accepts HTML + + translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>' + + + +# Navigation + +- id: toggleNavigation + + translation: "Attiva/disattiva la navigazion" + +- id: languageSwitcherLabel + + translation: "Lengua" + +- id: gcseLabelShort + + translation: "Cerca" + +- id: gcseLabelLong + + translation: "Cerca {{ .Site.Title }}" + +- id: gcseClose + + translation: "Sara su" + + + +# Staticman + +- id: noComment + + translation: "Nissub comment" + +- id: oneComment + + translation: "comment" + +- id: moreComment + + translation: "comment" + +- id: useMarkdown + + translation: "Te pòdet doperà la sintassi Markdown" + +- id: yourName + + translation: "El tò nomm" + +- id: yourEmail + + translation: "La toa adressa e-mail" + +- id: yourWebsite + + translation: "El tò sitt web" + + + +# Delayed Disqus + +- id: show + + translation: "Mostra" + +- id: comments + + translation: "comment" + + + +# Related posts + +- id: seeAlso + + translation: "Varda anca" diff --git a/i18n/nb.yaml b/i18n/nb.yaml index e52d943..fa02605 100644 --- a/i18n/nb.yaml +++ b/i18n/nb.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Postet {{ .Count }}" + translation: "Postet {{ . }}" - id: lastModified - translation: "(Sist endret {{ .Count }})" + translation: "(Sist endret {{ . }})" - id: translationsLabel translation: "Andre språk: " - id: translationsSeparator diff --git a/i18n/nl.yaml b/i18n/nl.yaml index 548e37e..f757606 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Gepost op {{ .Count }}" + translation: "Gepost op {{ . }}" - id: lastModified - translation: "(Laatst gewijzigd op {{ .Count }})" + translation: "(Laatst gewijzigd op {{ . }})" - id: translationsLabel translation: "Andere talen: " - id: translationsSeparator @@ -65,9 +65,9 @@ # Delayed Disqus - id: show - translation: "Laat" + translation: "Laat zien" - id: comments - translation: "reacties zien" + translation: "reacties" # Related posts - id: seeAlso diff --git a/i18n/pl.yaml b/i18n/pl.yaml index b320a20..4b41797 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Opublikowany {{ .Count }}" + translation: "Opublikowany {{ . }}" - id: lastModified - translation: "(Ostatnia modyfikacja {{ .Count }})" + translation: "(Ostatnia modyfikacja {{ . }})" - id: translationsLabel translation: "Inne języki: " - id: translationsSeparator diff --git a/i18n/ru.yaml b/i18n/ru.yaml index e8fb69c..0f72c37 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,12 +1,12 @@ # Content - id: dateFormat - translation: "Январь 2, 2006" + translation: "02.01.2006" - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "Опубликовано {{ .Count }}" + translation: "Опубликовано {{ . }}" - id: lastModified - translation: "(Последнее изменение {{ .Count }})" + translation: "(Последнее изменение {{ . }})" - id: translationsLabel translation: "Другие языки: " - id: translationsSeparator diff --git a/i18n/tr.yaml b/i18n/tr.yaml new file mode 100644 index 0000000..29e24f8 --- /dev/null +++ b/i18n/tr.yaml @@ -0,0 +1,74 @@ +# Content +- id: dateFormat + translation: "2 Ocak 2006" +- id: shortdateFormat + translation: "2 Oca 2006 15.04.05" +- id: postedOnDate + translation: "{{ .Count }} tarihinde paylaşıldı" +- id: lastModified + translation: "({{ .Count }} tarihinde güncellendi)" +- id: translationsLabel + translation: "Diğer diller: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Daha fazla oku" +- id: olderPosts + translation: "Önceki gönderiler" +- id: newerPosts + translation: "Son gönderiler" +- id: previousPost + translation: "Önceki gönderi" +- id: nextPost + translation: "Sonraki gönderi" +- id: readTime + translation: "dakika" +- id: words + translation: "kelime" + + +# 404 page +- id: pageNotFound + translation: "Ups, bu sayfa mevcut değil. Başka bir yöne ilerleyin. (404 hatası)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> altyapısı • <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> temasından uyarlanan <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> teması kullanılmaktadır.' + +# Navigation +- id: toggleNavigation + translation: "Gezinmeyi aktifleştirin" +- id: languageSwitcherLabel + translation: "Dil" +- id: gcseLabelShort + translation: "Arama" +- id: gcseLabelLong + translation: "{{ .Site.Title }} içinde arayın" +- id: gcseClose + translation: "Kapat" + +# Staticman +- id: noComment + translation: "Yorum yok" +- id: oneComment + translation: "yorum" +- id: moreComment + translation: "yorum" +- id: useMarkdown + translation: "Markdown söz dizimini kullanabilirsiniz" +- id: yourName + translation: "İsminiz" +- id: yourEmail + translation: "E-posta adresiniz" +- id: yourWebsite + translation: "Web siteniz" + +# Delayed Disqus +- id: show + translation: "Göster" +- id: comments + translation: "yorumlar" + +# Related posts +- id: seeAlso + translation: "Ayrıca bakınız" diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index d303607..7777495 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "发表于 {{ .Count }}" + translation: "发表于 {{ . }}" - id: lastModified - translation: "(上次修改时间 {{ .Count }})" + translation: "(上次修改时间 {{ . }})" - id: translationsLabel translation: "其它语言: " - id: translationsSeparator diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml index 8bd1f52..6d2436d 100644 --- a/i18n/zh-TW.yaml +++ b/i18n/zh-TW.yaml @@ -4,9 +4,9 @@ - id: shortdateFormat translation: "2 Jan, 2006 15:04:05" - id: postedOnDate - translation: "發表於 {{ .Count }}" + translation: "發表於 {{ . }}" - id: lastModified - translation: "(最後修改於 {{ .Count }})" + translation: "(最後修改於 {{ . }})" - id: translationsLabel translation: "其他語言: " - id: translationsSeparator diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8b48793..31ecaf9 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,7 @@ {{ range .Site.Data.beautifulhugo.social.social_icons }} {{- if isset $.Site.Author .id }} <li> - <a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}"> + <a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}"> <span class="fa-stack fa-lg"> <i class="fas fa-circle fa-stack-2x"></i> <i class="{{ .icon }} fa-stack-1x fa-inverse"></i> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 83ace10..de9a5a3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -88,4 +88,6 @@ {{- end -}} {{- partial "head_custom.html" . }} -{{ template "_internal/google_analytics_async.html" . }} +{{- if not .Site.IsServer -}} + {{ template "_internal/google_analytics_async.html" . }} +{{- end -}}
\ No newline at end of file diff --git a/layouts/partials/seo/twitter.html b/layouts/partials/seo/twitter.html index 0eb1e9b..5f13317 100644 --- a/layouts/partials/seo/twitter.html +++ b/layouts/partials/seo/twitter.html @@ -7,7 +7,7 @@ {{- with .Params.share_img | default .Params.image | default .Site.Params.logo }} <meta name="twitter:image" content="{{ . | absURL }}" /> {{- end }} - <meta name="twitter:card" content="summary" /> + <meta name="twitter:card" content="summary_large_image" /> {{- with .Site.Author.twitter }} <meta name="twitter:site" content="@{{ . }}" /> <meta name="twitter:creator" content="@{{ . }}" /> diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html index 3410075..a8ad297 100644 --- a/layouts/shortcodes/details.html +++ b/layouts/shortcodes/details.html @@ -1,3 +1,3 @@ -<details><summary>{{ .Get 0 }}</summary> -{{ .Inner }} +<details><summary>{{ .Get 0 | markdownify }}</summary> +{{ .Inner | markdownify }} </details> diff --git a/static/css/codeblock.css b/static/css/codeblock.css index cf80033..4481eed 100644 --- a/static/css/codeblock.css +++ b/static/css/codeblock.css @@ -30,4 +30,4 @@ pre code.hljs { .highlight td:last-child pre code, .highlight pre code { white-space: pre; -}
\ No newline at end of file +} diff --git a/static/css/main.css b/static/css/main.css index 779581f..7f30a3f 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -10,6 +10,12 @@ body { flex-flow: column; height: 100vh; } +@media (prefers-color-scheme: dark) { + body { + background: black; + color: white; + } +} .container[role=main] { margin-bottom:50px; flex: 1 0 auto; @@ -33,6 +39,12 @@ p a { /* text-decoration: underline */ color: #008AFF; } +@media (prefers-color-scheme: dark) { + p a { + color: #50afff; + } +} + h1,h2,h3,h4,h5,h6 { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 800; @@ -40,6 +52,11 @@ h1,h2,h3,h4,h5,h6 { a { color: #008AFF; } +@media (prefers-color-scheme: dark) { + a { + color: #50afff; + } +} a:hover, a:focus { color: #0085a1; @@ -51,6 +68,11 @@ blockquote { blockquote p:first-child { margin-top: 0; } +@media (prefers-color-scheme: dark) { + blockquote { + border-left: 5px solid #444; + } +} hr.small { max-width: 100px; margin: 15px auto; @@ -95,30 +117,27 @@ div.panel-body a.list-group-item.view-all { font-weight: 600; } -::-moz-selection { +::-moz-selection, ::selection { color: white; text-shadow: none; background: #0085a1; } -::selection { - color: white; - text-shadow: none; - background: #0085a1; -} -img::selection { - color: white; - background: transparent; -} -img::-moz-selection { +img::selection, img::-moz-selection { color: white; background: transparent; } + img { display: block; margin: auto; max-width: 100%; } +@media (prefers-color-scheme: dark) { +figure:not(.dark) img, img.white { + background-color: white; +} +} .img-title { width: 100%; @@ -141,6 +160,12 @@ img { border-bottom: 1px solid #EAEAEA; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; } +@media (prefers-color-scheme: dark) { + .navbar-custom { + background: #505050; + border-bottom: 1px solid #AAA; + } +} .navbar-custom .nav li a { text-transform: uppercase; @@ -154,6 +179,13 @@ img { color: #404040; } +@media (prefers-color-scheme: dark) { + .navbar-custom .navbar-brand, + .navbar-custom .nav li a { + color: #b0b0b0; + } +} + .navbar-custom .navbar-brand:hover, .navbar-custom .navbar-brand:focus , .navbar-custom .nav li a:hover, @@ -161,6 +193,15 @@ img { color: #0085a1; } +.navbar-custom .navbar-brand:hover, +.navbar-custom .navbar-brand:focus , +.navbar-custom .nav li a:hover, +.navbar-custom .nav li a:focus { + @media (prefers-color-scheme: dark) { + color: #b0e0ff; + } +} + .navbar-custom .navbar-brand-logo { padding-top: 0; -webkit-transition: padding .5s ease-in-out; @@ -294,6 +335,17 @@ img { border-width: 0 1px 1px; } } +@media (prefers-color-scheme: dark) { + .navbar-custom .nav .navlinks-container:hover { + background: #666; + } + .navbar-custom .nav .navlinks-container .navlinks-children a { + border: 1px solid #AAA; + } + .navbar-custom .nav .navlinks-container .navlinks-children a { + background: #444; + } +} /* --- Footer --- */ @@ -307,6 +359,7 @@ footer { footer a { color: #404040; + } footer .list-inline { @@ -335,13 +388,22 @@ footer .theme-by { } } +@media (prefers-color-scheme: dark) { + footer { + background: #444; + border-top: 1px #AAA solid; + } + footer a { + color: #AAA; + } +} + /* --- Post preview --- */ .post-preview { padding: 20px 0; border-bottom: 1px solid #eee; } - @media only screen and (min-width: 768px) { .post-preview { padding: 35px 0; @@ -356,6 +418,11 @@ footer .theme-by { text-decoration: none; color: #404040; } +@media (prefers-color-scheme: dark) { + .post-preview a { + color: #AAA; + } +} .post-preview a:focus, .post-preview a:hover { @@ -657,6 +724,13 @@ footer .theme-by { border: 1px solid #0085a1; } +@media (prefers-color-scheme: dark) { +.pager li a { + background: #444; + color: white; +} +} + .pager { margin: 10px 0 0; } @@ -686,9 +760,19 @@ table tr { margin: 0; padding: 0; } +@media (prefers-color-scheme: dark) { +} table tr:nth-child(2n) { background-color: #f8f8f8; } +@media (prefers-color-scheme: dark) { +table tr { + background-color: #181818; +} +table tr:nth-child(2n) { + background-color: #303030 +} +} table tr th { font-weight: bold; border: 1px solid #cccccc; @@ -815,3 +899,43 @@ h4.see-also { ul.share li:hover .fab { transform: scale(1.4) } + +/* Dark mode */ +@media (prefers-color-scheme: dark) { + code { + background-color: #222; + color: #fbb; + } + pre code { + color: #ccc; + } + .well { + background-color: #444; + } + .panel { + background-color: #222; + } + .list-group-item { + background-color: #333; + } + + pre.chroma { + color: white; + background-color: #444; + } + pre.chroma .k { + color: #44AACC; + } + pre.chroma .kt { + color: #33CCCC; + } + pre.chroma .o { + color: #AAA; + } + pre.chroma .nb { + color: #00fee9; + } + pre.chroma .ow { + color: #CC0; + } +} |