diff --git a/config.toml b/config.toml index c45ed13..19d5ab7 100755 --- a/config.toml +++ b/config.toml @@ -17,8 +17,8 @@ style = "emacs" keywords = "open source, free software, Deutsche Bahn, DB Systel, FSFE, management, campaign, communication, strategy, konstanz, berlin, munster, IT service, politics, administration, scouts, founder" # Custom assets can be linked with their paths relative to static/ - custom_css = ['css/custom.css', 'comments/mastodon-comments.css'] - custom_js = ['comments/getcomments.js'] + custom_css = ["comments/mastodon-comments.css"] + custom_js = ["comments/getcomments.js"] [params.blog] headline = "Thoughts about tech, politics, and more" diff --git a/themes/hugo-sustain/static/css/bootstrap-3.3.7.min.css b/themes/hugo-sustain/assets/css/bootstrap-3.3.7.min.css similarity index 100% rename from themes/hugo-sustain/static/css/bootstrap-3.3.7.min.css rename to themes/hugo-sustain/assets/css/bootstrap-3.3.7.min.css diff --git a/themes/hugo-sustain/static/css/fontawesome/css/all.min.css b/themes/hugo-sustain/assets/css/fontawesome-all.min.css similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/css/all.min.css rename to themes/hugo-sustain/assets/css/fontawesome-all.min.css diff --git a/themes/hugo-sustain/static/js/filter-tags.js b/themes/hugo-sustain/assets/js/filter-tags.js similarity index 99% rename from themes/hugo-sustain/static/js/filter-tags.js rename to themes/hugo-sustain/assets/js/filter-tags.js index d389900..b2fd1f4 100644 --- a/themes/hugo-sustain/static/js/filter-tags.js +++ b/themes/hugo-sustain/assets/js/filter-tags.js @@ -1,4 +1,4 @@ -/* +/*! * SPDX-FileCopyrightText: 2020 Max Mehl * SPDX-License-Identifier: GPL-3.0-or-later */ diff --git a/themes/hugo-sustain/static/js/jquery-1.11.3.min.js b/themes/hugo-sustain/assets/js/jquery-1.11.3.min.js similarity index 100% rename from themes/hugo-sustain/static/js/jquery-1.11.3.min.js rename to themes/hugo-sustain/assets/js/jquery-1.11.3.min.js diff --git a/themes/hugo-sustain/static/css/custom.css b/themes/hugo-sustain/assets/scss/custom.scss similarity index 100% rename from themes/hugo-sustain/static/css/custom.css rename to themes/hugo-sustain/assets/scss/custom.scss diff --git a/themes/hugo-sustain/static/css/main.css b/themes/hugo-sustain/assets/scss/default.scss similarity index 99% rename from themes/hugo-sustain/static/css/main.css rename to themes/hugo-sustain/assets/scss/default.scss index 02d4f12..bf98e5a 100755 --- a/themes/hugo-sustain/static/css/main.css +++ b/themes/hugo-sustain/assets/scss/default.scss @@ -9,7 +9,7 @@ html, body { /* Wrapper for page content to push down footer */ #wrap { - padding-bottom: 50px; + padding-bottom: 50px; min-height: 100%; height: auto; /* Negative indent footer by its height */ @@ -195,5 +195,5 @@ div.footer{ /*.footer { height: 50px; padding-bottom: 15px; - + }*/ diff --git a/themes/hugo-sustain/assets/scss/fonts.scss b/themes/hugo-sustain/assets/scss/fonts.scss new file mode 100644 index 0000000..177fe0e --- /dev/null +++ b/themes/hugo-sustain/assets/scss/fonts.scss @@ -0,0 +1,27 @@ +/* source-sans-pro-200 - latin */ +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 200; + src: url('../webfonts/source-sans-pro-v11-latin-200.eot'); /* IE9 Compat Modes */ + src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'), + url('../webfonts/source-sans-pro-v11-latin-200.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../webfonts/source-sans-pro-v11-latin-200.woff2') format('woff2'), /* Super Modern Browsers */ + url('../webfonts/source-sans-pro-v11-latin-200.woff') format('woff'), /* Modern Browsers */ + url('../webfonts/source-sans-pro-v11-latin-200.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../webfonts/source-sans-pro-v11-latin-200.svg#SourceSansPro') format('svg'); /* Legacy iOS */ +} + +/* source-sans-pro-regular - latin */ +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: url('../webfonts/source-sans-pro-v11-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), + url('../webfonts/source-sans-pro-v11-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../webfonts/source-sans-pro-v11-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../webfonts/source-sans-pro-v11-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../webfonts/source-sans-pro-v11-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../webfonts/source-sans-pro-v11-latin-regular.svg#SourceSansPro') format('svg'); /* Legacy iOS */ +} diff --git a/themes/hugo-sustain/static/css/luxbar.css b/themes/hugo-sustain/assets/scss/luxbar.scss similarity index 100% rename from themes/hugo-sustain/static/css/luxbar.css rename to themes/hugo-sustain/assets/scss/luxbar.scss diff --git a/themes/hugo-sustain/assets/scss/main.scss b/themes/hugo-sustain/assets/scss/main.scss new file mode 100755 index 0000000..0df4ef9 --- /dev/null +++ b/themes/hugo-sustain/assets/scss/main.scss @@ -0,0 +1,4 @@ +@import "default"; +@import "fonts"; +@import "luxbar"; +@import "custom"; diff --git a/themes/hugo-sustain/layouts/partials/head.html b/themes/hugo-sustain/layouts/partials/head.html index 82b96e4..ff57ba8 100644 --- a/themes/hugo-sustain/layouts/partials/head.html +++ b/themes/hugo-sustain/layouts/partials/head.html @@ -25,14 +25,9 @@ {{ $title }} - - - - - - {{- range .Site.Params.custom_css }} - - {{- end }} + + + {{- partialCached "head/css.html" . }} {{ "" | safeHTML }} diff --git a/themes/hugo-sustain/layouts/partials/head/css.html b/themes/hugo-sustain/layouts/partials/head/css.html new file mode 100644 index 0000000..9fc6625 --- /dev/null +++ b/themes/hugo-sustain/layouts/partials/head/css.html @@ -0,0 +1,21 @@ + +{{- range (slice "css/bootstrap-3.3.7.min.css" "css/fontawesome-all.min.css") }} + {{- with resources.Get . }} + {{- if eq hugo.Environment "development" }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} + + +{{- $style := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "scss/main.scss" . | toCSS (dict "targetPath" "css/main.css" "enableSourceMap" false) }} + + + +{{- range .Site.Params.custom_css }} + +{{- end }} diff --git a/themes/hugo-sustain/layouts/partials/js.html b/themes/hugo-sustain/layouts/partials/js.html index 400ceac..67a9b2c 100644 --- a/themes/hugo-sustain/layouts/partials/js.html +++ b/themes/hugo-sustain/layouts/partials/js.html @@ -1,8 +1,17 @@ - - - - - -{{ range .Site.Params.custom_js -}} - -{{ end }} +{{- range (slice "js/jquery-1.11.3.min.js" "js/filter-tags.js") }} + {{- with resources.Get . }} + {{- if eq hugo.Environment "development" }} + {{- with . }} + + {{- end }} + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} + +{{- range .Site.Params.custom_js }} + +{{- end }} diff --git a/themes/hugo-sustain/static/css/fonts.css b/themes/hugo-sustain/static/css/fonts.css deleted file mode 100644 index ea59555..0000000 --- a/themes/hugo-sustain/static/css/fonts.css +++ /dev/null @@ -1,27 +0,0 @@ -/* source-sans-pro-200 - latin */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 200; - src: url('../fonts/source-sans-pro-v11-latin-200.eot'); /* IE9 Compat Modes */ - src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'), - url('../fonts/source-sans-pro-v11-latin-200.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/source-sans-pro-v11-latin-200.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/source-sans-pro-v11-latin-200.woff') format('woff'), /* Modern Browsers */ - url('../fonts/source-sans-pro-v11-latin-200.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/source-sans-pro-v11-latin-200.svg#SourceSansPro') format('svg'); /* Legacy iOS */ -} - -/* source-sans-pro-regular - latin */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: url('../fonts/source-sans-pro-v11-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), - url('../fonts/source-sans-pro-v11-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/source-sans-pro-v11-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/source-sans-pro-v11-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/source-sans-pro-v11-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/source-sans-pro-v11-latin-regular.svg#SourceSansPro') format('svg'); /* Legacy iOS */ -} diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.eot b/themes/hugo-sustain/static/webfonts/fa-brands-400.eot similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.eot rename to themes/hugo-sustain/static/webfonts/fa-brands-400.eot diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.svg b/themes/hugo-sustain/static/webfonts/fa-brands-400.svg similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.svg rename to themes/hugo-sustain/static/webfonts/fa-brands-400.svg diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.ttf b/themes/hugo-sustain/static/webfonts/fa-brands-400.ttf similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.ttf rename to themes/hugo-sustain/static/webfonts/fa-brands-400.ttf diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.woff b/themes/hugo-sustain/static/webfonts/fa-brands-400.woff similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.woff rename to themes/hugo-sustain/static/webfonts/fa-brands-400.woff diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.woff2 b/themes/hugo-sustain/static/webfonts/fa-brands-400.woff2 similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-brands-400.woff2 rename to themes/hugo-sustain/static/webfonts/fa-brands-400.woff2 diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.eot b/themes/hugo-sustain/static/webfonts/fa-regular-400.eot similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.eot rename to themes/hugo-sustain/static/webfonts/fa-regular-400.eot diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.svg b/themes/hugo-sustain/static/webfonts/fa-regular-400.svg similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.svg rename to themes/hugo-sustain/static/webfonts/fa-regular-400.svg diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.ttf b/themes/hugo-sustain/static/webfonts/fa-regular-400.ttf similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.ttf rename to themes/hugo-sustain/static/webfonts/fa-regular-400.ttf diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.woff b/themes/hugo-sustain/static/webfonts/fa-regular-400.woff similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.woff rename to themes/hugo-sustain/static/webfonts/fa-regular-400.woff diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.woff2 b/themes/hugo-sustain/static/webfonts/fa-regular-400.woff2 similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-regular-400.woff2 rename to themes/hugo-sustain/static/webfonts/fa-regular-400.woff2 diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.eot b/themes/hugo-sustain/static/webfonts/fa-solid-900.eot similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.eot rename to themes/hugo-sustain/static/webfonts/fa-solid-900.eot diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.svg b/themes/hugo-sustain/static/webfonts/fa-solid-900.svg similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.svg rename to themes/hugo-sustain/static/webfonts/fa-solid-900.svg diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.ttf b/themes/hugo-sustain/static/webfonts/fa-solid-900.ttf similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.ttf rename to themes/hugo-sustain/static/webfonts/fa-solid-900.ttf diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.woff b/themes/hugo-sustain/static/webfonts/fa-solid-900.woff similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.woff rename to themes/hugo-sustain/static/webfonts/fa-solid-900.woff diff --git a/themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.woff2 b/themes/hugo-sustain/static/webfonts/fa-solid-900.woff2 similarity index 100% rename from themes/hugo-sustain/static/css/fontawesome/webfonts/fa-solid-900.woff2 rename to themes/hugo-sustain/static/webfonts/fa-solid-900.woff2 diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.eot b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.eot similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.eot rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.eot diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.svg b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.svg similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.svg rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.svg diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.ttf b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.ttf similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.ttf rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.ttf diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.woff b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.woff similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.woff rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.woff diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.woff2 b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.woff2 similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-200.woff2 rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-200.woff2 diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.eot b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.eot similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.eot rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.eot diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.svg b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.svg similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.svg rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.svg diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.ttf b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.ttf similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.ttf rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.ttf diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.woff b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.woff similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.woff rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.woff diff --git a/themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.woff2 b/themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.woff2 similarity index 100% rename from themes/hugo-sustain/static/fonts/source-sans-pro-v11-latin-regular.woff2 rename to themes/hugo-sustain/static/webfonts/source-sans-pro-v11-latin-regular.woff2