popover implementation
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
||||
{{$trimmed = replace $trimmed "%20" "-" }}
|
||||
{{$external := strings.HasPrefix $trimmed "http" }}
|
||||
{{ if $external }}
|
||||
{{- if $external -}}
|
||||
<a href="{{ $trimmed }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{else}}
|
||||
<a href="{{ if (hasPrefix $trimmed "/") }}{{ $trimmed | urlize }}{{ else }}{{ print "/" $trimmed | urlize }}{{ end }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{end}}
|
||||
{{- else -}}
|
||||
{{$fixedUrl := (cond (hasPrefix $trimmed "/") $trimmed (print "/" $trimmed)) | urlize}}
|
||||
<a href="{{$fixedUrl}}" rel="noopener" class="internal-link" data-src="{{$fixedUrl}}">{{ .Text | safeHTML }}</a>
|
||||
{{- end -}}
|
@ -17,7 +17,7 @@
|
||||
<div class="tags">
|
||||
{{ range .Site.Taxonomies.tags.ByCount }}
|
||||
<div class="meta">
|
||||
<h1><a href="{{ .Page.Permalink }}">{{ .Page.Title | humanize }}</a></h1>
|
||||
<h1><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h1>
|
||||
<p><b>{{ .Count }}</b> notes with this tag {{if gt .Count 2}}(showing first 2 results){{end}}</p>
|
||||
</div>
|
||||
{{ with ($.Site.GetPage (printf "/tags/%s" .Page.Title)) }}
|
||||
|
@ -13,7 +13,7 @@
|
||||
{{partial "darkmode.html" .}}
|
||||
</header>
|
||||
<article>
|
||||
<h1>Category: {{.Title | humanize}}</h1>
|
||||
<h1>Tag: {{.Title | humanize}}</h1>
|
||||
{{partial "page-list.html" .Paginator.Pages}}
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</article>
|
||||
|
Reference in New Issue
Block a user