Add nav-bar to each tutorial page (next, previous)

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2022-04-30 12:10:59 +02:00
parent 2e3bff468a
commit 20dcd73340
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
4 changed files with 64 additions and 6 deletions

View File

@ -93,7 +93,7 @@ th {
color: map-get($theme-colors, "main-sec"); color: map-get($theme-colors, "main-sec");
} }
.copyright, { .copyright {
color: map-get($theme-colors, "copyright"); color: map-get($theme-colors, "copyright");
} }
@ -104,10 +104,23 @@ th {
background: #181818; background: #181818;
} }
.post-preview .meta {
border-bottom: 1px solid #303030;
}
.post-preview .title a { .post-preview .title a {
color: map-get($theme-colors, "main-sec"); color: map-get($theme-colors, "main-sec");
} }
.post-footer-data {
background-color: #0a0a0a;
border-bottom: 1px solid #303030;
}
.post-footer hr {
color: #303030;
}
.rmore { .rmore {
color: map-get($theme-colors, "main-text"); color: map-get($theme-colors, "main-text");
} }
@ -133,10 +146,6 @@ th {
color: map-get($theme-colors, "main-sec"); color: map-get($theme-colors, "main-sec");
} }
table.stats td.graph div {
background-color: map-get($theme-colors, "main-sec");
}
.content-list .archive-list a:hover { .content-list .archive-list a:hover {
filter: brightness(1.2); filter: brightness(1.2);
} }

View File

@ -7,7 +7,7 @@
<div class="content-list"> <div class="content-list">
<ul class="archive-list"> <ul class="archive-list">
{{ range sort .Data.Pages ".Params.number" }} {{ range (.Pages.ByParam "number") }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
</li> </li>

View File

@ -3,6 +3,23 @@
<article class="post"> <article class="post">
<h1 class="title"> {{ .Title }} </h1> <h1 class="title"> {{ .Title }} </h1>
<div class="content"> {{ .Content }} </div> <div class="content"> {{ .Content }} </div>
<footer class="post-footer">
<div class="post-footer-data">
<div class="nav-bar">
{{ $pages := where site.RegularPages "Section" .Section }}
{{ with ($pages.ByParam "number").Reverse.Prev . }}
<a class="link-previous" title="{{ .Title }}" href="{{ .Permalink }}">&lt;&lt; Previous</a>
{{ end }}
{{ with ($pages.ByParam "number").Reverse.Next . }}
<a class="link-next" title="{{ .Title }}" href="{{ .Permalink }}">Next &gt;&gt;</a>
{{ end }}
</div>
</div>
</footer>
</article> </article>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -192,6 +192,38 @@ th, td {
.post .content p{ .post .content p{
} }
.post-footer-data {
padding: 1em;
}
.post-footer hr {
width: 100%;
}
.post-footer .nav-bar {
display: table;
width: 100%;
}
.post-footer .nav-bar .link-next {
text-align: right;
display: table-cell;
float: none;
width: 50%;
}
.post-footer .nav-bar .link-previous {
text-align: left;
display: table-cell;
float: none;
width: 50;
}
.post-footer-menu {
justify-content: space-between;
font-size: 0.8em;
margin: 0.5em 4em;
}
.post-prev a { .post-prev a {
text-decoration: none; text-decoration: none;