From 7c2cf52be4805508297f021fd38e4c0f40da294f Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Fri, 16 Feb 2018 11:29:51 +0100 Subject: [PATCH 01/10] Add the ability to filter the organisations by type --- site/data/organisations/organisations.json | 117 +++++++++++++++++++++ site/layouts/partials/js.html | 1 + site/layouts/partials/organisations.html | 27 ++++- site/static/css/custom.css | 45 ++++++++ site/static/js/filter_orgs.js | 19 ++++ 5 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 site/static/js/filter_orgs.js diff --git a/site/data/organisations/organisations.json b/site/data/organisations/organisations.json index ba28181..7b2d385 100644 --- a/site/data/organisations/organisations.json +++ b/site/data/organisations/organisations.json @@ -2,697 +2,814 @@ { "name": "ADULLACT", "img": "adullact.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://adullact.org/" }, { "name": "Ajuntament de Barcelona", "img": "bcn.png", + "orgtype": "administration", "priority": "1", "url": "http://www.bcn.cat/" }, { "name": "apertus° Association", "img": "apertus.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://www.apertus.org/" }, { "name": "Aptivate", "img": "aptivate.png", + "orgtype": "international_ngo", "priority": "0", "url": "www.aptivate.org/" }, { "name": "ASL.Org - Associação Software Livre ", "img": "asl-org.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://asl.org.br" }, { "name": "Digitale Allmend", "img": "digitaleallmend.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://allmend.ch/" }, { "name": "Aquilenet", "img": "aquilenet.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://www.aquilenet.fr/" }, { "name": "Asociația pentru Tehnologie și Internet", "img": "apti.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.apti.ro/" }, { "name": "Association Francophone des Utilisateurs de Logiciels Libres", "img": "aful.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://aful.org/" }, { "name": "Associação Ensino Livre", "img": "ael.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://ensinolivre.pt" }, { "name": "Associação Nacional para o Software Livre", "img": "ansol.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://ansol.org/" }, { "name": "CCC Switzerland", "img": "ccc-ch.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://ccc-ch.ch/" }, { "name": "CMS Garden", "img": "CMSGarden.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://www.cms-garden.org/en" }, { "name": "Colectic", "img": "colectic.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://colectic.coop/" }, { "name": "Commons Institut", "img": "CommonsInstitut.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://commons-institut.org/" }, { "name": "P2P Foundation", "img": "P2PFoundation.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://p2pfoundation.net/" }, { "name": "Digitale Gesellschaft", "img": "digitalegesellschaft.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://digitalegesellschaft.de/" }, { "name": "Do-FOSS", "img": "do-foss.png", + "orgtype": "regional_ngo", "priority": "0", "url": "http://blog.do-foss.de/" }, { "name": "Center for the Cultivation of Technology", "img": "CCT.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://techcultivation.org/" }, { "name": "Courage Foundation", "img": "couragefound.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://couragefound.org/" }, { "name": "Chaos Computer Club", "img": "CCC.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://www.ccc.de" }, { "name": "Creative Commons", "img": "creativecommons.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://creativecommons.org/" }, { "name": "Debian", "img": "debian.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://debian.org" }, { "name": "Digitale Gesellschaft Schweiz", "img": "dgs.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.digitale-gesellschaft.ch/" }, { "name": "DFRI", "img": "dfri.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.dfri.se/?lang=en" }, { "name": "Democracy OS France", "img": "democracyosFR.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://democracyos.eu/" }, { "name": "Drupal", "img": "drupal.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://drupal.org" }, { "name": "ExposeFacts", "img": "exposefacts.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://exposefacts.org/" }, { "name": "ELLAK Cyprus", "img": "ELLAKCyprus.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://ellak.org.cy/" }, { "name": "FAImaison", "img": "FAImaison.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.faimaison.net/" }, { "name": "Linux User Group Of Slovenia", "img": "lugos.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://www.lugos.si" }, { "name": "digitalcourage", "img": "digitalcourage.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://digitalcourage.de/" }, { "name": "D3-Defesa dos Direitos Digitais", "img": "DefensaDosDireitosDigitais.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://direitosdigitais.pt/" }, { "name": "April", "img": "april.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://www.april.org/en" }, { "name": "Doteveryone", "img": "doteveryone.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://doteveryone.org.uk/" }, { "name": "Dyne.org Foundation", "img": "dyne.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://dyne.org" }, { "name": "European Digital Rights", "img": "edri.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://edri.org" }, { "name": "ePaństwo Foundation", "img": "epanstwo.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://epf.org.pl" }, { "name": "Epicenter.works", "img": "epicenterworks.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://epicenter.works" }, { "name": "FACIL", "img": "facil.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://facil.qc.ca/" }, { "name": "Fedora Project", "img": "fedora.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://fedoraproject.org/" }, { "name": "FIfF", "img": "FIfF.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.fiff.de/" }, { "name": "FFKP (Society for Free Culture and Software)", "img": "ffkp.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://ffkp.se/" }, { "name": "FOSSASIA", "img": "fossasia.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://fossasia.org/" }, { "name": "Framasoft", "img": "framasoft.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://framasoft.org/" }, { "name": "Free Knowledge Institute", "img": "freeknowledgeinstitute.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://freeknowledge.eu/" }, { "name": "Free Libre Open Source Software Kosova", "img": "flossk.png", + "orgtype": "regional_ngo", "priority": "0", "url": "http://flossk.org/" }, { "name": "Free Software Foundation Europe", "img": "fsfe.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://fsfe.org" }, { "name": "Freifunk.net", "img": "freifunk.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://freifunk.net/" }, { "name": "Gentoo", "img": "gentoo.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://gentoo.org/" }, { "name": "LILA", "img": "lila.png", + "orgtype": "regional_ngo", "priority": "0", "url": "http://libreart.info/" }, { "name": "GFOSS", "img": "GFOSS.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://gfoss.eu/" }, { "name": "GNOME", "img": "GNOME.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.gnome.org" }, { "name": "GNU Image Manipulation Program (GIMP)", "img": "gimp.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://www.gimp.org/" }, { "name": "GNU Solidario", "img": "gnusolidario.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://www.gnusolidario.org/" }, { "name": "GreekLUG", "img": "greeklug.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.greeklug.gr/el/" }, { "name": "Grupo de Amigos de Linux de Pontevedra", "img": "galpon.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://www.galpon.org/" }, { "name": "gvSIG Association", "img": "gvsig.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://www.gvsig.com/" }, { "name": "Hacking Lliure", "img": "lliure.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://hackinglliure.org/" }, { "name": "HackYourPhD", "img": "HackYourPhD.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://hackyourphd.org/" }, { "name": "Hermes Center for Transparency and Digital Human Rights", "img": "hermes.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.hermescenter.org/" }, { "name": "Associazione Industria Italiana del Software Libero", "img": "iisl.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://www.industriasoftwarelibero.it/" }, { "name": "Italian Linux Society", "img": "ils.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.ils.org/" }, { "name": "Joomla", "img": "joomla.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://www.joomla.org/" }, { "name": "Kersnikova", "img": "kersnikova.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://kersnikova.org/" }, { "name": "KDE e.V.", "img": "kde.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://ev.kde.org" }, { "name": "La Quadrature du Net", "img": "laquadrature.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.laquadrature.net" }, { "name": "LibreITALIA", "img": "libreitalia.png", + "orgtype": "national_ngo", "priority": "1", "url": "http://www.libreitalia.it/" }, { "name": "linuxmuster.net e.V", "img": "linuxmuster.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.linuxmuster.net/" }, { "name": "Linuxwochen", "img": "linuxwoche.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.linuxwochen.at/" }, { "name": "Mageia", "img": "mageia.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://www.mageia.org/en/" }, { "name": "Modern Poland Foundation", "img": "nowoczesnapolska.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://nowoczesnapolska.org.pl" }, { "name": "Offene Kommunen.NRW", "img": "oknrw.png", + "orgtype": "regional_ngo", "priority": "0", "url": "http://oknrw.de" }, { "name": "Openbit", "img": "openbit.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://openbit.eu/" }, { "name": "Open Fabrication Network", "img": "ofn.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://openfabnet.com/" }, { "name": "Open Knowledge Belgium", "img": "okbe.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.openknowledge.be/" }, { "name": "Open Knowledge Foundation Deutschland", "img": "okf.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://okfn.de" }, { "name": "Open Knowledge International", "img": "okint.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://okfn.org/" }, { "name": "Open Labs", "img": "OpenLabs.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://openlabs.cc/en/" }, { "name": "OpenMedia", "img": "openmedia.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://openmedia.org/" }, { "name": "Open Rights Group", "img": "openrightsgroup.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.openrightsgroup.org/" }, { "name": "OpenStreetMap France", "img": "openstreetmap-france.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.openstreetmap.fr/" }, { "name": "Open Source Business Alliance", "img": "osba.png", + "orgtype": "national_ngo", "priority": "1", "url": "http://osb-alliance.de" }, { "name": "Open State Foundation", "img": "openstatefoundation.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://openstate.eu" }, { "name": "openSUSE", "img": "OpenSUSE.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.opensuse.org/" }, { "name": "Open Source Initiative", "img": "OpenSourceInitiative.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://opensource.org/" }, { "name": "Otevřená města", "img": "otevrenamesta.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://www.otevrenamesta.cz/" }, { "name": "OW2 Consortium", "img": "ow2.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.ow2.org/" }, { "name": "p≡p foundation", "img": "pep.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://pep.foundation" }, { "name": "Plone Foundation", "img": "plone.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://plone.org/" }, { "name": "Public Software CIC", "img": "public-software-cic.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://publicsoftware.eu/" }, { "name": "quintessenz - Verein zur Wiederherstellung der Bürgerrechte im Informationszeitalter", "img": "quintessenz.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://quintessenz.at" }, { "name": "Rampa", "img": "rampa.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://www.rampalab.org/" }, { "name": "Samtgemeinde Elbmarsch", "img": "samtgemeinde.png", + "orgtype": "administration", "priority": "1", "url": "http://www.samtgemeinde-elbmarsch.de/" }, { "name": "Saregune", "img": "saregune.png", + "orgtype": "national_ngo", "priority": "0", "url": "http://www.saregune.net/es/" }, { "name": "Sentilo", "img": "sentilo.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://www.sentilo.io/" }, { "name": "Slovensko.Digital", "img": "slovenskodigital.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://slovensko.digital/" }, { "name": "Softcatalà", "img": "softcatala.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://www.softcatala.org/" }, { "name": "Software Heritage", "img": "softwareheritage.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.softwareheritage.org/" }, { "name": "Software Liberty Association Taiwan", "img": "slat.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://slat.org/" }, { "name": "Spoločnosť pre otvorené informačné technológie", "img": "soit.png", + "orgtype": "regional_ngo", "priority": "0", "url": "http://www.soit.sk/" }, { "name": "SwissLinux", "img": "swisslinux.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://swisslinux.org/" }, { "name": "Technologiestiftung Berlin", "img": "tsb.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://www.technologiestiftung-berlin.de" }, { "name": "The Document Foundation", "img": "tdf.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.documentfoundation.org" }, { "name": "The Tor Project", "img": "torproject.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.torproject.org/" }, { "name": "TYPO3 Association", "img": "typo3.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://typo3.org/association/" }, { "name": "VideoLAN", "img": "videolan.png", + "orgtype": "international_ngo", "priority": "1", "url": "https://www.videolan.org" }, { "name": "Waag Society", "img": "waag.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://waag.org" }, { "name": "Wikimedia Deutschland", "img": "wikimedia-de.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://wikimedia.de" }, { "name": "Wikimedia France", "img": "wikimediafrance.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://wikimedia.fr" }, { "name": "Wikimedia Italia", "img": "wmit.png", + "orgtype": "national_ngo", "priority": "1", "url": "https://wiki.wikimedia.it/wiki/Main_page" }, { "name": "Wilhelm Tux - Kampagne für Freie Software", "img": "wilhelmtux.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://wilhelmtux.ch/" }, { "name": "World Privacy and Identity Association", "img": "wpia.png", + "orgtype": "international_ngo", "priority": "0", "url": "https://wpia.club/" }, { "name": "Xnet", "img": "xnet.png", + "orgtype": "regional_ngo", "priority": "0", "url": "https://xnet-x.net/" }, { "name": "FOSSGIS e.V.", "img": "fossgis.png", + "orgtype": "national_ngo", "priority": "0", "url": "https://www.fossgis.de/" }, { "name": "Software in the Public Interest", "img": "spi-inc.png", + "orgtype": "international_ngo", "priority": "0", "url": "http://spi-inc.org/" } ] + diff --git a/site/layouts/partials/js.html b/site/layouts/partials/js.html index e38daf2..3bbcc07 100644 --- a/site/layouts/partials/js.html +++ b/site/layouts/partials/js.html @@ -8,3 +8,4 @@ {{ "" | safeHTML }} + diff --git a/site/layouts/partials/organisations.html b/site/layouts/partials/organisations.html index 74bad8c..7abd39c 100644 --- a/site/layouts/partials/organisations.html +++ b/site/layouts/partials/organisations.html @@ -6,6 +6,23 @@

