Skip to content

Commit

Permalink
fix mobile-nav bug and remove css,js to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
zzsqwq committed May 1, 2022
1 parent d3877a4 commit c682a98
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions static/css/style.css → assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ blockquote p {
}
@media (min-width: 34em) {
.page {
width: 82.5%;
width: calc(98% - 165px);
float: right;
margin-right: 0;
/* -webkit-box-shadow: 0 4px 8px 6px rgba(7,17,27,0.06); */
Expand Down Expand Up @@ -485,7 +485,7 @@ blockquote p {
@media (min-width: 34em) {
.side-card {
width: 15.25424%;
min-width: 165px;
width: 165px;
float: left;
margin-right: 1.69492%;
opacity: 0.75;
Expand Down
File renamed without changes.
18 changes: 17 additions & 1 deletion layouts/partials/mobile-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@
<ul class="nav_items">
{{range sort .Site.Params.menu "weight" }}
<li class="nav_item">
<a class="nav-page" href="{{.url}}">{{ title .name}}</a>
{{if in .url "#"}}
{{ $new_url := replace .url " " "-"}}
<a class="nav-page" href="{{ index (apply (slice (lower $new_url)) (.Params.urlFunc | default "relLangURL") ".") 0 }}">{{ title .name}}</a>
{{else}}
<a class="nav-page" href="{{ index (apply (slice .URL) (.Params.urlFunc | default "relLangURL") ".") 0 }}">{{ title .name}}</a>
{{end}}
</li>
{{end}}
{{ if .Site.IsMultiLingual }}
{{ $node := . }}
{{ .Scratch.Set "separator" true }}
{{ range (default .Site.Home.AllTranslations .Translations) }}
{{ if ne $.Site.Language .Language }}
<li class="nav-page">
<a href="{{ .Permalink }}">{{ .Language.LanguageName | emojify }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
<div class="cd-top"><i class="fa fa-arrow-up" aria-hidden="true"></i></div>
Expand Down

0 comments on commit c682a98

Please sign in to comment.