publiccode.si/site/layouts/partials/sharecolumn.html

32 lines
1.7 KiB
HTML
Raw Normal View History

2017-03-20 20:23:38 +01:00
{{ "<!-- SHARE COLUMN -->" | safeHTML }}
{{ $data := index .Site.Data .Site.Language.Lang }}
<div class="sharecolumn">
2017-06-22 12:28:23 +02:00
<form action="/share" method="GET" class="share-buttons side" target="_blank">
<input name="popup" id="no-share-popup-side" type="radio" />
<input name="ref" value="pmpc-side" type="hidden" />
2017-09-04 19:21:24 +02:00
<input name="url" value="{{ .Site.Params.url }}" type="hidden" />
<input id="sharetitle-side" name="title" value="{{ .Site.Params.spread.defaultSocialText }}" type="hidden" />
2017-08-29 22:50:07 +02:00
<input class="n" name="website" placeholder="Please do not put anything here" />
{{ range $data.share }}
{{ if eq .userinput true }}
<label class="button share-{{ .id }}" title="{{ .titleBefore}} {{ .name }} {{ .titleAfter }}" for="{{ .id }}-share-side">&nbsp;</label>
<input name="popup" id="{{ .id }}-share-side" type="radio" />
<span class="popup {{ .id }}">
<label for="no-share-popup-side"></label>
<input name="{{ .id }}pod" value="" placeholder="{{ .name }} URL ({{ .id }}.tld)" type="text" />
<button type="submit" name="service" value="{{ .id }}" onclick="return changeTitleSide('{{if isset . "customText"}}{{.customText}}{{else}}{{$.Site.Params.spread.defaultSocialText}}{{end}}')">OK</button>
</span>
{{ end }}
{{ end }}
{{ range $data.share }}
{{ if ne .userinput true }}
<button type="submit" name="service" value="{{ .id }}" class="button share-{{ .id }}" title="{{ .titleBefore}} {{ .name }} {{ .titleAfter }}" onclick="return changeTitleSide('{{if isset . "customText"}}{{.customText}}{{else}}{{$.Site.Params.spread.defaultSocialText}}{{end}}')">&nbsp;</button>
{{ end }}
{{ end }}
</form>
</div>