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 12:53:02 -04:00
|
|
|
<div style="width: 100px; margin-top: 20px; margin-bottom: 20px; margin-left: auto; margin-right: auto">
|
2023-03-29 16:20:18 -04:00
|
|
|
<button style="display: block; margin-left: auto; margin-right: auto" onClick="addVote({{ $name }})">Cool!</button>
|
2023-03-28 12:53:02 -04:00
|
|
|
|
|
|
|
<p style="text-align: center" id="num-votes">...</p>
|
|
|
|
</div>
|
|
|
|
|
2023-03-28 17:39:17 -04:00
|
|
|
{{ if hugo.IsProduction }}
|
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-13 17:19:53 -04:00
|
|
|
<script type="text/javascript">
|
|
|
|
refresh({{ $name }})
|
|
|
|
</script>
|
2023-03-29 16:20:18 -04:00
|
|
|
{{ else }}
|
2023-04-13 17:19:53 -04:00
|
|
|
<p style="text-align: center">Voting is disabled in development mode.</p>
|
2023-03-29 16:20:18 -04:00
|
|
|
{{ end }}
|