This commit is contained in:
User1
2023-11-08 14:02:38 +03:00
parent 2123d65584
commit 2e57518d5f
118 changed files with 15715 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
const express = require('express');
const app = express();
app.set('view engine', 'pug');
app.use('/contact', function (request, response) {
response.render('contact', {
title: 'Мои контакты',
emailsVisible: true,
emails: ['gavgav@mycorp.com', 'mioaw@mycorp.com'],
phone: '+1234567890',
});
});
app.use('/', function (request, response) {
response.send('Главная страница');
});
app.listen(3000);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
{
"dependencies": {
"express": "^4.18.2",
"pug": "^3.0.2"
}
}

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>

View File

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

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>