Skip to content

Commit

Permalink
maybe finish first version
Browse files Browse the repository at this point in the history
  • Loading branch information
zzsqwq committed Apr 20, 2022
1 parent ffe4be9 commit 8f200ae
Show file tree
Hide file tree
Showing 8 changed files with 718 additions and 720 deletions.
3 changes: 2 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

<main id="page_main">
{{partial "side-bar" .}}
{{block "content" .}}{{end}}
{{block "content" .}}
{{end}}
</main>

{{partial "mobile-nav" .}}
Expand Down
18 changes: 0 additions & 18 deletions layouts/_default/list.html

This file was deleted.

3 changes: 1 addition & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{define "content"}}
<div class="page" itemscope="itemscope" itemtype="http://schema.org/CreativeWork">
<h2 class="page-title">{{.Title}}</h2>
<article>{{.Content}}</article>
{{partial "page" .}}
</div>
{{end}}
4 changes: 3 additions & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{define "content"}}
<div class="page" itemscope="itemscope" itemtype="http://schema.org/CreativeWork">
{{range .Site.Pages }}
<a href="{{.Permalink}}">{{.Content}}</a>
{{if .Params.homepage }}
{{partial "page" .}}
{{end}}
{{end}}
</div>
{{end}}
7 changes: 7 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
<button class="menus_icon">
<div class="navicon"></div>
</button>
<ul class="menus_items">
{{range sort .Site.Params.menu "weight" }}
<li class="menus_items">
<a class="site-page" href="{{.url | safeURL}}">{{title .name}}</a>
</li>
{{end}}
</ul>

</div>
4 changes: 2 additions & 2 deletions layouts/partials/mobile-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="navicon"></div>
</button>
<ul class="nav_items">
{{range $key, $value := .Site.Params.menu}}
{{range sort .Site.Params.menu "weight" }}
<li class="nav_item">
<a class="nav-page" href="{{$value}}">{{$key}}</a>
<a class="nav-page" href="{{.url}}">{{title .name}}</a>
</li>
{{end}}
</ul>
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h2 class="page-title">{{.Title}}</h2>
<article>
{{.Content}}
</article>
Loading

0 comments on commit 8f200ae

Please sign in to comment.