2020-10-12 17:51:35 +02:00
|
|
|
extends layout.pug
|
|
|
|
|
|
|
|
block append scripts
|
|
|
|
script(src="/JS/polyfill.app.js" defer)
|
|
|
|
script(src="/JS/groupElement.app.js" defer)
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
|
|
div(id="tags" class="cardboard")
|
|
|
|
ul
|
|
|
|
li
|
|
|
|
a(href="/") #{config.siteName}
|
|
|
|
for tag in questionnaire.Tags
|
|
|
|
li
|
|
|
|
a(href="/quizs/"+tag.slug+".html") #{tag.name}
|
|
|
|
|
|
|
|
-
|
|
|
|
const imgAttributes = { alt: txtIllustration.defaultAlt, style: "opacity: 0.0;" };
|
|
|
|
if(questionnaire.Illustrations!=undefined && questionnaire.Illustrations.length!==0)
|
|
|
|
{
|
|
|
|
if (tool.isEmpty(questionnaire.Illustrations[0].alt)===false)
|
|
|
|
imgAttributes.alt=questionnaire.Illustrations[0].alt;
|
|
|
|
if(tool.isEmpty(questionnaire.Illustrations[0].title)===false)
|
|
|
|
imgAttributes.title=questionnaire.Illustrations[0].title;
|
|
|
|
}
|
|
|
|
const publishedAtTxt=tool.dateFormat(questionnaire.Questionnaire.publishingAt, questionnaire.Questionnaire.language);
|
|
|
|
const updatedAtTxt=tool.dateFormat(questionnaire.Questionnaire.updatedAt, questionnaire.Questionnaire.language);
|
|
|
|
|
2020-10-20 11:01:52 +02:00
|
|
|
if(questionnaire.Illustrations != undefined && questionnaire.Illustrations.length !== 0)
|
2020-10-12 17:51:35 +02:00
|
|
|
div(id="content-picture" class="cardboard")
|
|
|
|
div(style="background-image: url('/img/quizs/"+questionnaire.Illustrations[0].url+"');")
|
|
|
|
img(src="/img/quizs/"+questionnaire.Illustrations[0].url)&attributes(imgAttributes)
|
|
|
|
//- Important : ici, on garde volontairement le html saisi car lien possible vers auteur de l'illustration :
|
|
|
|
if(questionnaire.Illustrations[0].caption)
|
|
|
|
p !{questionnaire.Illustrations[0].caption}
|
|
|
|
|
|
|
|
div(id="content-side")
|
|
|
|
div(id="content-title")
|
|
|
|
h1(class="cardboard")
|
|
|
|
img(id="required-time-icon" src="/themes/wikilerni/img/time-required-"+questionnaire.Questionnaire.estimatedTime+".png" title=txtQuestionnaire.estimatedTime+" "+txtQuestionnaire.estimatedTimeOption[questionnaire.Questionnaire.estimatedTime])
|
|
|
|
span #{questionnaire.Questionnaire.title}
|
2020-10-20 11:01:52 +02:00
|
|
|
if(questionnaire.Illustrations != undefined && questionnaire.Illustrations.length !== 0)
|
2020-10-12 17:51:35 +02:00
|
|
|
a(href="/img/quizs/"+questionnaire.Illustrations[0].url target="_blank" rel="noopener")
|
|
|
|
img(src="/img/quizs/min/"+questionnaire.Illustrations[0].url class="thumb")&attributes(imgAttributes)
|
|
|
|
div(id="content-title-corner")
|
2020-10-20 11:01:52 +02:00
|
|
|
|
2020-10-12 17:51:35 +02:00
|
|
|
div(id="content" class="cardboard")
|
|
|
|
p(id="author-date") #{txtQuestionnaire.publishedBy} #{author}#{txtQuestionnaire.publishedAt} #{publishedAtTxt}. #{txtQuestionnaire.lastUpdated}#{updatedAtTxt}.
|
2020-10-20 11:01:52 +02:00
|
|
|
|
2020-10-12 17:51:35 +02:00
|
|
|
//- Important : ici, on garde volontairement le html !
|
|
|
|
if(questionnaire.Questionnaire.introduction)
|
|
|
|
div#introduction !{questionnaire.Questionnaire.introduction}
|
|
|
|
|
2020-10-20 11:01:52 +02:00
|
|
|
//- Les sources de l'article
|
|
|
|
if(questionnaire.Links != undefined && questionnaire.Links.length !== 0)
|
2020-10-20 12:11:19 +02:00
|
|
|
div#quizElementLinks
|
2020-10-20 11:01:52 +02:00
|
|
|
h4 #{configTpl.quizElementLinksIntro}
|
2020-10-20 12:11:19 +02:00
|
|
|
ul
|
|
|
|
for link in questionnaire.Links
|
|
|
|
li
|
|
|
|
a(href=link.url target="_blank" rel="noopener" title=link.anchor+" ("+txtGeneral.alertNewWindow+")") #{link.anchor}
|
2020-10-12 17:51:35 +02:00
|
|
|
|
2020-10-20 11:01:52 +02:00
|
|
|
// Lien vers l'élément suivant ou le quiz du groupe, si je suis arrivé à la fin :
|
|
|
|
-
|
|
|
|
let nextLink={};
|
|
|
|
if(nextQuestionnaire != null && nextQuestionnaire.Questionnaire.isPublished)
|
|
|
|
{
|
|
|
|
nextLink.href="/"+configQuestionnaires.dirWebQuestionnaires+"/"+nextQuestionnaire.Questionnaire.slug+".html";
|
|
|
|
nextLink.title=nextQuestionnaire.Questionnaire.title;
|
|
|
|
nextLink.anchor=txtQuestionnaire.linkGoToNextElement;
|
|
|
|
}
|
|
|
|
else if(group.Group.isPublishable)
|
|
|
|
{
|
|
|
|
nextLink.href="/"+configQuestionnaires.dirWebGroups+"/"+group.Group.slug+".html";
|
|
|
|
nextLink.title=group.Group.title;
|
|
|
|
nextLink.anchor=txtQuestionnaire.linkGoToQuiz;
|
|
|
|
}
|
|
|
|
if(nextLink.href!=undefined)
|
2020-11-04 10:02:04 +01:00
|
|
|
p
|
|
|
|
span #{nextLink.anchor+" : "}
|
|
|
|
a(href=nextLink.href title=nextLink.title) #{nextLink.title}
|
2020-10-20 11:01:52 +02:00
|
|
|
div#nextLink
|
|
|
|
a(href=nextLink.href class="button cardboard" title=nextLink.title) !{"➔ "+nextLink.anchor}
|
|
|
|
|
2020-10-20 12:11:19 +02:00
|
|
|
// Formulaire d'inscription :
|
2020-10-12 17:51:35 +02:00
|
|
|
noscript
|
|
|
|
div
|
|
|
|
strong #{configTpl.noJSNotification}
|
2020-11-04 10:02:04 +01:00
|
|
|
- const cguOkLabel = txtUser.formsCGUOkLabel.replace("#link", "/"+configTpl.cguPage);
|
2020-10-20 12:11:19 +02:00
|
|
|
div#quizElementSignupForm
|
2020-10-20 16:41:34 +02:00
|
|
|
form(id="subscription" method="POST" class="needJS")
|
2020-10-12 17:51:35 +02:00
|
|
|
h3 #{configTpl.quizElementSubcriptionFormTitle}
|
|
|
|
fieldset
|
2020-10-20 11:01:52 +02:00
|
|
|
label(for="email") #{txtUser.formsEmailLabel}
|
|
|
|
input(id="email" type="email" name="email" placeholder=txtUser.formsEmailPlaceholder class="cardboard")
|
2020-11-30 16:10:53 +01:00
|
|
|
input(id="email2" type="email" name="email2" placeholder=txtUser.formsEmail2Placeholder class="needJS")
|
|
|
|
div#emailMessage
|
2020-10-12 17:51:35 +02:00
|
|
|
ul(class="checkbox_li")
|
|
|
|
li(class="checkbox_li")
|
|
|
|
label(for="cguOk" class="check")
|
|
|
|
input(type="checkbox" id="cguOk" name="cguOk" value="true")
|
|
|
|
div(class="checkbox_override")
|
2020-10-20 12:11:19 +02:00
|
|
|
span !{cguOkLabel}
|
2020-10-12 17:51:35 +02:00
|
|
|
div(class="input_wrapper")
|
2020-10-20 11:01:52 +02:00
|
|
|
input(id="submitDatas" type="submit" value=txtUser.formsSubmitTxt class="cardboard")
|
2020-11-30 16:10:53 +01:00
|
|
|
div(id="response")
|
2020-10-12 17:51:35 +02:00
|
|
|
|
2020-12-07 12:55:24 +01:00
|
|
|
div#licence
|
|
|
|
p !{configTpl.licenceTxt}
|
|
|
|
|
2020-10-12 17:51:35 +02:00
|
|
|
div#zerozozio
|
2020-11-04 10:02:04 +01:00
|
|
|
a(href="mailto:?to=&subject="+questionnaire.Questionnaire.title+"&body="+txtQuestionnaire.btnShareQuizMailBody+linkCanonical rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"e-mail* ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/email.png" alt=txtQuestionnaire.btnShareQuizTxt+"mail")
|
|
|
|
a(href="http://sharetodiaspora.github.io/?url="+linkCanonical+"&title="+questionnaire.Questionnaire.title rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"diaspora* ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/diaspora.png" alt=txtQuestionnaire.btnShareQuizTxt+"diaspora*")
|
|
|
|
a(href="https://www.facebook.com/sharer.php?u="+linkCanonical rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"facebook ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/facebook.png" alt=txtQuestionnaire.btnShareQuizTxt+"facebook")
|
|
|
|
a(href="https://www.linkedin.com/shareArticle?mini=true&url="+linkCanonical+";title="+questionnaire.Questionnaire.title rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"LinkedIn ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/linkedin.png" alt=txtQuestionnaire.btnShareQuizTxt+"LinkedIn")
|
|
|
|
a(href="https://twitter.com/intent/tweet?url="+linkCanonical+"&text="+questionnaire.Questionnaire.title+" via @"+configTpl.twitterAccount rel="nofollow noopener" title=txtQuestionnaire.btnShareQuizTxt+"twitter ("+txtGeneral.alertNewWindow+")" target="_blank")
|
|
|
|
img(src="/themes/wikilerni/img/twitter.png" alt=txtQuestionnaire.btnShareQuizTxt+"twitter")
|
2020-10-12 17:51:35 +02:00
|
|
|
|
|
|
|
div#explanations(class="engraved framed")
|
|
|
|
h3#explanationsTitle #{configTpl.explanationTitle}
|
|
|
|
div#explanationsContent
|
2020-11-04 10:02:04 +01:00
|
|
|
p !{configTpl.explanationElementTxt}
|
|
|
|
p
|
2020-12-07 12:55:24 +01:00
|
|
|
a(href="/"+configTpl.aboutPage class="button cardboard" title=configTpl.homeBtnAboutTxt) #{configTpl.homeBtnAboutTxt}
|