diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-12-23 13:47:44 -0330 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-12-23 13:47:44 -0330 |
| commit | 536494b1e9bd5eda363837faacbed0ad46bfc5ae (patch) | |
| tree | f6605c4c2c0a04923128090a4c232cdc62b112ca | |
| parent | ad1bb9787eb2317571cd3d1bfcd5a8b22df4803f (diff) | |
| download | samanthony.xyz-536494b1e9bd5eda363837faacbed0ad46bfc5ae.zip | |
theme: css and nav
| -rw-r--r-- | hugo.toml | 2 | ||||
| -rw-r--r-- | themes/aoidh/assets/css/aoidh.css | 87 | ||||
| -rw-r--r-- | themes/aoidh/assets/css/main.css | 22 | ||||
| -rw-r--r-- | themes/aoidh/layouts/_partials/head/css.html | 10 | ||||
| -rw-r--r-- | themes/aoidh/layouts/_partials/menu.html | 25 | ||||
| -rw-r--r-- | themes/aoidh/layouts/baseof.html | 1 |
6 files changed, 99 insertions, 48 deletions
@@ -2,3 +2,5 @@ baseURL = 'https://www.samanthony.xyz/' languageCode = 'en-us' title = "Sam Anthony's Webpage" theme = 'aoidh' +[params] + author = "Sam Anthony" diff --git a/themes/aoidh/assets/css/aoidh.css b/themes/aoidh/assets/css/aoidh.css new file mode 100644 index 0000000..5307ee0 --- /dev/null +++ b/themes/aoidh/assets/css/aoidh.css @@ -0,0 +1,87 @@ +:root { + --paper-color: #ffffea; + --dark-yellow: #99994c; + --light-blue: #eaffff; + --dark-blue: #8888cc; + --light-gray: #eee; + --dark-gray: #888; +} + +html { + background: var(--light-gray); +} + +body { + display: block; + float: none; + margin-left: auto; + margin-right: auto; + line-height: 1.5rem; + max-width: 60rem; + margin-top: 2rem; + margin-bottom: 2rem; + padding: .5rem 1rem .25rem; + border: 1px solid var(--dark-gray); + box-shadow: 2px 2px var(--dark-yellow); +} + +body { + font-family: serif; + text-rendering: optimizeLegibility; + color: #000; + background: #fff; +} + +header { + margin-bottom: 2rem; +} + +nav { + display: block; +} + +nav ul { + display: flex; + list-style-type: none; +} + +nav a { + color: #000; + background: #fff; + padding: .2rem 1.5rem .2rem 1.5rem; + margin: .1rem 0 .1rem 1rem; + border: .1rem solid var(--dark-blue); + box-shadow: .1rem .1rem var(--dark-blue); +} + +nav li:first-child a { + margin-left: 0; +} + +nav a:hover, nav a:focus { + color: #000; + background: var(--light-blue); +} + +nav a:active { + color: #000; + background: #fff; + box-shadow: 0 0; +} + +ul { + padding: 0; +} + +p { + text-align: justify; + max-width: 40rem; +} + +a { + text-decoration: none; +} + +p a { + text-decoration: underline; +} diff --git a/themes/aoidh/assets/css/main.css b/themes/aoidh/assets/css/main.css deleted file mode 100644 index 166ade9..0000000 --- a/themes/aoidh/assets/css/main.css +++ /dev/null @@ -1,22 +0,0 @@ -body { - color: #222; - font-family: sans-serif; - line-height: 1.5; - margin: 1rem; - max-width: 768px; -} - -header { - border-bottom: 1px solid #222; - margin-bottom: 1rem; -} - -footer { - border-top: 1px solid #222; - margin-top: 1rem; -} - -a { - color: #00e; - text-decoration: none; -} diff --git a/themes/aoidh/layouts/_partials/head/css.html b/themes/aoidh/layouts/_partials/head/css.html index d76d23a..dec8013 100644 --- a/themes/aoidh/layouts/_partials/head/css.html +++ b/themes/aoidh/layouts/_partials/head/css.html @@ -1,9 +1,3 @@ -{{- with resources.Get "css/main.css" }} - {{- if hugo.IsDevelopment }} - <link rel="stylesheet" href="{{ .RelPermalink }}"> - {{- else }} - {{- with . | minify | fingerprint }} - <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> - {{- end }} - {{- end }} +{{- with resources.Get "css/aoidh.css" }} + <link rel="stylesheet" href="{{ .RelPermalink }}"> {{- end }} diff --git a/themes/aoidh/layouts/_partials/menu.html b/themes/aoidh/layouts/_partials/menu.html index 14245b5..485fe0b 100644 --- a/themes/aoidh/layouts/_partials/menu.html +++ b/themes/aoidh/layouts/_partials/menu.html @@ -21,26 +21,15 @@ Renders a menu for the given menu ID. {{- define "_partials/inline/menu/walk.html" }} {{- $page := .page }} {{- range .menuEntries }} - {{- $attrs := dict "href" .URL }} - {{- if $page.IsMenuCurrent .Menu . }} - {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} - {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} - {{- end }} - {{- $name := .Name }} - {{- with .Identifier }} - {{- with T . }} - {{- $name = . }} - {{- end }} - {{- end }} <li> <a - {{- range $k, $v := $attrs }} - {{- with $v }} - {{- printf " %s=%q" $k $v | safeHTMLAttr }} - {{- end }} - {{- end -}} - >{{ $name }}</a> + {{ if $page.IsMenuCurrent .Menu . }} + class="nav-active" + {{ else if $page.HasMenuCurrent .Menu . }} + class="nav-ancestor" + {{ end }} + {{ printf "href=%q" .URL | safeHTMLAttr }} + >{{ .Name }}</a> {{- with .Children }} <ul> {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} diff --git a/themes/aoidh/layouts/baseof.html b/themes/aoidh/layouts/baseof.html index 39dcbec..1b58fdc 100644 --- a/themes/aoidh/layouts/baseof.html +++ b/themes/aoidh/layouts/baseof.html @@ -10,6 +10,7 @@ <main> {{ block "main" . }}{{ end }} </main> + <hr> <footer> {{ partial "footer.html" . }} </footer> |