enhance inline links

This commit is contained in:
Reorx 2022-09-08 00:47:08 +08:00
parent ea6560465b
commit 51d8dca83c
3 changed files with 23 additions and 9 deletions

View File

@ -79,6 +79,17 @@ mark {
font-size: 14px;
}
.inline-links a {
font-weight: 500;
color: var(--primary);
box-shadow: var(--link-underline-shadow);
transition: var(--link-transition);
}
.inline-links a:hover {
color: var(--link-hover-color);
box-shadow: var(--link-hover-underline-shadow);
}
/* for post page */
.main.post {

View File

@ -13,11 +13,14 @@
{{ .Description | markdownify }}
</div>
{{- end }}
<div class="inline-links">
{{- with .Param "archivesSlug" }}
<div>
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
</div>
{{- end }}
{{ with .OutputFormats.Get "rss" -}}
<a href="{{ .Permalink }}" target="_blank">RSS</a>
{{ end -}}
</div>
</header>
{{- end }}

View File

@ -35,13 +35,13 @@
</div>
<h2>相关链接</h2>
<div>
<div class="inline-links">
{{- with .Param "archivesSlug" }}
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
{{- end }}
{{- with .Param "rssUrl" }}
<a href="{{ site.BaseURL }}{{ . }}">RSS</a>
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
{{- end }}
{{ with .OutputFormats.Get "rss" -}}
<a href="{{ .Permalink }}" target="_blank">RSS</a>
{{ end -}}
</div>
</div>