diff --git a/README.md b/README.md index 1223db6..30d7bb1 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ In the `params` section of your config, you can enable a dark header style with ## Sidebar -Instead of the horizontal menu, a sidebar can be enabled with `sidebar = true`. See [here](https://niklasbuschmann.github.io/contrast/) for an example of the sidebar in action. +Instead of the horizontal menu, a sidebar can be enabled with `sidebar = true`. See [here](https://niklasbuschmann.github.io/contrast/) for an example of the sidebar in action. Adding a `hidden` class to the icon tag will hide the icon on mobile devices. -An example configuration could look like this: +An example `config.yaml` could look like this: ```yaml params: @@ -35,23 +35,22 @@ menu: name = "Home" url = "/" weight = 1 - pre = "" + pre = "" - identifier = "about" name = "About" url = "/about/" weight = 2 - pre = "" - external: + pre = "" - identifier = "github" name = "Github" url = "https://github.com/" weight = 3 - pre = "" + pre = "" - identifier = "feed" name = "Subscribe" url = "/index.xml" weight = 4 - pre = "" + pre = "" ``` ## Features diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5982c66..ac31931 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,6 +7,9 @@ {{- end }} +{{- if .Site.Params.fontawesome }} +{{ partial "font-awesome.html" . }} +{{- end }} @@ -15,9 +18,6 @@ {{- end }} -{{- if .Site.Params.fontawesome }} -{{ partial "font-awesome.html" . }} -{{- end }} {{- if or .Params.math .Site.Params.math }} {{ partial "math.html" . }} {{- end }} @@ -26,7 +26,7 @@ {{ $url := .RelPermalink }} {{ if not .Site.Params.hidetitle }}{{ .Site.Title }}{{ end }} {{ range .Site.Menus }}{{ end }} - {{ with .Site.Params.description }}{{ end }} + {{ with .Site.Params.description }}{{ end }} {{- block "main" . }}{{- end }} diff --git a/static/css/classes.css b/static/css/classes.css index 5f4ed62..19cf715 100644 --- a/static/css/classes.css +++ b/static/css/classes.css @@ -14,6 +14,16 @@ margin: 0 .2em; } +.full > a { + font-size: 1.5em; + width: 100%; + margin: .1em 0 .6em; +} + +.hidden { + display: none; +} + .fa, .fab, .fad, .fal, .far, .fas { margin-right: .6em; } diff --git a/static/css/sidebar.css b/static/css/sidebar.css index c140012..a076e56 100644 --- a/static/css/sidebar.css +++ b/static/css/sidebar.css @@ -49,7 +49,7 @@ article header h1 { font-size: 2em; } -header [hidden] { +.hidden { display: inline-block; }