diff options
author | saadnpq <saadnpq@localhost.localdomain> | 2020-04-11 16:52:56 +0300 |
---|---|---|
committer | saadnpq <saadnpq@localhost.localdomain> | 2020-04-11 16:52:56 +0300 |
commit | fec458c8715852f70f558c250231c53b1b0a1b60 (patch) | |
tree | 44de55b7ecb7ab4b627ba1954688f692c5119492 | |
parent | 7c5e438af0a3602003917ac661f61e2134099b40 (diff) |
support default example site
-rw-r--r-- | layouts/index.html | 3 | ||||
-rw-r--r-- | layouts/partials/aside.html | 15 | ||||
-rw-r--r-- | static/css/style.css | 2 |
3 files changed, 16 insertions, 4 deletions
diff --git a/layouts/index.html b/layouts/index.html index a936a8d..5ae9ae4 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,8 @@ {{if ne .Site.Params.displayRecent false}} <div class="section"> <div class="section-title">recent</div> - {{range first (default 4 .Site.Params.recentMax) (where .Site.RegularPages "Section" "ne" "posts")}} + {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{range first (default 4 .Site.Params.recentMax) (where $pages "Section" "ne" "posts")}} <div class="list-item"> <a class="entry-title" href="{{ .URL }}">{{ .Title }}</a> {{$page := .}} diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html index 07e3561..8df3e9a 100644 --- a/layouts/partials/aside.html +++ b/layouts/partials/aside.html @@ -1,6 +1,8 @@ <aside id="sidenav"> <header> - <a href="{{ .Site.BaseURL }}"><img src="/avatar.png" alt="avatar"></a> + {{if eq .Site.Params.useAvatar true}} + <a href="{{ .Site.BaseURL }}"><img src="/avatar.png" alt="avatar"></a> + {{end}} <a id="branding" href="{{ .Site.BaseURL }}">{{ .Site.Title | safeHTML }}</a> </header> @@ -12,10 +14,19 @@ target="_blanck" {{end}} > - {{ .Pre }} + {{with .Pre}} + {{ .}} + {{else}} + <i class="far fa-file far-sm"></i> + {{end}} + <span>{{ .Name }}</span> </a> {{end}} + <a href="/tags" > + <i class="fas fa-tags"></i> + <span>tags</span> + </a> <a href="/contact" > <i class="far fa-envelope"></i> <span>contact</span> diff --git a/static/css/style.css b/static/css/style.css index 64fc90a..ef152f5 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -130,7 +130,7 @@ aside nav a:hover { border: 1px solid #3D3D3D; border-radius: 3px; padding: 10px; - background-color:#181B1C; + background-color:rgb(39, 41, 43); } .list-item+.list-item{ margin-top: 10px; |