hugo-book
This commit is contained in:
12
themes/hugo-book/layouts/shortcodes/button.html
Normal file
12
themes/hugo-book/layouts/shortcodes/button.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ $ref := "" }}
|
||||
{{ $target := "" }}
|
||||
{{ with .Get "href" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ end }}
|
||||
{{ with .Get "relref" }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</a>
|
||||
Reference in New Issue
Block a user