This commit is contained in:
parent
d31161087e
commit
012aac1464
2 changed files with 77 additions and 86 deletions
|
@ -15,8 +15,8 @@
|
|||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg:black;
|
||||
--text:white;
|
||||
--bg: black;
|
||||
--text: white;
|
||||
--text-pink: var(--text-pink-dark);
|
||||
--text-mauve: var(--text-mauve-dark);
|
||||
}
|
||||
|
@ -44,12 +44,14 @@
|
|||
color:var(--text);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
scrollbar-color: var(--bg);
|
||||
}
|
||||
|
||||
.margin {
|
||||
min-height: 100vh;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -66,7 +68,7 @@ body {
|
|||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
|
||||
header {
|
||||
|
@ -123,70 +125,59 @@ footer {
|
|||
.nav {
|
||||
list-style-type: none;
|
||||
margin: 5pt;
|
||||
display: inline-flex;
|
||||
|
||||
align-items: center;
|
||||
display: flex;
|
||||
padding-left: 5pt;
|
||||
padding-right: 5pt;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
list-style-type: none;
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
width: 50%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 300pt) {
|
||||
.nav {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.nav-left {
|
||||
list-style-type: none;
|
||||
|
||||
.nav-right {
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
width: 50%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 300pt) {
|
||||
.nav {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-left {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
padding-left: 5pt;
|
||||
padding-right: 5pt;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-right: 5pt;
|
||||
padding-left: 5pt;
|
||||
margin-left: 5pt;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
a, label {
|
||||
color: var(--text-mauve);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.toggle-dark {
|
||||
width: auto;
|
||||
padding-right: 20pt;
|
||||
}
|
||||
|
||||
.toggle-dark label {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* resize image that are in main, and center them */
|
||||
main img {
|
||||
max-width: 70%;
|
||||
min-width: 0;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
display: flex;
|
||||
float:none;
|
||||
|
||||
float:none;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,53 +11,53 @@ Renders a menu for the given menu ID.
|
|||
{{- $menuID := .menuID }}
|
||||
|
||||
{{- with index site.Menus $menuID }}
|
||||
<nav>
|
||||
<ul class="nav">
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<ul class="nav">
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{- end }}
|
||||
|
||||
{{- define "partials/inline/menu/walk.html" }}
|
||||
{{- $page := .page }}
|
||||
{{- range .menuEntries }}
|
||||
{{- $href := relLangURL .URL }}
|
||||
{{- $attrs := dict "href" $href }}
|
||||
{{- 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 class="nav-left">
|
||||
<a
|
||||
{{- range $k, $v := $attrs }}
|
||||
{{- with $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
>{{ $name }}</a>
|
||||
{{- with .Children }}
|
||||
<ul>
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</li>
|
||||
<span class="nav-left">
|
||||
{{- $page := .page }}
|
||||
{{- range .menuEntries }}
|
||||
{{- $href := relLangURL .URL }}
|
||||
{{- $attrs := dict "href" $href }}
|
||||
{{- 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>
|
||||
</li>
|
||||
|
||||
{{- end }}
|
||||
<li class="nav-right">
|
||||
<span class="toggle-dark">
|
||||
<label for="color-mode"> {{ i18n "dark-mode" }}</label>
|
||||
</span>
|
||||
<span class="toggle-language">
|
||||
<a href={{ i18n "language-switch" }}> {{ i18n "language" }}</a>
|
||||
</span>
|
||||
<span class="empty-space-menu"></span>
|
||||
</li>
|
||||
{{- end }}
|
||||
</span>
|
||||
<span class="nav-right">
|
||||
<li>
|
||||
<span class="toggle-dark">
|
||||
<label for="color-mode"> {{ i18n "dark-mode" }}</label>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="toggle-language">
|
||||
<a href={{ i18n "language-switch" }}> {{ i18n "language" }}</a>
|
||||
</span>
|
||||
</li>
|
||||
</span>
|
||||
{{- end }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue