X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=views%2Findex.pug;h=34c059b4e6ad2e0128512b6ef83728edf877da4e;hb=e081ffe361b06ca74db0a36bf72dd73602abf57b;hp=81aafdb1f8bc640bf3502b8e3f2ed186136a5f9d;hpb=a5d5668613d9a3d04c9a4f8b69122d02b7322137;p=vchess.git diff --git a/views/index.pug b/views/index.pug index 81aafdb1..34c059b4 100644 --- a/views/index.pug +++ b/views/index.pug @@ -5,6 +5,23 @@ block css block content .container#indexPage + include langNames.pug + case lang + when "en" + include translations/en.pug + include welcome/en.pug + include modal-lang/en.pug + include modal-help/en.pug + when "es" + include translations/es.pug + include welcome/es.pug + include modal-lang/es.pug + include modal-help/es.pug + when "fr" + include translations/fr.pug + include welcome/fr.pug + include modal-lang/fr.pug + include modal-help/fr.pug .row #header.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 #mainTitle @@ -18,28 +35,23 @@ block content #helpMenu.clickable( onClick="document.getElementById('modalHelp').checked=true") .info-container - p Help + p= translations["Help"] .row my-variant-summary(v-for="(v,idx) in sortedCounts" v-bind:vobj="v" v-bind:index="idx" v-bind:key="v.name") - // Modals: - include modal-lang.pug - include modal-help.pug + // Other modals: input#modalB4welcome.modal(type="checkbox") div(role="dialog") #b4welcome.card.text-center.small-modal - h3.blue First visit? - p#readThis.clickable(@click="showWelcomeMsg") >>> Please read this <<< - case lang - when "en" - include welcome/en.pug - when "fr" - include welcome/fr.pug + h3.blue= translations["First visit?"] + p#readThis.clickable(@click="showWelcomeMsg") + =translations[">>> Please read this <<<"] block javascripts script. + const translations = !{JSON.stringify(translations)}; const variantArray = !{JSON.stringify(variantArray)}; script(src="/javascripts/utils/misc.js") - script(src="/javascripts/utils/socket_url.js") + script(src="/javascripts/socket_url.js") script(src="/javascripts/components/variantSummary.js") script(src="/javascripts/index.js")