From a9036d4b45fbd1ece19e76e5577e724a60c1653a Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Mon, 4 Sep 2017 19:15:17 +0200 Subject: [PATCH 1/4] change 'title' attribute of form depending on which share button one clicks to change displayed text per service --- site/config.toml | 2 ++ site/data/de/share/2-gnusocial.yaml | 2 ++ site/data/de/share/4-twitter.yaml | 2 ++ site/data/en/share/2-gnusocial.yaml | 2 ++ site/data/en/share/4-twitter.yaml | 2 ++ site/layouts/partials/spread.html | 8 ++++---- site/static/js/creative.js | 5 +++++ 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/site/config.toml b/site/config.toml index 6c58312..3649620 100644 --- a/site/config.toml +++ b/site/config.toml @@ -120,6 +120,7 @@ DefaultContentLanguage = "en" promoButtonText = "Get promo material" promoButtonLink = "https://fsfe.org/promo#pmpc" shareText = "Tell your friends and followers about Public Code" + defaultSocialText = "If it is public money, it should be public code as well. I support this call for more public code under a Free Software license: " # Legal Section @@ -218,6 +219,7 @@ DefaultContentLanguage = "en" promoButtonText = "Promomaterial bestellen" promoButtonLink = "https://fsfe.org/promo#pmpc" shareText = "Erzähle Deinen Freunden und Followern von PMPC" + defaultSocialText = "Wenn es mit öffentlichem Geld bezahlt wird, muss es immer öffentlicher Code sein! Ich unterstütze diesen Aufruf, damit es mehr öffentlichen Code unter einer Freie-Software-Lizenz gibt: " # Legal Section [Languages.de.legal] by = "Eine Kampagne der Free Software Foundation Europe" diff --git a/site/data/de/share/2-gnusocial.yaml b/site/data/de/share/2-gnusocial.yaml index dff83cc..c929b62 100644 --- a/site/data/de/share/2-gnusocial.yaml +++ b/site/data/de/share/2-gnusocial.yaml @@ -3,3 +3,5 @@ name: GNU Social titleBefore: Auf titleAfter: teilen userinput: true +# This "customText" shouldn't have more than 115 characters! +customText: "Öffentliches Geld muss öffentlichen Code bedeuten! Ich unterstütze den Aufruf der @fsfe@quitter.no für mehr #publiccode: " diff --git a/site/data/de/share/4-twitter.yaml b/site/data/de/share/4-twitter.yaml index bfe841f..24b5d8a 100644 --- a/site/data/de/share/4-twitter.yaml +++ b/site/data/de/share/4-twitter.yaml @@ -2,3 +2,5 @@ id: twitter name: Twitter titleBefore: Auf titleAfter: teilen +# This "customText" must not have more than 115 characters! +customText: "Öffentliches Geld muss öffentlichen Code bedeuten! Ich unterstütze den Aufruf der @fsfe für mehr #publiccode: " diff --git a/site/data/en/share/2-gnusocial.yaml b/site/data/en/share/2-gnusocial.yaml index 8549b04..659784a 100644 --- a/site/data/en/share/2-gnusocial.yaml +++ b/site/data/en/share/2-gnusocial.yaml @@ -3,3 +3,5 @@ name: GNU Social titleBefore: Share on titleAfter: userinput: true +# This "customText" shouldn't have more than 115 characters! +customText: "If it is public money, it should be public code as well! I support @fsfe@quitter.no's call for more #publiccode: " diff --git a/site/data/en/share/4-twitter.yaml b/site/data/en/share/4-twitter.yaml index 3857759..1336986 100644 --- a/site/data/en/share/4-twitter.yaml +++ b/site/data/en/share/4-twitter.yaml @@ -2,3 +2,5 @@ id: twitter name: Twitter titleBefore: Share on titleAfter: +# This "customText" must not have more than 115 characters! +customText: "If it is public money, it should be public code as well! I support @fsfe's call for more #publiccode: " diff --git a/site/layouts/partials/spread.html b/site/layouts/partials/spread.html index bf77dfa..4bf41c6 100644 --- a/site/layouts/partials/spread.html +++ b/site/layouts/partials/spread.html @@ -22,8 +22,8 @@
- - + + {{ range $data.share }} @@ -33,14 +33,14 @@ - + {{ end }} {{ end }} {{ range $data.share }} {{ if ne .userinput true }} - + {{ end }} {{ end }}
diff --git a/site/static/js/creative.js b/site/static/js/creative.js index 9f4025e..86cae1e 100644 --- a/site/static/js/creative.js +++ b/site/static/js/creative.js @@ -39,3 +39,8 @@ new WOW().init(); })(jQuery); // End of use strict + +function changeTitle(val){ + document.getElementById('sharetitle-spread').value = val; + return true; +} From b78eb1e624f511b5ef5298033aea49ff8cc74b3d Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Mon, 4 Sep 2017 19:15:52 +0200 Subject: [PATCH 2/4] better wording for support button. Fixes #50 --- site/data/de/share/7-support.yaml | 2 +- site/data/en/share/7-support.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/data/de/share/7-support.yaml b/site/data/de/share/7-support.yaml index fca02d5..414346e 100644 --- a/site/data/de/share/7-support.yaml +++ b/site/data/de/share/7-support.yaml @@ -1,4 +1,4 @@ id: support -name: Kampagne unterstützen! +name: Unterstütze die FSFE! titleBefore: titleAfter: diff --git a/site/data/en/share/7-support.yaml b/site/data/en/share/7-support.yaml index aa85023..34f1b46 100644 --- a/site/data/en/share/7-support.yaml +++ b/site/data/en/share/7-support.yaml @@ -1,4 +1,4 @@ id: support -name: Support the Campaign! +name: Become an FSFE supporter! titleBefore: titleAfter: From 6bbc36a6372b5367e808d2602b607ec29c2b51e8 Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Mon, 4 Sep 2017 19:20:00 +0200 Subject: [PATCH 3/4] enable dynamic share texts for share-column on left side --- site/layouts/partials/sharecolumn.html | 6 +++--- site/static/js/creative.js | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/site/layouts/partials/sharecolumn.html b/site/layouts/partials/sharecolumn.html index 814c050..aea6406 100644 --- a/site/layouts/partials/sharecolumn.html +++ b/site/layouts/partials/sharecolumn.html @@ -6,7 +6,7 @@ - + {{ range $data.share }} @@ -16,14 +16,14 @@ - + {{ end }} {{ end }} {{ range $data.share }} {{ if ne .userinput true }} - + {{ end }} {{ end }} diff --git a/site/static/js/creative.js b/site/static/js/creative.js index 86cae1e..b718960 100644 --- a/site/static/js/creative.js +++ b/site/static/js/creative.js @@ -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; +} From 08aa8831d0867aabcf4043a33985d620cddfd639 Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Mon, 4 Sep 2017 19:21:24 +0200 Subject: [PATCH 4/4] always use root page for shares --- site/layouts/partials/sharecolumn.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/layouts/partials/sharecolumn.html b/site/layouts/partials/sharecolumn.html index aea6406..8a7acc0 100644 --- a/site/layouts/partials/sharecolumn.html +++ b/site/layouts/partials/sharecolumn.html @@ -5,8 +5,8 @@