diff options
author | Julien Dessaux | 2021-08-16 12:35:32 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-08-16 12:35:32 +0200 |
commit | 78a6f5505d585fae4d32ae53304f7a1981263f4b (patch) | |
tree | f06b13877272ee11f6e6b4e115263326da4200f2 | |
parent | Fix w3c css validator errors and updated fonts (diff) | |
download | www-78a6f5505d585fae4d32ae53304f7a1981263f4b.tar.gz www-78a6f5505d585fae4d32ae53304f7a1981263f4b.tar.bz2 www-78a6f5505d585fae4d32ae53304f7a1981263f4b.zip |
Switched to a solarized color scheme
-rw-r--r-- | assets/footer.css | 6 | ||||
-rw-r--r-- | assets/header.css | 10 | ||||
-rw-r--r-- | assets/pagination.css | 21 | ||||
-rw-r--r-- | assets/solarized.css | 36 | ||||
-rw-r--r-- | config.toml | 21 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 3 | ||||
-rw-r--r-- | layouts/partials/nav.html | 4 | ||||
-rw-r--r-- | layouts/partials/pagination.html | 4 |
8 files changed, 74 insertions, 31 deletions
diff --git a/assets/footer.css b/assets/footer.css index e27317c..dfcbbce 100644 --- a/assets/footer.css +++ b/assets/footer.css @@ -1,11 +1,11 @@ footer { - background-color: #30638e; + background-color: #002b36; padding: 10px; } footer p { - color: lightgray; + color: #859900; text-align: center; } footer a { - color: lightgray; + color: #859900; } diff --git a/assets/header.css b/assets/header.css index fc4c83e..5e45df4 100644 --- a/assets/header.css +++ b/assets/header.css @@ -1,5 +1,5 @@ header { - background-color: #30638e; + background-color: #002b36; } header nav ul { list-style-type: none; @@ -14,19 +14,15 @@ header nav ul li { } header nav ul li a { display: block; - color: lightgray; text-align: center; padding: 14px 16px; text-decoration: none; } -header nav ul li a:hover { - color: black; +.nav-menu-active { + background-color: #073642; } .nav-menu-title { float: left; text-transform: uppercase; font-weight: 700; } -.nav-menu-active { - color: white; -} diff --git a/assets/pagination.css b/assets/pagination.css index ba568fb..abcb0c3 100644 --- a/assets/pagination.css +++ b/assets/pagination.css @@ -3,6 +3,9 @@ list-style:none; border-radius:.25rem; } +.pagination li { + background-color: #002b36; +} .pagination li a { border:1px solid rgba(0,0,0,.1); position:relative; @@ -11,23 +14,25 @@ line-height:1.25; text-decoration: none; } -.pagination li:first-child a { +.pagination .pagination-enabled:first-child a { border-top-left-radius:.25rem; border-bottom-left-radius:.25rem } -.pagination li:last-child a { +.pagination .pagination-enabled:last-child a { border-top-right-radius:.25rem; border-bottom-right-radius:.25rem } -.pagination li a:hover { - color:#1e53a0; - background-color:#eee; +.pagination .pagination-enabled a:hover { + background-color: #073642; z-index: 999; } -.pagination-disabled { - color: lightgray; +.pagination-disabled a { + color: #839496; +} +.pagination-disabled a:hover { + color: #839496; } .pagination-active a { color: white; - background-color: #30638e; + background-color: #073642; } diff --git a/assets/solarized.css b/assets/solarized.css new file mode 100644 index 0000000..e00a93f --- /dev/null +++ b/assets/solarized.css @@ -0,0 +1,36 @@ +html { + background-color: #002b36; + color: #839496; +} +body { + background-color: #073642; +} +code { + background-color: #073642; +} +a { + color: #b58900; +} +a:visited { + color: #cb4b16; +} +a:hover { + color: #cb4b16; +} +h1 { + color: #dc322f; +} +h2, +h3, +h4, +h5, +h6 { + color: #859900; +} +pre { + background-color: #002b36; + color: #839496; +} +pre, code { + background-color: #002b36; +} diff --git a/config.toml b/config.toml index 27debbf..7294f53 100644 --- a/config.toml +++ b/config.toml @@ -7,14 +7,19 @@ enableGitInfo = true paginate = 32 rssLimit = 16 -# Highlighting config -pygmentsCodeFences = true -pygmentsUseClasses = false -# Use the new Chroma Go highlighter in Hugo. -pygmentsUseClassic = false -#pygmentsOptions = "linenos=table" -# See https://help.farbox.com/pygments.html -pygmentsStyle = "tango" +[markup] +[markup.highlight] +anchorLineNos = false +codeFences = true +guessSyntax = false +hl_Lines = '' +lineAnchors = '' +lineNoStart = 1 +lineNos = false +lineNumbersInTable = true +noClasses = true +style = 'solarized-dark' +tabWidth = 2 [permalinks] blog = "/:section/:year/:month/:day/:slug/" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5b4f442..07920c1 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,7 +14,8 @@ {{- $home := resources.Get "home.css" -}} {{- $pagination := resources.Get "pagination.css" -}} {{- $footer := resources.Get "footer.css" -}} - {{- $allCss := slice $base $header $home $pagination $footer | resources.Concat "static/all.css" | fingerprint | minify -}} + {{- $solarized := resources.Get "solarized.css" -}} + {{- $allCss := slice $base $header $home $pagination $footer $solarized | resources.Concat "static/all.css" | fingerprint | minify -}} <link rel="stylesheet" href="{{ $allCss.Permalink }}"> {{ range .AlternativeOutputFormats -}} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index f54ae38..97f494e 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -12,8 +12,8 @@ {{- end -}} {{- $url := urls.Parse .URL -}} {{- $baseurl := urls.Parse $.Site.Params.Baseurl -}} - <li> - <a{{if $active }} class="nav-menu-active"{{end}} href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ .Name }}</a> + <li{{if $active }} class="nav-menu-active"{{end}}> + <a href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ .Name }}</a> </li> {{ end }} </ul> diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 7220408..e2724ec 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -2,7 +2,7 @@ {{- if gt $pag.TotalPages 1 -}} <ul class="pagination"> {{ with $pag.First -}} - <li{{ if not $pag.HasPrev }} class="pagination-disabled"{{ end }}> + <li {{ if $pag.HasPrev }}class="pagination-enabled"{{ else }}class="pagination-disabled"{{ end }}> <a {{ if $pag.HasPrev }}href="{{ .URL }}"{{ end }} aria-label="First"><span aria-hidden="true">«</span></a> </li> {{ end -}} @@ -12,7 +12,7 @@ </li> {{- end }} {{- with $pag.Last }} - <li{{ if not $pag.HasNext }} class="pagination-disabled"{{ end }}> + <li {{ if $pag.HasNext }}class="pagination-enabled"{{ else }}class="pagination-disabled"{{ end }}> <a {{ if $pag.HasNext }}href="{{ .URL }}"{{ end }} aria-label="Last"><span aria-hidden="true">»</span></a> </li> {{- end }} |