diff --git a/Makefile b/Makefile index cafbd26..94d3e0f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ clean: rm -rf $(OUTPUT_DIR) .hintrc-local lint-css: - stylelint $(CSS_DIR)/main.css $(CSS_DIR)/dark.css $(CSS_DIR)/narrow.css + stylelint $(CSS_DIR)/main.css $(CSS_DIR)/dark.css $(CSS_DIR)/wide.css csslint $(CSS_DIR) lint: lint-css hugo .hintrc-local diff --git a/themes/etch-custom/assets/css/main.css b/themes/etch-custom/assets/css/main.css index 0d94335..f08af62 100644 --- a/themes/etch-custom/assets/css/main.css +++ b/themes/etch-custom/assets/css/main.css @@ -6,12 +6,13 @@ html { body { margin: 0 auto; - max-width: 1000px; - padding: 2rem 5rem; + max-width: 50rem; + padding: 2rem; } header nav { - display: inline-block; + display: block; + padding: 0 0 0.25rem; } header nav ul { @@ -22,14 +23,14 @@ header nav ul { } header nav ul li { - display: inline; - padding: 0 0.25rem; + display: block; + padding: 0.5rem 0.25rem; } .home { font-size: 1.5rem; font-weight: bold; - padding: 0 0.4rem 0 0; + padding: 0 0.4rem 1rem 0; } /* index.html styles */ diff --git a/themes/etch-custom/assets/css/narrow.css b/themes/etch-custom/assets/css/narrow.css deleted file mode 100644 index 77e4193..0000000 --- a/themes/etch-custom/assets/css/narrow.css +++ /dev/null @@ -1,20 +0,0 @@ -@media (max-width: 600px) { - body { - max-width: 500px; - padding: 2rem 5%; - } - - header nav { - display: block; - padding: 0 0 0.25rem; - } - - header nav ul li { - display: block; - padding: 0.5rem 0.25rem; - } - - .home { - padding-bottom: 1rem; - } -} diff --git a/themes/etch-custom/assets/css/wide.css b/themes/etch-custom/assets/css/wide.css new file mode 100644 index 0000000..f927705 --- /dev/null +++ b/themes/etch-custom/assets/css/wide.css @@ -0,0 +1,18 @@ +@media (min-width: 32rem) { + body { + padding: 2rem 5%; + } + + header nav { + display: inline-block; + } + + header nav ul li { + display: inline; + padding: 0 0.25rem; + } + + .home { + padding-bottom: 0; + } +} diff --git a/themes/etch-custom/layouts/partials/head.html b/themes/etch-custom/layouts/partials/head.html index b10ebd6..4b7f263 100644 --- a/themes/etch-custom/layouts/partials/head.html +++ b/themes/etch-custom/layouts/partials/head.html @@ -24,7 +24,7 @@ {{ end -}} {{ $resources := slice -}} {{ $resources = $resources | append (resources.Get "/css/main.css") -}} - {{ $resources = $resources | append (resources.Get "/css/narrow.css") -}} + {{ $resources = $resources | append (resources.Get "/css/wide.css") -}} {{ $dark := .Site.Params.dark | default "auto" -}} {{ if not (eq $dark "off") -}} {{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}