Commit 69459f22 authored by ∞'s avatar 💻

Refactor menu / fix mobile

parent 1b9448f7
Pipeline #6856 passed with stages
in 3 minutes and 1 second
......@@ -12,15 +12,7 @@ $color5: #81eafd
$color6: #ef64ee
$color7: #ef64ee
header.main-header
position: fixed
top: 0
left: 1em
right: 0
background-color: white
main
margin-top: 8vh
max-width: 80em
margin: 0 1em
border-radius: 20px
......@@ -117,28 +109,40 @@ img
max-width: 100%
height: auto
.main-header
padding: 0 2em
.container
display: flex
align-items: center
justify-content: space-between
flex-wrap: wrap
@media screen and (min-width: 1100px)
main
margin: 3.5em auto
max-width: 1100px
margin-top: 8vh
.main-nav
ul
text-align: center
header.main-header
position: fixed
top: 0
left: 0
right: 0
background-color: white
li
display: inline
font-family: 'Press Start 2P'
@include font-size(1rem)
img
margin-left: 1em
a
display: inline-block
padding: .3em .5em
text-decoration: none
color: $color6
.main-header
display: flex
align-items: center
justify-content: space-between
flex-wrap: wrap
.main-nav
ul
text-align: center
li
display: inline
font-family: 'Press Start 2P'
@include font-size(1rem)
a
display: inline-block
padding: .3em .5em
text-decoration: none
color: $color6
footer
background-color: #000A
......@@ -181,11 +185,6 @@ footer
.articles li
list-style-type: none
@media screen and (min-width: 1100px)
main
margin: 3.5em auto
max-width: 1100px
.icon
vertical-align: middle
width: 45px
......
<header class="main-header">
<div class="container">
<a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
<img src="/logo.png" width="170" height="95" alt="{{ .Site.Title }}">
</a>
{{ with .Site.Menus.main }}
<nav class="main-nav">
<ul class="main-nav-list">
{{ range . }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
<a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
<img src="/logo.png" width="170" height="95" alt="{{ .Site.Title }}">
</a>
{{ with .Site.Menus.main }}
<nav class="main-nav">
<ul class="main-nav-list">
{{ range . }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
{{ if .Site.IsMultiLingual }}
{{ if ge (len .Site.Languages) 3 }}
<li>
<a>{{ i18n "languageSwitcherLabel" }}</a>
<div>
{{ range .Site.Languages }}
{{ if not (eq .Lang $.Site.Language.Lang) }}
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
{{ end }}
{{ end }}
{{ if .Site.IsMultiLingual }}
{{ if ge (len .Site.Languages) 3 }}
<li>
<a>{{ i18n "languageSwitcherLabel" }}</a>
<div>
{{ range .Site.Languages }}
{{ if not (eq .Lang $.Site.Language.Lang) }}
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
{{ end }}
</div>
</li>
{{ else }}
<li>
{{ range .Site.Languages }}
{{ if not (eq .Lang $.Site.Language.Lang) }}
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
{{ end }}
{{ end }}
</div>
</li>
{{ else }}
<li>
{{ range .Site.Languages }}
{{ if not (eq .Lang $.Site.Language.Lang) }}
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
{{ end }}
</li>
{{ end }}
</ul>
</nav>
{{ end }}
</div>
{{ end }}
</li>
{{ end }}
</ul>
</nav>
{{ end }}
</header>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment