Answer the question
In order to leave comments, you need to log in
How to make a jade header template so that the header class changes on different pages?
in header.jade ->
.header.header_ind
There is a div that has a class (.header.header_ind)
in index.jade ->
include /header.jade
in news.jade ->
include
/header.jade file news.jade included div , but with class (.header)
Tried to do this:
in header.jade
.header(class="#{head == 1 ? 'header_ind' : ' '}")
in files :
in index. jade
-var head = 1
in news.jade
-var head = 0
BUT the compiler throws an Error :(
How to solve this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question