Debug problème layout pug quand aucune illustration n'est fournie
This commit is contained in:
parent
470a2a313b
commit
5b8b854053
@ -2,6 +2,7 @@ extends layout.pug
|
||||
|
||||
block append scripts
|
||||
script(src="/JS/polyfill.app.js" defer)
|
||||
|
||||
block content
|
||||
div(id="home" class="cardboard")
|
||||
p
|
||||
|
@ -19,7 +19,6 @@ div(id="triple-column")
|
||||
}
|
||||
let rotation=0, lastCar;
|
||||
col=1;
|
||||
|
||||
for colQuestionaires in questionnaires_col
|
||||
div(class="column-"+col)
|
||||
for questionnaire in colQuestionaires
|
||||
@ -29,10 +28,16 @@ div(id="triple-column")
|
||||
if(lastCar > 4)
|
||||
rotation*=-1;
|
||||
let imgAttributes = { alt: txtIllustration.defaultAlt };
|
||||
if(tool.isEmpty(questionnaire.Illustrations[0].alt !==undefined))
|
||||
{
|
||||
if(tool.isEmpty(questionnaire.Illustrations[0].alt)===false)
|
||||
imgAttributes.alt=questionnaire.Illustrations[0].alt;
|
||||
}
|
||||
if(tool.isEmpty(questionnaire.Illustrations[0].title !==undefined))
|
||||
{
|
||||
if(tool.isEmpty(questionnaire.Illustrations[0].title)===false)
|
||||
imgAttributes.title=questionnaire.Illustrations[0].title;
|
||||
}
|
||||
let introduction=tool.shortenIfLongerThan(striptags(questionnaire.Questionnaire.introduction.replace("<br>", " ").replace("</p>", " ")), 200);
|
||||
|
||||
div(class="quiz cardboard" style="transform: rotate("+rotation+"deg);")
|
||||
|
@ -8,7 +8,5 @@ block content
|
||||
img(id="logo" src="/themes/wikilerni/img/wikilerni-purple-2-512.png" alt="Logo WikiLerni")
|
||||
h2(class="cardboard") #{config.siteName+" - "+configTpl.siteSlogan}
|
||||
div#listsIntro !{configTpl.newsListTitle}
|
||||
// p
|
||||
// a(href="/"+configTpl.subscribePage class="button cardboard" title=configTpl.homeBtnSubscribeTxt) #{configTpl.homeBtnSubscribeTxt}
|
||||
- nbQuestionnairesList=configTpl.maxQuestionnairesByPage;
|
||||
include includes/listing-questionnaires.pug
|
Loading…
x
Reference in New Issue
Block a user