Reposition theme button

This commit is contained in:
Gabriel Arazas 2023-02-24 20:22:52 +08:00
parent 657fb2c1a3
commit 1f42703979
3 changed files with 19 additions and 15 deletions

View File

@ -1,12 +1,13 @@
nav[aria-label="Site header"] { [aria-label="Site header"] {
@include header-link-hover-style; @include header-link-hover-style;
position: relative;
a { a {
color: var(--base06); color: var(--base06);
} }
} }
footer[aria-label="Site footer"] { [aria-label="Site footer"] {
> * { > * {
margin-top: 1em; margin-top: 1em;
margin-bottom: 0; margin-bottom: 0;
@ -63,12 +64,13 @@ footer[aria-label="Site footer"] {
} }
.site__theme-btn { .site__theme-btn {
background: var(--background);
padding: 0.5em; padding: 0.5em;
position: relative; position: absolute;
float: right; top: 0;
right: 0;
&:hover { &:hover {
color: unset;
& .site__theme-dropdown { & .site__theme-dropdown {
display: unset; display: unset;
} }

View File

@ -4,7 +4,6 @@
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
</head> </head>
<body> <body>
{{- partial "components/theme-button.html" . }}
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<hr aria-hidden="true"/> <hr aria-hidden="true"/>
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}

View File

@ -1,10 +1,13 @@
<nav aria-label="Site header"> <div aria-label="Site header">
<a class="site__title" href="{{ "" | absLangURL }}">{{ $.Site.Title }}</a> <nav>
<div class="list site__links"> <a class="site__title" href="{{ "" | absLangURL }}">{{ $.Site.Title }}</a>
{{ with $.Site.Menus.main }} <div class="list site__links">
{{ range . -}} {{ with $.Site.Menus.main }}
<a href="{{ .URL | absLangURL }}">{{- .Name -}}</a> {{ range . -}}
<a href="{{ .URL | absLangURL }}">{{- .Name -}}</a>
{{ end }}
{{ end }} {{ end }}
{{ end }} </div>
</div> </nav>
</nav> {{- partial "components/theme-button.html" . }}
</div>