2023-03-29 16:20:18 -04:00
|
|
|
{{ $name := urlize .Title }}
|
|
|
|
|
|
|
|
{{ with .Slug }}
|
2023-04-13 17:19:53 -04:00
|
|
|
{{ $name = . }}
|
2023-03-29 16:20:18 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2023-03-28 17:39:17 -04:00
|
|
|
{{ if hugo.IsProduction }}
|
2023-09-04 07:59:34 -04:00
|
|
|
<div class="voting-container">
|
|
|
|
<button class="voting-button" id="num-votes" onClick="addVote({{ $name }})">❤️</button>
|
|
|
|
</div>
|
|
|
|
|
2023-04-13 18:39:55 -04:00
|
|
|
{{ $site := resources.Get "js/voting.js" | minify | fingerprint | resources.PostProcess }}
|
2023-04-13 17:19:53 -04:00
|
|
|
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
|
2023-03-28 12:53:02 -04:00
|
|
|
|
2023-04-17 15:20:26 -04:00
|
|
|
<script>
|
2023-04-13 17:19:53 -04:00
|
|
|
refresh({{ $name }})
|
|
|
|
</script>
|
2023-03-29 16:20:18 -04:00
|
|
|
{{ else }}
|
2023-09-04 07:59:34 -04:00
|
|
|
<div class="voting-container">
|
|
|
|
<button disabled class="voting-button" onClick="addVote({{ $name }})">❤️ ?</button>
|
|
|
|
</div>
|
2023-03-29 16:20:18 -04:00
|
|
|
{{ end }}
|