Skip to content

Instantly share code, notes, and snippets.

@Moinax
Last active January 28, 2019 15:22
Show Gist options
  • Save Moinax/2010d8bf992c46f36c0f44f7a30838a0 to your computer and use it in GitHub Desktop.
Save Moinax/2010d8bf992c46f36c0f44f7a30838a0 to your computer and use it in GitHub Desktop.

Revisions

  1. Moinax revised this gist Jan 28, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,6 @@ window.config = {
    "Attention, <strong>après 3 erreurs</strong>, la partie est finie.",
    text5:
    "Mais la route ne s’arrête pas pour autant, tu pourras retenter ta chance...",
    text6: "Tomorrow.",
    button: "Chercher les références"
    },
    finder: {
  2. Moinax revised this gist Jan 28, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,7 @@ window.config = {
    "Attention, <strong>après 3 erreurs</strong>, la partie est finie.",
    text5:
    "Mais la route ne s’arrête pas pour autant, tu pourras retenter ta chance...",
    text6: "Tomorrow.",
    button: "Chercher les références"
    },
    finder: {
  3. Moinax revised this gist Jan 27, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,9 @@
    <div id="root">Loading...</div>
    <script>
    window.config = {
    total: 15,
    lives: 3,
    translations: {{...}},
    url: {
    base: '{{baseUrl}}',
    visual: '{{visualUrl}}',
  4. Moinax revised this gist Jan 27, 2019. 1 changed file with 84 additions and 0 deletions.
    84 changes: 84 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <title>Proximus - TomorrowLand Winter Contest</title>
    <meta
    name="viewport"
    content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"
    />
    <link rel="stylesheet" href="{{index.css}}">
    </head>
    <body>
    <div id="root">Loading...</div>
    <script>
    window.config = {
    url: {
    base: '{{baseUrl}}',
    visual: '{{visualUrl}}',
    video: '{{videoUrl}}',
    objects:'{{objectsUrl}}',
    ambience: '{{ambienceUrl}}',
    music: '{{musicUrl}}',
    loser: '{{loserUrl}}',
    winnerVideo: '{{winnerVideoUrl}}',
    winnerMusic: '{{winnerMusicUrl}}',
    button: '{{buttonUrl}}',
    twitter:
    "{{https://twitter.com/intent/tweet?url=https://prx.ms/2D8d80K&text=Proximus Music - Vivez l'expérience Tomorrowland Winter à l'Alpe d’Huez !}}",
    finder: '{{finderUrl}}',
    subsidiary: '{{subsidiaryUrl}}'
    }
    };
    </script>
    <script>
    window.fbAsyncInit = function() {
    FB.init({
    appId: "{{2033801956727622}}",
    cookie: true,
    xfbml: true,
    version: "v3.2"
    });

    FB.AppEvents.logPageView();
    };

    window.fbShare = function(e) {
    e.preventDefault();
    FB.ui(
    {
    method: "share_open_graph",
    action_type: "og.likes",
    action_properties: JSON.stringify({
    object: {
    "og:url":
    "{{https://www.proximus.be/music/nl/wedstrijden/tomorrowland-winter}}",
    "og:title": "{{Proximus Music}}",
    "og:description":
    "{{Vivez l'expérience Tomorrowland Winter à l'Alpe d’Huez !}}",
    "og:image": "{{https://ptmlcontest.be/Content/img/share.jpg}}"
    }
    })
    },
    function(response) {
    if (response && !response.error_message) {
    console.log("share OK");
    }
    }
    );
    };
    (function(d, s, id) {
    let js,
    fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) {
    return;
    }
    js = d.createElement(s);
    js.id = id;
    js.src = "https://connect.facebook.net/{{fr_FR}}/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
    })(document, "script", "facebook-jssdk");
    </script>
    <script src="{{index.js}}"></script>
    </body>
    </html>
  5. Moinax revised this gist Jan 27, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,8 @@ window.config = {
    winnerMusic: 'winnerMusic_url',
    subsidiary: 'subsidiary_url',
    objects: 'objects_url',
    customer: 'customer_url'
    customer: 'customer_url',
    twitter: 'twitter_url'
    }
    translations: {
    loading: "Chargement",
  6. Moinax revised this gist Jan 27, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ window.config = {
    winnerMusic: 'winnerMusic_url',
    subsidiary: 'subsidiary_url',
    objects: 'objects_url',
    sale: 'sale_url'
    customer: 'customer_url'
    }
    translations: {
    loading: "Chargement",
  7. Moinax revised this gist Jan 27, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@ window.config = {
    total: 15,
    gameId: 123456,
    customer: false,
    url: {
    url: {
    base: 'base_url',
    visual: 'visual_url',
    video: 'video_url',
    music: 'music_url',
  8. Moinax revised this gist Jan 27, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,8 @@ window.config = {
    button: 'button_url',
    loser: 'loser_url',
    finder: 'finder_url',
    winnerVideo: 'winnerVideo_url',
    winnerMusic: 'winnerMusic_url',
    subsidiary: 'subsidiary_url',
    objects: 'objects_url',
    sale: 'sale_url'
  9. Moinax revised this gist Jan 25, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,7 @@ window.config = {
    sale: 'sale_url'
    }
    translations: {
    loading: "Chargement",
    page: {
    start: {
    title: "The Cottage of Tomorrow",
  10. Moinax revised this gist Jan 25, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,7 @@ window.config = {
    loser: 'loser_url',
    finder: 'finder_url',
    subsidiary: 'subsidiary_url',
    objects: 'objects_url',
    sale: 'sale_url'
    }
    translations: {
  11. Moinax revised this gist Jan 25, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -53,8 +53,8 @@ window.config = {
    },
    subsidiary: {
    title:
    "Combien pèse au totalle pack du DJ Proximusprésent sur cette photo ?",
    text: "Contenu du pack : une platine, un casque audio,un ordinateur portable, un disque USB, une casquette,un déguisement de lapin, des lunettes de ski.",
    "Combien pèse au total le pack du DJ Proximus présent sur cette photo ?",
    text: "Contenu du pack : une platine, un casque audio, un ordinateur portable, un disque USB, une casquette, un déguisement de lapin, des lunettes de ski.",
    kilo: "kilo",
    grams: "gramme",
    button: "Valider ma participation",
  12. Moinax revised this gist Jan 25, 2019. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -53,10 +53,14 @@ window.config = {
    },
    subsidiary: {
    title:
    "En combien de temps en moyenne les participants trouveront 15 références ?",
    kilo: "kilo(s)",
    grams: "gram(s)",
    button: "Valider ma participation"
    "Combien pèse au totalle pack du DJ Proximusprésent sur cette photo ?",
    text: "Contenu du pack : une platine, un casque audio,un ordinateur portable, un disque USB, une casquette,un déguisement de lapin, des lunettes de ski.",
    kilo: "kilo",
    grams: "gramme",
    button: "Valider ma participation",
    validation: {
    "required": "Veuillez remplir tous les champs"
    }
    },
    thanks: {
    success: {
  13. Moinax revised this gist Jan 24, 2019. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -64,20 +64,20 @@ window.config = {
    text1:
    "Nous te tiendrons personnellement informé si tu fais partie des gagnants.",
    text2:
    "N’hésite pas à revenir demain pour multiplier tes chances de gagner.",
    "<strong>N’hésite pas à revenir demain pour multiplier tes chances de gagner.</strong>",
    text3:
    "Tu as trouvé cette action incroyable ? <strong>Partage là à tes amis.</strong>"
    },
    fail: {
    title: "La partie est finie",
    text1: "",
    text2:
    "N’hésite pas à revenir demain pour multiplier tes chances de gagner.",
    "<strong>N’hésite pas à revenir demain pour multiplier tes chances de gagner.</strong>",
    text3:
    "Tu as trouvé cette action incroyable ? <strong>Partage là à tes amis.</strong>"
    },
    customer: {
    text1: "En attendant, deviens client Proximus Epic pour avoir une chance de gagner :",
    text1: "<strong>En attendant, deviens client Proximus Epic pour avoir une chance de gagner :</strong>",
    text2: "7 jours de folie au festival Tomorrowland à l'Alpe d'Huez du 9 au 16 mars 2019 avec un accès de 3 jours au festival Tomorrowland Winter ! Avion, hôtel, ski & lift pass compris.",
    button: "Devenir client Proximus"
    }
  14. Moinax revised this gist Jan 24, 2019. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -75,6 +75,11 @@ window.config = {
    "N’hésite pas à revenir demain pour multiplier tes chances de gagner.",
    text3:
    "Tu as trouvé cette action incroyable ? <strong>Partage là à tes amis.</strong>"
    },
    customer: {
    text1: "En attendant, deviens client Proximus Epic pour avoir une chance de gagner :",
    text2: "7 jours de folie au festival Tomorrowland à l'Alpe d'Huez du 9 au 16 mars 2019 avec un accès de 3 jours au festival Tomorrowland Winter ! Avion, hôtel, ski & lift pass compris.",
    button: "Devenir client Proximus"
    }
    }
    },
  15. Moinax revised this gist Jan 24, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@ window.config = {
    lives: 3,
    total: 15,
    gameId: 123456,
    customer: false,
    url: {
    visual: 'visual_url',
    video: 'video_url',
    @@ -10,7 +11,8 @@ window.config = {
    button: 'button_url',
    loser: 'loser_url',
    finder: 'finder_url',
    subsidiary: 'subsidiary_url'
    subsidiary: 'subsidiary_url',
    sale: 'sale_url'
    }
    translations: {
    page: {
  16. Moinax revised this gist Jan 23, 2019. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,10 @@ window.config = {
    url: {
    visual: 'visual_url',
    video: 'video_url',
    music: 'music_url',
    ambience: 'ambience_url',
    button: 'button_url',
    loser: 'loser_url',
    finder: 'finder_url',
    subsidiary: 'subsidiary_url'
    }
  17. Moinax revised this gist Jan 23, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ window.config = {
    gameId: 123456,
    url: {
    visual: 'visual_url',
    video: 'video_url',
    finder: 'finder_url',
    subsidiary: 'subsidiary_url'
    }
  18. Moinax revised this gist Jan 23, 2019. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,11 @@ window.config = {
    finder: {
    question: {
    title: "Tape le nom du DJ dont tu as trouvé la référence",
    close: "Fermer"
    close: "Fermer",
    validation: {
    "repeated": "Vous avez déjà trouvé cette référence",
    "exceeding": "Vous avez déjà consommez toutes vos vies"
    }
    },
    error: {
    title: "Mauvaise réponse",
  19. Moinax revised this gist Jan 23, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -43,9 +43,8 @@ window.config = {
    subsidiary: {
    title:
    "En combien de temps en moyenne les participants trouveront 15 références ?",
    hours: "heure(s)",
    minutes: "minute(s)",
    seconds: "seconde(s)",
    kilo: "kilo(s)",
    grams: "gram(s)",
    button: "Valider ma participation"
    },
    thanks: {
  20. Moinax revised this gist Jan 23, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions subsidiary-payload.json
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    {
    "gameId": 123456,
    "hours": 2,
    "minutes": 5,
    "seconds": 10
    "kilo": 2,
    "grams": 5
    }
  21. Moinax revised this gist Jan 23, 2019. 2 changed files with 10 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions finder-payload.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    {
    "gameId": 123456,
    "typedValue": "david guetta"
    }
    6 changes: 6 additions & 0 deletions subsidiary-payload.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    {
    "gameId": 123456,
    "hours": 2,
    "minutes": 5,
    "seconds": 10
    }
  22. Moinax revised this gist Jan 23, 2019. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion tmlw.js
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,11 @@ window.config = {
    lives: 3,
    total: 15,
    gameId: 123456,
    visual: 'visual_url',
    url: {
    visual: 'visual_url',
    finder: 'finder_url',
    subsidiary: 'subsidiary_url'
    }
    translations: {
    page: {
    start: {
  23. Moinax revised this gist Jan 23, 2019. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,8 @@
    window.config = {
    lives: 3,
    total: 15,
    gameId: 123456,
    visual: 'visual_url',
    translations: {
    page: {
    start: {
    @@ -29,6 +31,11 @@ window.config = {
    button: "Continue"
    }
    },
    references: {
    title: "Références trouvées",
    anonymous: "Non trouvé",
    close: "Fermer"
    },
    subsidiary: {
    title:
    "En combien de temps en moyenne les participants trouveront 15 références ?",
  24. Moinax revised this gist Jan 21, 2019. 2 changed files with 17 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions error.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    {
    "status": "error",
    "lives": 3,
    "message": ""
    }
    12 changes: 12 additions & 0 deletions success.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    {
    "status": "success",
    "lives": 3,
    "answer": {
    "name": "David Guetta",
    "picture":
    "https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/David_Guetta_2013-04-12_001.jpg/1200px-David_Guetta_2013-04-12_001.jpg",
    "slogan":
    "Son slogan F*** Me I'm Famous a été collé sur les plus grands billboards d'Ibiza, juste en sortant de l'aéroport. C'est un homme pas particulièrement sexy mais tout le monde connait son visage.",
    "sound": ""
    }
    }
  25. Moinax created this gist Jan 21, 2019.
    72 changes: 72 additions & 0 deletions tmlw.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,72 @@
    window.config = {
    lives: 3,
    total: 15,
    translations: {
    page: {
    start: {
    title: "The Cottage of Tomorrow",
    text1:
    "Parmi les références présentes dans le chalet, retrouve <strong>15 noms de DJ</strong> ayant participé à l’un des festivals Tomorrowland.",
    text2:
    "Quand tu penses avoir trouvé une référence à un DJ, tape simplement son nom.",
    text3:
    "<strong>à gagner : 7 jours de folie pour 4 personnes à l’Alpe d'Huez du 9 au 16 mars 2019 avec un accès de 3 jours au festival Tomorrowland Winter ! Avion, hôtel, ski & lift pass compris.</strong>",
    text4:
    "Attention, <strong>après 3 erreurs</strong>, la partie est finie.",
    text5:
    "Mais la route ne s’arrête pas pour autant, tu pourras retenter ta chance...",
    button: "Chercher les références"
    },
    finder: {
    question: {
    title: "Tape le nom du DJ dont tu as trouvé la référence",
    close: "Fermer"
    },
    error: {
    title: "Mauvaise réponse",
    text1:
    "Chaque mauvaise réponse te fais perdre un Lotus. <br /> Au bout de <strong>3 erreurs</strong> la partie s’arrête.",
    button: "Continue"
    }
    },
    subsidiary: {
    title:
    "En combien de temps en moyenne les participants trouveront 15 références ?",
    hours: "heure(s)",
    minutes: "minute(s)",
    seconds: "seconde(s)",
    button: "Valider ma participation"
    },
    thanks: {
    success: {
    title: "Merci pour ta participation",
    text1:
    "Nous te tiendrons personnellement informé si tu fais partie des gagnants.",
    text2:
    "N’hésite pas à revenir demain pour multiplier tes chances de gagner.",
    text3:
    "Tu as trouvé cette action incroyable ? <strong>Partage là à tes amis.</strong>"
    },
    fail: {
    title: "La partie est finie",
    text1: "",
    text2:
    "N’hésite pas à revenir demain pour multiplier tes chances de gagner.",
    text3:
    "Tu as trouvé cette action incroyable ? <strong>Partage là à tes amis.</strong>"
    }
    }
    },
    components: {
    counter: {
    text1: "références trouvées"
    },
    lives: {
    title: "Chances restantes"
    },
    references: {
    button: "Références"
    }
    }
    }
    };