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; 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 */ /* for post page */
.main.post { .main.post {

View File

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

View File

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