88 lines
6.8 KiB
Plaintext
88 lines
6.8 KiB
Plaintext
extends layout.pug
|
|
block append scripts
|
|
script(src="/JS/polyfill.app.js" defer)
|
|
script(src="/JS/index.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);
|
|
if(questionnaire.Illustrations != undefined && questionnaire.Illustrations.length !== 0)
|
|
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)
|
|
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}
|
|
if(questionnaire.Illustrations != undefined && questionnaire.Illustrations.length !== 0)
|
|
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")
|
|
div(id="content" class="cardboard")
|
|
p(id="author-date") #{txtQuestionnaire.publishedBy} #{author}#{txtQuestionnaire.publishedAt} #{publishedAtTxt}. #{txtQuestionnaire.lastUpdated}#{updatedAtTxt}.
|
|
if(questionnaire.Questionnaire.introduction)
|
|
div#introduction !{questionnaire.Questionnaire.introduction}
|
|
if(questionnaire.Links != undefined && questionnaire.Links.length !== 0)
|
|
div#quizElementLinks
|
|
h4 #{configTpl.quizElementLinksIntro}
|
|
ul
|
|
for link in questionnaire.Links
|
|
li
|
|
a(href=link.url target="_blank" rel="noopener" title=link.anchor+" ("+txtGeneral.alertNewWindow+")") #{link.anchor}
|
|
-
|
|
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)
|
|
p
|
|
span #{nextLink.anchor+" : "}
|
|
a(href=nextLink.href title=nextLink.title) #{nextLink.title}
|
|
div#nextLink
|
|
a(href=nextLink.href class="button cardboard" title=nextLink.title) !{"➔ "+nextLink.anchor}
|
|
div#licence
|
|
p !{configTpl.licenceTxt}
|
|
div#zerozozio
|
|
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")
|
|
div#explanations(class="engraved framed")
|
|
h3#explanationsTitle #{configTpl.explanationTitle}
|
|
div#explanationsContent
|
|
p !{configTpl.explanationElementTxt}
|
|
p
|
|
a(href="/"+configTpl.aboutPage class="button cardboard" title=configTpl.homeBtnAboutTxt) #{configTpl.homeBtnAboutTxt} |