update
This commit is contained in:
25
expressapp/views/contact.ejs
Normal file
25
expressapp/views/contact.ejs
Normal 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
expressapp/views/contact.hbs
Normal file
3
expressapp/views/contact.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1>{{title}}</h1>
|
||||
<p>Электронный адрес: {{email}}</p>
|
||||
<p>Телефон: {{phone}}</p>
|
||||
17
expressapp/views/contact.pug
Normal file
17
expressapp/views/contact.pug
Normal 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
expressapp/views/footer.pug
Normal file
1
expressapp/views/footer.pug
Normal file
@@ -0,0 +1 @@
|
||||
<footer><p>MyCorp - Copyright © 2017</p></footer>
|
||||
12
expressapp/views/home.hbs
Normal file
12
expressapp/views/home.hbs
Normal 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
expressapp/views/layout.pug
Normal file
11
expressapp/views/layout.pug
Normal 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
expressapp/views/layouts/layout.hbs
Normal file
14
expressapp/views/layouts/layout.hbs
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{title}}</title>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
{{> menu}}
|
||||
|
||||
{{{body}}}
|
||||
|
||||
{{> footer}}
|
||||
</body>
|
||||
<html>
|
||||
1
expressapp/views/partials/footer.ejs
Normal file
1
expressapp/views/partials/footer.ejs
Normal file
@@ -0,0 +1 @@
|
||||
footer.ejs
|
||||
1
expressapp/views/partials/footer.hbs
Normal file
1
expressapp/views/partials/footer.hbs
Normal file
@@ -0,0 +1 @@
|
||||
<footer><p>MyCorp - Copyright © 2017</p></footer>
|
||||
4
expressapp/views/partials/menu.ejs
Normal file
4
expressapp/views/partials/menu.ejs
Normal file
@@ -0,0 +1,4 @@
|
||||
<nav>
|
||||
<a href="/">Главная</a> |
|
||||
<a href="/contact">Контакты</a>
|
||||
</nav>
|
||||
4
expressapp/views/partials/menu.hbs
Normal file
4
expressapp/views/partials/menu.hbs
Normal file
@@ -0,0 +1,4 @@
|
||||
<nav>
|
||||
<a href="/">Главная</a> |
|
||||
<a href="/contact">Контакты</a>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user