Only use link color on elements with 'href', plus some cleanup
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
{{- $style := default "default" (.Get "style") -}}
|
||||
{{- if .Get "href" }}
|
||||
<a href="{{ .Get "href" }}" target="_blank" class="book-badge {{ $style }}">
|
||||
{{- with .Get "title" }}<span class="book-badge-title">{{ . | plainify }}</span>{{ end -}}
|
||||
{{- with .Get "value" }}<span class="book-badge-value">{{ . | plainify }}</span>{{ end -}}
|
||||
</a>
|
||||
{{ else }}
|
||||
<span class="book-badge {{ $style }}">
|
||||
{{- with .Get "title" }}<span class="book-badge-title">{{ . | plainify }}</span>{{ end -}}
|
||||
{{- with .Get "value" }}<span class="book-badge-value">{{ . | plainify }}</span>{{ end -}}
|
||||
</span>
|
||||
{{ end -}}
|
||||
</span>
|
||||
@@ -16,7 +16,6 @@
|
||||
}
|
||||
{{ end }}</style>{{ end -}}
|
||||
<div class="book-columns book-columns-{{ .Ordinal }} {{ with .Get "class" }}{{ . }}{{ end }}">
|
||||
|
||||
{{ .Inner | safeHTML }}
|
||||
{{ .InnerDeindent | safeHTML }}
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
Reference in New Issue
Block a user