Add a 'draft link' shortcode
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
f931e6eceb
commit
8c3d93bc2d
|
@ -160,6 +160,10 @@ a {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.draft-link {
|
||||||
|
border-bottom: .2rem solid $border-color;
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
6
layouts/shortcodes/draftlink.html
Normal file
6
layouts/shortcodes/draftlink.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{- $page := site.GetPage (.Get 1) -}}
|
||||||
|
{{- if $page -}}
|
||||||
|
<a href="{{ $page.RelPermalink }}">{{ .Get 0 }}</a>
|
||||||
|
{{- else -}}
|
||||||
|
<span class="draft-link">{{ .Get 0 }} (coming soon)</span>
|
||||||
|
{{- end -}}
|
Loading…
Reference in New Issue
Block a user