Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/saadnpq/npq-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsaadnpq <saadnpq@localhost.localdomain>2020-04-11 16:52:56 +0300
committersaadnpq <saadnpq@localhost.localdomain>2020-04-11 16:52:56 +0300
commitfec458c8715852f70f558c250231c53b1b0a1b60 (patch)
tree44de55b7ecb7ab4b627ba1954688f692c5119492
parent7c5e438af0a3602003917ac661f61e2134099b40 (diff)
support default example site
-rw-r--r--layouts/index.html3
-rw-r--r--layouts/partials/aside.html15
-rw-r--r--static/css/style.css2
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;