{{ replace .Site.Params.organisations.text "openletter/" ("/openletter" | relLangURL) | markdownify }}

+
+ + + + + +
@@ -15,12 +32,16 @@ to their priorities --> {{ $orgs := getJSON "data/organisations/organisations.json" }} {{ range $int := shuffle (where $orgs "priority" "1") }} -
  • +
  • + +
  • {{ end }} {{ range $int := shuffle (where $orgs "priority" "0") }} -
  • - {{ end }} +
  • + +
  • + {{ end }} diff --git a/site/static/css/custom.css b/site/static/css/custom.css index 9c21df1..14fba19 100644 --- a/site/static/css/custom.css +++ b/site/static/css/custom.css @@ -448,3 +448,48 @@ a:hover { display: none; } } + +.radio-filter-orgs label { + margin-right:5%; + position: relative; + cursor: pointer; + color: #666; + font-family: "Open Sans"; +} + +.radio-filter-orgs input[type="radio"] { + display:none; +} + +.radio-filter-orgs input[type="radio"] + .label-text:before{ + content: "\f10c"; + font-family: "FontAwesome"; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing:antialiased; + width: 1em; + display: inline-block; + margin-right: 5px; +} + +.radio-filter-orgs input[type="radio"]:checked + .label-text:before{ + content: "\f192"; + color: #2093C4; + animation: effect 250ms ease-in; +} + +.radio-filter-orgs input[type="radio"]:disabled + .label-text{ + color: #aaa; +} + +@keyframes effect{ + 0%{transform: scale(0);} + 25%{transform: scale(1.3);} + 75%{transform: scale(1.4);} + 100%{transform: scale(1);} +} + diff --git a/site/static/js/filter_orgs.js b/site/static/js/filter_orgs.js new file mode 100644 index 0000000..5151ac1 --- /dev/null +++ b/site/static/js/filter_orgs.js @@ -0,0 +1,19 @@ +function selectOrgType(type) { + let li_orgs = document.getElementsByClassName('org'); + + for (i = 0; i < li_orgs.length; i++) { + if (li_orgs[i].getAttribute('orgtype') !== type) { + li_orgs[i].style.display = "none"; + } else { + li_orgs[i].style.display = "inline-block"; + } + } +} + +function showAllOrgs() { + let li_orgs = document.getElementsByClassName('org'); + + for (i = 0; i < li_orgs.length; i++) { + li_orgs[i].style.display = "inline-block"; + } +} From ddcdc55bdbd3b68210b167762750e22ce7694c43 Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Mon, 19 Feb 2018 09:21:18 +0100 Subject: [PATCH 02/10] Add the GPL 3 header to the new JS file --- site/static/js/filter_orgs.js | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/site/static/js/filter_orgs.js b/site/static/js/filter_orgs.js index 5151ac1..8ac457b 100644 --- a/site/static/js/filter_orgs.js +++ b/site/static/js/filter_orgs.js @@ -1,13 +1,31 @@ +/* +PMPC website +Copyright (C) 2018 FSFE + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + function selectOrgType(type) { let li_orgs = document.getElementsByClassName('org'); - for (i = 0; i < li_orgs.length; i++) { - if (li_orgs[i].getAttribute('orgtype') !== type) { - li_orgs[i].style.display = "none"; - } else { - li_orgs[i].style.display = "inline-block"; - } + for (i = 0; i < li_orgs.length; i++) { + if (li_orgs[i].getAttribute('orgtype') !== type) { + li_orgs[i].style.display = "none"; + } else { + li_orgs[i].style.display = "inline-block"; } + } } function showAllOrgs() { From 99dff65f4fb0d6e08b683b0326eb236aaade3dfb Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Tue, 20 Feb 2018 10:43:59 +0100 Subject: [PATCH 03/10] Comment out the "Corporate" filter --- site/layouts/partials/organisations.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/layouts/partials/organisations.html b/site/layouts/partials/organisations.html index 7abd39c..05f088a 100644 --- a/site/layouts/partials/organisations.html +++ b/site/layouts/partials/organisations.html @@ -16,9 +16,9 @@ - -
    From 1b91bc77878d6b1874f1c59590c8eabe222544ef Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Tue, 20 Feb 2018 11:13:04 +0100 Subject: [PATCH 06/10] Make the labels translatable --- site/languages/strings.en.toml | 9 +++++++-- site/layouts/partials/organisations.html | 13 ++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/site/languages/strings.en.toml b/site/languages/strings.en.toml index 90f7e50..a953898 100644 --- a/site/languages/strings.en.toml +++ b/site/languages/strings.en.toml @@ -79,8 +79,13 @@ # Organisations section [Languages.en.organisations] - headline = "Supporting Organisations" - text = "The following organisations support our [open letter](openletter/). If your organisation is also interested in joining the call for Public Code, please [contact us](mailto:contact@fsfe.org)." + administrations = "Administrations" + all = "All" + corporate = "Corporate" + headline = "Supporting Organisations" + international_ngo = "International NGOs" + local_ngo = "Local NGOs" + text = "The following organisations support our [open letter](openletter/). If your organisation is also interested in joining the call for Public Code, please [contact us](mailto:contact@fsfe.org)." # Spread the word section diff --git a/site/layouts/partials/organisations.html b/site/layouts/partials/organisations.html index 1caec8a..2ba42c3 100644 --- a/site/layouts/partials/organisations.html +++ b/site/layouts/partials/organisations.html @@ -8,19 +8,18 @@

    {{ replace .Site.Params.organisations.text "openletter/" ("/openletter" | relLangURL) | markdownify }}

    + -
    From cee4179acdd98e53bcfe540dacceeec609a27c86 Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Tue, 20 Feb 2018 15:52:00 +0100 Subject: [PATCH 07/10] Hide the expand arrow if there is not enough orgs displayed --- site/static/js/filter_orgs.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/static/js/filter_orgs.js b/site/static/js/filter_orgs.js index 8ac457b..8667d3f 100644 --- a/site/static/js/filter_orgs.js +++ b/site/static/js/filter_orgs.js @@ -26,6 +26,13 @@ function selectOrgType(type) { li_orgs[i].style.display = "inline-block"; } } + + // Hide the 'expand' arrow if there is no need for it + if (countOrgsToDisplay(li_orgs, type) < 27) { + document.getElementsByClassName('expand')[0].style.visibility = 'hidden'; + } else { + document.getElementsByClassName('expand')[0].style.visibility = 'visible'; + } } function showAllOrgs() { @@ -35,3 +42,9 @@ function showAllOrgs() { li_orgs[i].style.display = "inline-block"; } } + +function countOrgsToDisplay(orgs, type) { + return Array.from(orgs).filter(function(element) { + return element.getAttribute('orgtype') === type; + }).length; +} From 404b895812ce453600c2643a1a38af50df6f8ef6 Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Tue, 20 Feb 2018 17:26:49 +0100 Subject: [PATCH 08/10] Split Local NGOs into Regional and National ones --- site/languages/strings.en.toml | 3 ++- site/layouts/partials/organisations.html | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/site/languages/strings.en.toml b/site/languages/strings.en.toml index a953898..a41f517 100644 --- a/site/languages/strings.en.toml +++ b/site/languages/strings.en.toml @@ -84,7 +84,8 @@ corporate = "Corporate" headline = "Supporting Organisations" international_ngo = "International NGOs" - local_ngo = "Local NGOs" + national_ngo = "National NGOs" + regional_ngo = "Regional NGOs" text = "The following organisations support our [open letter](openletter/). If your organisation is also interested in joining the call for Public Code, please [contact us](mailto:contact@fsfe.org)." diff --git a/site/layouts/partials/organisations.html b/site/layouts/partials/organisations.html index 2ba42c3..86be6b6 100644 --- a/site/layouts/partials/organisations.html +++ b/site/layouts/partials/organisations.html @@ -16,7 +16,10 @@ {{ .Site.Params.organisations.administrations }} +
    From 5fbf2920cbc60cc840f02c6c820a15332a97a667 Mon Sep 17 00:00:00 2001 From: Vincent Lequertier Date: Fri, 23 Feb 2018 16:08:41 +0100 Subject: [PATCH 10/10] Remove no longer used variables --- site/languages/strings.en.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/site/languages/strings.en.toml b/site/languages/strings.en.toml index a41f517..1f31aac 100644 --- a/site/languages/strings.en.toml +++ b/site/languages/strings.en.toml @@ -79,13 +79,7 @@ # Organisations section [Languages.en.organisations] - administrations = "Administrations" - all = "All" - corporate = "Corporate" headline = "Supporting Organisations" - international_ngo = "International NGOs" - national_ngo = "National NGOs" - regional_ngo = "Regional NGOs" text = "The following organisations support our [open letter](openletter/). If your organisation is also interested in joining the call for Public Code, please [contact us](mailto:contact@fsfe.org)."