enable dynamic share texts for share-column on left side
parent
b78eb1e624
commit
6bbc36a637
|
@ -6,7 +6,7 @@
|
|||
<input name="popup" id="no-share-popup-side" type="radio" />
|
||||
<input name="ref" value="pmpc-side" type="hidden" />
|
||||
<input name="url" value="{{ .Site.Params.url }}{{ .RelPermalink }}" type="hidden" />
|
||||
<input name="title" value="{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}" type="hidden" />
|
||||
<input id="sharetitle-side" name="title" value="{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}" type="hidden" />
|
||||
<input class="n" name="website" placeholder="Please do not put anything here" />
|
||||
|
||||
{{ range $data.share }}
|
||||
|
@ -16,14 +16,14 @@
|
|||
<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 }}">OK</button>
|
||||
<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 }}"> </button>
|
||||
<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}}')"> </button>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</form>
|
||||
|
|
|
@ -44,3 +44,7 @@ function changeTitle(val){
|
|||
document.getElementById('sharetitle-spread').value = val;
|
||||
return true;
|
||||
}
|
||||
function changeTitleSide(val){
|
||||
document.getElementById('sharetitle-side').value = val;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue