This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 3f426278863d3a6e0d28d6bbed41fd9f2750047e Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Jul 18 15:48:56 2017 +0200 Personnalisation de la page d'acceuille (ref #67) --- pollen-ui-riot-js/src/main/web/home/en.html | 16 ++++++ pollen-ui-riot-js/src/main/web/home/fr.html | 16 ++++++ pollen-ui-riot-js/src/main/web/home/style.css | 18 +++++++ pollen-ui-riot-js/src/main/web/homeCL/en.html | 25 +++++++++ pollen-ui-riot-js/src/main/web/homeCL/fr.html | 25 +++++++++ pollen-ui-riot-js/src/main/web/homeCL/style.css | 33 ++++++++++++ pollen-ui-riot-js/src/main/web/homeCL/vote.jpg | Bin 0 -> 2480650 bytes pollen-ui-riot-js/src/main/web/i18n.json | 5 -- pollen-ui-riot-js/src/main/web/tag/Home.tag.html | 62 +++++------------------ pollen-ui-riot-js/webpack.config.js | 1 + 10 files changed, 146 insertions(+), 55 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/home/en.html b/pollen-ui-riot-js/src/main/web/home/en.html new file mode 100644 index 00000000..8c5276bb --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/home/en.html @@ -0,0 +1,16 @@ + +<link href="./home/style.css" rel="stylesheet" type="text/css"/> + +<div class="body-container"> + <div class="wrapper"> + <div> + <a class="c-button c-button--ghost u-xlarge c-button--ghost-info" href="#/poll/new/text"> + <i class="fa fa-list-ol"></i> New poll + </a> + </div> + <div class="c-alert c-alert--info edit"> + <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> + You can modify this page to edit file <code class="c-code">/home/en.hml</code> + </div> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/home/fr.html b/pollen-ui-riot-js/src/main/web/home/fr.html new file mode 100644 index 00000000..233a5ebf --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/home/fr.html @@ -0,0 +1,16 @@ + +<link href="./home/style.css" rel="stylesheet" type="text/css"/> + +<div class="body-container"> + <div class="wrapper"> + <div> + <a class="c-button c-button--ghost u-xlarge c-button--ghost-info" href="#/poll/new/text"> + <i class="fa fa-list-ol"></i> Nouveau Sondage + </a> + </div> + <div class="c-alert c-alert--info edit"> + <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> + Vous pouvez modifier cette page en éditant le fichier <code class="c-code">/home/fr.hml</code> + </div> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/home/style.css b/pollen-ui-riot-js/src/main/web/home/style.css new file mode 100644 index 00000000..c7c5c5b7 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/home/style.css @@ -0,0 +1,18 @@ +.body-container { + display: flex; + flex-flow: row wrap; + flex-direction: column; + margin-top: 30px; +} + +.wrapper { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.edit { + margin: 60px 0; +} diff --git a/pollen-ui-riot-js/src/main/web/homeCL/en.html b/pollen-ui-riot-js/src/main/web/homeCL/en.html new file mode 100644 index 00000000..def2576d --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/homeCL/en.html @@ -0,0 +1,25 @@ + +<link href="./home/style.css" rel="stylesheet" type="text/css"/> + +<div class="body-container"> + + <div class="sub-header"> + <div> + <a class="c-button u-xlarge c-button--info" href="#/poll/new/text"> + <i class="fa fa-list-ol"></i> New Poll + </a> + </div> + </div> + <div class="pollen-info"> + <p> + <span class="pollen">Pollen</span> is poll platform open to everyone. + </p> + <p> + <i class="fa fa-cubes" aria-hidden="true"></i>You can create as many polls as you want. + </p> + <p> + <i class="fa fa-magic" aria-hidden="true"></i> + Our strength is to propose different methods of voting (Condorcet, Borda, Instant runoff...) + </p> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/homeCL/fr.html b/pollen-ui-riot-js/src/main/web/homeCL/fr.html new file mode 100644 index 00000000..8c97e728 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/homeCL/fr.html @@ -0,0 +1,25 @@ + +<link href="./home/style.css" rel="stylesheet" type="text/css"/> + +<div class="body-container"> + + <div class="sub-header"> + <div> + <a class="c-button u-xlarge c-button--info" href="#/poll/new/text"> + <i class="fa fa-list-ol"></i> Nouveau Sondage + </a> + </div> + </div> + <div class="pollen-info"> + <p> + <span class="pollen">Pollen</span> est une platforme de sondage ouverte à tous. + </p> + <p> + <i class="fa fa-cubes" aria-hidden="true"></i> Vous pouvez y créer autant de sondage que vous le desirez. + </p> + <p> + <i class="fa fa-magic" aria-hidden="true"></i> + Notre force est de proposer différentes méthode de scrutin (Condorcet, Borda, Vote alternatif...) + </p> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/homeCL/style.css b/pollen-ui-riot-js/src/main/web/homeCL/style.css new file mode 100644 index 00000000..4218a857 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/homeCL/style.css @@ -0,0 +1,33 @@ +.body-container { + display: flex; + flex-flow: row wrap; + flex-direction: column; +} + +.sub-header { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 60px; + background-image: url("/home/vote.jpg"); + background-size: cover; + background-position-y: center; + background-position-x: center; +} + +.pollen-info { + font-size: 2em; + max-width: 700px; + margin: 30px auto; +} + +.pollen-info p { + margin: 10px 0; +} + +.pollen { + font-size: 1.4em; + font-family: var(--title-font); +} diff --git a/pollen-ui-riot-js/src/main/web/homeCL/vote.jpg b/pollen-ui-riot-js/src/main/web/homeCL/vote.jpg new file mode 100644 index 00000000..aa432a6d Binary files /dev/null and b/pollen-ui-riot-js/src/main/web/homeCL/vote.jpg differ diff --git a/pollen-ui-riot-js/src/main/web/i18n.json b/pollen-ui-riot-js/src/main/web/i18n.json index 065046a0..aeab8ab3 100644 --- a/pollen-ui-riot-js/src/main/web/i18n.json +++ b/pollen-ui-riot-js/src/main/web/i18n.json @@ -224,9 +224,6 @@ "header_myFavoriteLists": "Mes listes de favoris", "header_createOtherPoll": "Nouveau sondage standard", "header_createDatePoll": "Nouveau sondage de dates", - "home_createOtherPoll": "Nouveau sondage standard", - "home_createDatePoll": "Nouveau sondage de dates", - "home_createPoll": "Créer un sondage", "poll_cancel": "Annuler", "poll_description_next": "Suivant", "poll_description_info": "Informations", @@ -736,8 +733,6 @@ "header_myFavoriteLists": "My favorite lists", "header_createOtherPoll": "New standard poll", "header_createDatePoll": "New date poll", - "home_createOtherPoll": "New standard poll", - "home_createDatePoll": "New date poll", "poll_creationSuccess": "Your poll {0} has been successfully created.", "poll_saveSuccess": "Your poll {0} has been successfully saved.", "poll_description_cancel": "Cancel", diff --git a/pollen-ui-riot-js/src/main/web/tag/Home.tag.html b/pollen-ui-riot-js/src/main/web/tag/Home.tag.html index 3bae2eed..7dc7e7bc 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Home.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/Home.tag.html @@ -19,61 +19,23 @@ * #L% */ <Home> - <div class="body-container"> - <div class="wrapper"> - <button class="c-button c-button--ghost u-xlarge c-button--ghost-info" onclick="{createOther}"> - <i class="fa fa-list-ol"/> {__.createPoll} - </button> - </div> + <div ref="container"> </div> <script type="es6"> let session = require("../js/Session"); - let form = require("../js/PollForm"); - let route = require("riot-route"); - this.installBundle(session, "home"); - - this.createOther = () => { - route("/poll/new/text"); - }; - this.createDate = () => { - route("/poll/new/date"); + this.updateContent = () => { + fetch("/home/" + session.locale + ".html").then(response => { + return response.text(); + }) + .then(content => { + this.refs.container.innerHTML = content; + }); }; - </script> - - <style> - .body-container { - display: flex; - flex-flow: row wrap; - flex-direction: column; - margin-top: 30px; - } - - .wrapper { - flex-grow: 1; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - } - - .wrapper .c-button { - padding: 0px 30px; - height: 60px; - margin: 10px - } - - @media (orientation: portrait) { - .wrapper { - flex-direction: column; /* affichage vertical */ - } - .wrapper .c-button { - width: 100%; - font-size: 1em; - } - } - - </style> + this.on("mount", this.updateContent); + this.listen("locale", this.updateContent); + + </script> </Home> diff --git a/pollen-ui-riot-js/webpack.config.js b/pollen-ui-riot-js/webpack.config.js index c28814a9..7832044d 100644 --- a/pollen-ui-riot-js/webpack.config.js +++ b/pollen-ui-riot-js/webpack.config.js @@ -34,6 +34,7 @@ module.exports = { new CopyWebpackPlugin([ {from: "src/main/web/conf.js"}, {from: "src/main/web/index.html"}, + {from: "src/main/web/home", to: "home"}, {from: "src/main/web/robots.txt"}, {from: "src/main/web/img", to: "img"}, {from: "src/main/web/css", to: "css"}, -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.