support default example site

This commit is contained in:
saadnpq 2020-04-11 15:52:56 +02:00
parent 7c5e438af0
commit fec458c871
3 changed files with 16 additions and 4 deletions

View file

@ -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 := .}}

View file

@ -1,6 +1,8 @@
<aside id="sidenav">
<header>
{{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>

View file

@ -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;