This commit is contained in:
Volodya
2023-10-25 12:19:00 +03:00
commit f34f0eecf7
17 changed files with 1305 additions and 0 deletions

25
views/contact.ejs Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title><%=title %></title>
<meta charset="utf-8" />
</head>
<body>
<%- include("partials/menu.ejs") %>
<h1><%=title %> в EJS</h1>
<% if(emailsVisible) {%>
<h3>Электронные адреса</h3>
<ul>
<% for(var i=0; i<emails.length;i++) {%>
<li><%=emails[i] %></li>
<%} %>
</ul>
<% }else {%>
<h3>Электронный адрес отсутствует</h3>
<%} %>
<p>Телефон: <%=phone %></p>
<%- include("partials/footer.ejs") %>
</body>
<html>

3
views/contact.hbs Normal file
View File

@@ -0,0 +1,3 @@
<h1>{{title}}</h1>
<p>Электронный адрес: {{email}}</p>
<p>Телефон: {{phone}}</p>

17
views/contact.pug Normal file
View File

@@ -0,0 +1,17 @@
extends layout.pug
block title
<title>#{title}</title>
block content
<h1>#{title} в Pug</h1>
if emailsVisible
<h3>Электронные адреса</h3>
<ul>
each email in emails
<li>#{email}</li>
</ul>
else
<h3>Электронный адрес отсутствует</h3>
<p>Телефон: #{phone}</p>

1
views/footer.pug Normal file
View File

@@ -0,0 +1 @@
<footer><p>MyCorp - Copyright © 2017</p></footer>

12
views/home.hbs Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Главная страница</title>
<meta charset="utf-8" />
</head>
<body>
<h1>Главная страница</h1>
<div>{{getTime}}</div>
<div>{{createStringList fruit}}</div>
</body>
<html>

11
views/layout.pug Normal file
View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
block title
<meta charset="utf-8" />
</head>
<body>
block content
include footer.pug
</body>
<html>

14
views/layouts/layout.hbs Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>{{title}}</title>
<meta charset="utf-8" />
</head>
<body>
{{> menu}}
{{{body}}}
{{> footer}}
</body>
<html>

View File

@@ -0,0 +1 @@
footer.ejs

View File

@@ -0,0 +1 @@
<footer><p>MyCorp - Copyright © 2017</p></footer>

4
views/partials/menu.ejs Normal file
View File

@@ -0,0 +1,4 @@
<nav>
<a href="/">Главная</a> |
<a href="/contact">Контакты</a>
</nav>

4
views/partials/menu.hbs Normal file
View File

@@ -0,0 +1,4 @@
<nav>
<a href="/">Главная</a> |
<a href="/contact">Контакты</a>
</nav>