revises post navigation
This commit is contained in:
parent
1b279c5b8e
commit
0a6bbc3630
6 changed files with 82 additions and 65 deletions
|
@ -1,14 +1,14 @@
|
||||||
{{ $enabledPostNavigation := .Site.Params.postNavigation | default true }}
|
{{ $enabledPostNavigation := .Site.Params.postNavigation | default true }}
|
||||||
{{ if $enabledPostNavigation }}
|
{{ if $enabledPostNavigation }}
|
||||||
<div class="post--navigation post--navigation-single">
|
<div class="navigation navigation-single">
|
||||||
{{ with .PrevInSection }}
|
{{ with .PrevInSection }}
|
||||||
<a href="{{ .RelPermalink }}" class="post--navigation-prev">
|
<a href="{{ .RelPermalink }}" class="navigation-prev">
|
||||||
<i aria-hidden="true" class="fa fa-chevron-left"></i>
|
<i aria-hidden="true" class="fa fa-chevron-left"></i>
|
||||||
<span class="navigation-tittle">{{ .Title }}</span>
|
<span class="navigation-tittle">{{ .Title }}</span>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .NextInSection }}
|
{{ with .NextInSection }}
|
||||||
<a href="{{ .RelPermalink }}" class="post--navigation-next">
|
<a href="{{ .RelPermalink }}" class="navigation-next">
|
||||||
<span class="navigation-tittle">{{ .Title }}</span>
|
<span class="navigation-tittle">{{ .Title }}</span>
|
||||||
<i aria-hidden="true" class="fa fa-chevron-right"></i>
|
<i aria-hidden="true" class="fa fa-chevron-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
@import 'hyde-hyde/post';
|
@import 'hyde-hyde/post';
|
||||||
@import 'hyde-hyde/code';
|
@import 'hyde-hyde/code';
|
||||||
@import 'hyde-hyde/gist';
|
@import 'hyde-hyde/gist';
|
||||||
|
@import 'hyde-hyde/navigation';
|
||||||
@import 'hyde-hyde/taxonomies';
|
@import 'hyde-hyde/taxonomies';
|
||||||
@import 'hyde-hyde/project';
|
@import 'hyde-hyde/project';
|
||||||
@import 'hyde-hyde/responsive';
|
@import 'hyde-hyde/responsive';
|
||||||
|
|
66
static-src/scss/hyde-hyde/_navigation.scss
Normal file
66
static-src/scss/hyde-hyde/_navigation.scss
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
ul.pagination {
|
||||||
|
list-style: none;
|
||||||
|
li.page-item {
|
||||||
|
display: inline-block;
|
||||||
|
a {
|
||||||
|
padding: 0.05em 0.25em;
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
a {
|
||||||
|
color: $navigation-color;
|
||||||
|
border-bottom: 3px solid $navigation-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigation {
|
||||||
|
max-width: calc(100% - 0px);
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 60px;
|
||||||
|
a {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 15px;
|
||||||
|
color: $navigation-color;
|
||||||
|
border: 2px solid $navigation-color;
|
||||||
|
line-height: 1.25;
|
||||||
|
text-transform: uppercase;
|
||||||
|
&:hover {
|
||||||
|
padding: 14px;
|
||||||
|
border-width: 3px;
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
&:first-child:last-child {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.fa {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
.navigation-prev {
|
||||||
|
text-align: left;
|
||||||
|
.fa {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
.navigation-tittle {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navigation-next {
|
||||||
|
text-align: right;
|
||||||
|
.fa {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.navigation-tittle {
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navigation-single a {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
|
@ -35,58 +35,6 @@
|
||||||
padding: 0 0 1rem 0;
|
padding: 0 0 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post--navigation {
|
|
||||||
width: 800px;
|
|
||||||
max-width: calc(100% - 0px);
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-top: 60px;
|
|
||||||
a {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 15px;
|
|
||||||
color: $post--navigation-color;
|
|
||||||
border: 2px solid $post--navigation-color;
|
|
||||||
line-height: 1.25;
|
|
||||||
text-transform: uppercase;
|
|
||||||
&:hover {
|
|
||||||
padding: 14px;
|
|
||||||
border-width: 3px;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
&:first-child:last-child {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.fa {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
.post--navigation-prev {
|
|
||||||
text-align: left;
|
|
||||||
.fa {
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
.navigation-tittle {
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.post--navigation-next {
|
|
||||||
text-align: right;
|
|
||||||
.fa {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
.navigation-tittle {
|
|
||||||
padding-right: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.post--navigation-single a {
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#references {
|
#references {
|
||||||
li {
|
li {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
.project__title {
|
.project__title {
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
.post--navigation {
|
.navigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
a {
|
a {
|
||||||
|
|
|
@ -19,12 +19,14 @@ $blue: #268bd2;
|
||||||
$brown: #8f5536;
|
$brown: #8f5536;
|
||||||
|
|
||||||
//https://www.client9.com/css-system-font-stack-sans-serif-v3
|
//https://www.client9.com/css-system-font-stack-sans-serif-v3
|
||||||
$root-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Droid Sans", "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
|
$root-font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Droid Sans", "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
|
||||||
// poole's variables
|
// poole's variables
|
||||||
$root-font-size: 18px;
|
$root-font-size: 20px;
|
||||||
$root-font-weight: 400;
|
$root-font-weight: 400;
|
||||||
$root-line-height: 30px; // golden ratio https://grtcalculator.com
|
// golden ratio https://grtcalculator.com
|
||||||
|
// 18px @ 33 px, 20px @ 33 px ~ 1.667em
|
||||||
|
$root-line-height: 1.667em;
|
||||||
|
|
||||||
$body-color: $gray-8;
|
$body-color: $gray-8;
|
||||||
$body-bg: #fff;
|
$body-bg: #fff;
|
||||||
|
@ -32,12 +34,12 @@ $body-bg: #fff;
|
||||||
$border-color: #e5e5e5;
|
$border-color: #e5e5e5;
|
||||||
|
|
||||||
$large-breakpoint: 38em;
|
$large-breakpoint: 38em;
|
||||||
$large-font-size: 20px;
|
$large-font-size: 18px;
|
||||||
//
|
//
|
||||||
|
|
||||||
// hyde-hyde
|
// hyde-hyde
|
||||||
$small-device-font-size: 16px;
|
$small-device-font-size: 16px;
|
||||||
$large-device-font-size: 18px;
|
$large-device-font-size: $root-font-size;
|
||||||
|
|
||||||
// https://www.client9.com/css-system-font-stack-monospace-v2
|
// https://www.client9.com/css-system-font-stack-monospace-v2
|
||||||
$code-font-family: "SF-Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace;
|
$code-font-family: "SF-Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace;
|
||||||
|
@ -52,7 +54,7 @@ $link-color: $blue;
|
||||||
$link-hover-color: $body-color;
|
$link-hover-color: $body-color;
|
||||||
|
|
||||||
// section
|
// section
|
||||||
$section__title-font-size: 2.15rem;
|
$section__title-font-size: 2.15rem;
|
||||||
|
|
||||||
// post
|
// post
|
||||||
$post__subtitle-font-size: 1.5rem;
|
$post__subtitle-font-size: 1.5rem;
|
||||||
|
@ -89,8 +91,8 @@ $sidebar-color: #300030;
|
||||||
$site__title-font-size: 3rem;
|
$site__title-font-size: 3rem;
|
||||||
$copyright-font-size: 0.7rem;
|
$copyright-font-size: 0.7rem;
|
||||||
|
|
||||||
// post navigation
|
// navigation
|
||||||
$post--navigation-color: #c2255c;
|
$navigation-color: #c2255c;
|
||||||
|
|
||||||
// portfolio
|
// portfolio
|
||||||
$project__title-font-size: $h2-font-size;
|
$project__title-font-size: $h2-font-size;
|
||||||
|
|
Loading…
Reference in a new issue