Add the ability for post headers to be links when you add a link parameter to the page front matter
This commit is contained in:
parent
4ca71181c7
commit
d68e76478d
2 changed files with 9 additions and 1 deletions
|
@ -470,6 +470,14 @@ header > span.series::before {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-title h1 > .link-arrow {
|
||||||
|
margin-inline-start: 0.5rem;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.post-title h1 > .link-arrow:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.post-title > .post-date {
|
.post-title > .post-date {
|
||||||
color: var(--light-dim);
|
color: var(--light-dim);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<header>
|
<header>
|
||||||
{{ partial "development/draft_tag.html" . }}
|
{{ partial "development/draft_tag.html" . }}
|
||||||
<div class="post-title">
|
<div class="post-title">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}{{ with .Params.link }}<a class="link-arrow" href="{{ . }}">→</a>{{ end }}</h1>
|
||||||
{{ if not (eq .Section "about") }}
|
{{ if not (eq .Section "about") }}
|
||||||
<div class="post-date"><time>{{ .Date | time.Format "January 2, 2006" }}</time></div>
|
<div class="post-date"><time>{{ .Date | time.Format "January 2, 2006" }}</time></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue