eguneraketa

This commit is contained in:
Aitzol Berasategi 2021-04-23 11:46:28 +02:00
parent 39bf61af39
commit 88c3794718
2 changed files with 34 additions and 1 deletions

View File

@ -13,4 +13,4 @@ https://apunteak.lainoa.eus/post60427300b75d960d00823bb7
<a href="http://localhost:8080" target="_blank">localhost:8080</a>
## Demo
[demoa](https://lainoa.eus/demoak/ariketa-03)
[demoa](https://lainoa.eus/demoak/ariketa-03/)

33
views/#layout.pug# Normal file
View File

@ -0,0 +1,33 @@
doctype
html(lang='eu')
head
title Node.js Express.js Pug adibidea
meta(name='viewport', content='width=device-width, initial-scale=1.0')
base(href='/')
link(rel='stylesheet', href='css/styles.css')
link(rel='stylesheet', href='css/header.css')
link(rel='stylesheet', href='css/footer.css')
link(rel='shortcut icon', href='#')
script.
window.onload = function () {
var logged = "#{logged}"
var path = window.location.pathname;
if(path != '/'){
document.querySelector('.back').style.display = 'block';
document.querySelector('.next').style.display = 'none';
}else{
document.querySelector('.back').style.display = 'none';
if(logged) {
document.querySelector('.next').style.display = 'block';
}
}
};
body
block header
include header
block content
block footer
include footer