change post nav and footer style

This commit is contained in:
Reorx 2022-04-22 01:09:19 +08:00
parent 7d6dfd7ebc
commit 4d93247e53
5 changed files with 22 additions and 24 deletions

View File

@ -5,6 +5,7 @@
max-width: calc(var(--main-width) + var(--gap) * 2); max-width: calc(var(--main-width) + var(--gap) * 2);
margin: auto; margin: auto;
padding: var(--gap); padding: var(--gap);
padding-bottom: 0;
} }
/* for post page */ /* for post page */
.main.post { .main.post {

View File

@ -390,21 +390,11 @@ h6:hover .anchor {
} }
.post-footer { .post-footer {
margin-top: 56px; margin-top: calc(var(--content-gap) * 1.5);
}
.paginav {
border-radius: var(--radius);
background: var(--code-bg);
border: 1px solid var(--border);
}
.paginav a:hover {
background: var(--border);
} }
.share-buttons { .share-buttons {
margin: 14px 0; margin: var(--content-gap) 0;
padding-inline-start: var(--radius); padding-inline-start: var(--radius);
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -453,16 +443,17 @@ h6:hover .anchor {
} }
.paginav { .paginav {
margin: 10px 0; margin: var(--content-gap) 0;
display: flex; display: flex;
line-height: 30px; line-height: 30px;
border-radius: var(--radius); border-radius: var(--radius);
} }
.paginav a { .paginav svg {
padding-inline-start: 14px; width: 1em;
padding-inline-end: 14px; height: 1em;
border-radius: var(--radius); display: inline-block;
vertical-align: -0.125em;
} }
.paginav .title { .paginav .title {
@ -477,7 +468,7 @@ h6:hover .anchor {
width: 50%; width: 50%;
} }
.paginav span:hover:not(.title) { .paginav a:hover span:not(.title) {
box-shadow: 0 1px 0; box-shadow: 0 1px 0;
} }
@ -519,6 +510,7 @@ h6:hover .anchor {
11.1px 11.1px 17.7px -2.5px hsl(var(--shadow-color) / 0.11); 11.1px 11.1px 17.7px -2.5px hsl(var(--shadow-color) / 0.11);
} }
.disqus-container { .disqus-container {
margin: calc(var(--content-gap) * 2) 0;
background-color: var(--code-bg); background-color: var(--code-bg);
border-radius: 10px; border-radius: 10px;
padding: 1.5em; padding: 1.5em;

View File

@ -5,7 +5,7 @@
--main-width: 720px; --main-width: 720px;
--post-width: 800px; --post-width: 800px;
--header-height: 60px; --header-height: 60px;
--footer-height: 60px; --footer-height: 80px;
--radius: 8px; --radius: 8px;
--theme: rgb(255, 255, 255); --theme: rgb(255, 255, 255);

View File

@ -50,12 +50,12 @@
{{- end }} {{- end }}
<footer class="post-footer"> <footer class="post-footer">
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}} {{- partial "share_icons.html" . -}}
{{- end }} {{- end }}
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
</footer> </footer>
{{- if (.Param "comments") }} {{- if (.Param "comments") }}

View File

@ -3,14 +3,19 @@
<nav class="paginav"> <nav class="paginav">
{{- with $pages.Next . }} {{- with $pages.Next . }}
<a class="prev" href="{{ .Permalink }}"> <a class="prev" href="{{ .Permalink }}">
<span class="title">« {{ i18n "prev_page" }}</span> <span class="title">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left" style="user-select: text;"><line x1="19" y1="12" x2="5" y2="12" style="user-select: text;"></line><polyline points="12 19 5 12 12 5" style="user-select: text;"></polyline></svg>&nbsp;
{{- i18n "prev_page" }}</span>
<br> <br>
<span>{{- .Name -}}</span> <span>{{- .Name -}}</span>
</a> </a>
{{- end }} {{- end }}
{{- with $pages.Prev . }} {{- with $pages.Prev . }}
<a class="next" href="{{ .Permalink }}"> <a class="next" href="{{ .Permalink }}">
<span class="title">{{ i18n "next_page" }} »</span> <span class="title">
{{- i18n "next_page" -}}
&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right" style="user-select: text;"><line x1="5" y1="12" x2="19" y2="12" style="user-select: text;"></line><polyline points="12 5 19 12 12 19" style="user-select: text;"></polyline></svg>
</span>
<br> <br>
<span>{{- .Name -}}</span> <span>{{- .Name -}}</span>
</a> </a>