Compare commits

..

No commits in common. "ad98c7238d2e893ecd90c2711f92b89cafe15acd" and "e4e2844c3ebad115f9b5de2ef69c6794263f2417" have entirely different histories.

2 changed files with 13 additions and 9 deletions

View file

@ -2,21 +2,21 @@
<div class="header"> <div class="header">
<a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> <a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<nav class="menu"> <ul class="menu">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<div class="menu-item"> <li class="menu-item">
{{ if not .Children }} {{ if not .Children }}
<a href="{{ .URL }}">{{ .Name }}</a> <a href="{{ .URL }}">{{ .Name }}</a>
{{ else }} {{ else }}
<a>{{ .Name }}↓</a> <a>{{ .Name }}↓</a>
<nav class="sub-menu"> <ul class="sub-menu">
{{ range .Children }} {{ range .Children }}
<div class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></div> <li class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }} {{ end }}
</nav> </ul>
{{ end }} {{ end }}
</div> </li>
{{ end }} {{ end }}
</nav> </ul>
</div> </div>
</header> </header>

View file

@ -150,7 +150,6 @@ body {
.main { flex: 0 0 72%; width: 72%; } .main { flex: 0 0 72%; width: 72%; }
.side { flex: 0 0 28%; width: 28%; } .side { flex: 0 0 28%; width: 28%; }
/* mobile layout: place side to bottom */
@media (max-width: 991px) { @media (max-width: 991px) {
.main { padding: var(--len-4); } .main { padding: var(--len-4); }
.side { padding-left: 0; padding-top: var(--len-4); } .side { padding-left: 0; padding-top: var(--len-4); }
@ -184,7 +183,8 @@ body {
/********** set up break point **********/ /********** set up break point **********/
.main-wrapper, .header { max-width: 1140px; } .main-wrapper, .header { max-width: 1320px; }
@media (max-width: 1399px) { .main-wrapper, .header { max-width: 1140px; } }
@media (max-width: 1199px) { .main-wrapper, .header { max-width: 960px; } } @media (max-width: 1199px) { .main-wrapper, .header { max-width: 960px; } }
@media (max-width: 991px) { .main-wrapper, .header { max-width: 720px; } } @media (max-width: 991px) { .main-wrapper, .header { max-width: 720px; } }
@media (max-width: 767px) { .main-wrapper, .header { max-width: 540px; } } @media (max-width: 767px) { .main-wrapper, .header { max-width: 540px; } }
@ -259,6 +259,10 @@ body {
align-items: flex-start; align-items: flex-start;
} }
/* remove the unwanted default css in menus */
.header ul { list-style: none; margin: 0; padding: 0; }
.header li { list-style: none; }
/* set up spacing of menu items in menu and sub-menu */ /* set up spacing of menu items in menu and sub-menu */
.header .menu > * { margin-right: var(--len-3); } .header .menu > * { margin-right: var(--len-3); }
.header .menu > *:last-child { margin-right: 0; } .header .menu > *:last-child { margin-right: 0; }