Initial commit 🚀
3
1-node-farm/final/.prettierrc
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"singleQuote": true
|
||||
}
|
||||
57
1-node-farm/final/dev-data/data.json
Normal file
@@ -0,0 +1,57 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"productName": "Fresh Avocados",
|
||||
"image": "🥑",
|
||||
"from": "Spain",
|
||||
"nutrients": "Vitamin B, Vitamin K",
|
||||
"quantity": "4 🥑",
|
||||
"price": "6.50",
|
||||
"organic": true,
|
||||
"description": "A ripe avocado yields to gentle pressure when held in the palm of the hand and squeezed. The fruit is not sweet, but distinctly and subtly flavored, with smooth texture. The avocado is popular in vegetarian cuisine as a substitute for meats in sandwiches and salads because of its high fat content. Generally, avocado is served raw, though some cultivars, including the common 'Hass', can be cooked for a short time without becoming bitter. It is used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices."
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"productName": "Goat and Sheep Cheese",
|
||||
"image": "🧀",
|
||||
"from": "Portugal",
|
||||
"nutrients": "Vitamin A, Calcium",
|
||||
"quantity": "250g",
|
||||
"price": "5.00",
|
||||
"organic": false,
|
||||
"description": "Creamy and distinct in flavor, goat cheese is a dairy product enjoyed around the world. Goat cheese comes in a wide variety of flavors and textures, from soft and spreadable fresh cheese to salty, crumbly aged cheese. Although it’s made using the same coagulation and separation process as cheese made from cow’s milk, goat cheese differs in nutrient content."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"productName": "Apollo Broccoli",
|
||||
"image": "🥦",
|
||||
"from": "Portugal",
|
||||
"nutrients": "Vitamin C, Vitamin K",
|
||||
"quantity": "3 🥦",
|
||||
"price": "5.50",
|
||||
"organic": true,
|
||||
"description": "Broccoli is known to be a hearty and tasty vegetable which is rich in dozens of nutrients. It is said to pack the most nutritional punch of any vegetable. When we think about green vegetables to include in our diet, broccoli is one of the foremost veggies to come to our mind. Broccoli is a cruciferous vegetable and part of the cabbage family, which includes vegetables such as Brussel sprouts and kale. Although the tastes are different, broccoli and these other vegetables are from the same family."
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"productName": "Baby Carrots",
|
||||
"image": "🥕",
|
||||
"from": "France",
|
||||
"nutrients": "Vitamin A, Vitamin K",
|
||||
"quantity": "20 🥕",
|
||||
"price": "3.00",
|
||||
"organic": true,
|
||||
"description": "The carrot is a root vegetable that is often claimed to be the perfect health food. It is crunchy, tasty and highly nutritious. Carrots are a particularly good source of beta-carotene, fiber, vitamin K, potassium and antioxidants. Carrots have a number of health benefits. They are a weight loss friendly food and have been linked to lower cholesterol levels and improved eye health."
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"productName": "Sweet Corncobs",
|
||||
"image": "🌽",
|
||||
"from": "Germany",
|
||||
"nutrients": "Vitamin C, Magnesium",
|
||||
"quantity": "2 🌽",
|
||||
"price": "2.00",
|
||||
"organic": false,
|
||||
"description": "Also known as maize, corn is one of the most popular cereal grains in the world. Popcorn and sweet corn are commonly eaten varieties, but refined corn products are also widely consumed, frequently as ingredients in foods. These include tortillas, tortilla chips, polenta, cornmeal, corn flour, corn syrup, and corn oil. Whole-grain corn is as healthy as any cereal grain, rich in fiber and many vitamins, minerals, and antioxidants."
|
||||
}
|
||||
]
|
||||
96
1-node-farm/final/index.js
Normal file
@@ -0,0 +1,96 @@
|
||||
const fs = require('fs');
|
||||
const http = require('http');
|
||||
const url = require('url');
|
||||
const slugify = require('slugify');
|
||||
const replaceTemplate = require('./modules/replaceTemplate');
|
||||
|
||||
/////////////////////////////////
|
||||
// FILES
|
||||
|
||||
// Blocking, synchronous way
|
||||
// const textIn = fs.readFileSync('./txt/input.txt', 'utf-8');
|
||||
// console.log(textIn);
|
||||
// const textOut = `This is what we know about the avocado: ${textIn}.\nCreated on ${Date.now()}`;
|
||||
// fs.writeFileSync('./txt/output.txt', textOut);
|
||||
// console.log('File written!');
|
||||
|
||||
// Non-blocking, asynchronous way
|
||||
// fs.readFile('./txt/start.txt', 'utf-8', (err, data1) => {
|
||||
// if (err) return console.log('ERROR! 💥');
|
||||
|
||||
// fs.readFile(`./txt/${data1}.txt`, 'utf-8', (err, data2) => {
|
||||
// console.log(data2);
|
||||
// fs.readFile('./txt/append.txt', 'utf-8', (err, data3) => {
|
||||
// console.log(data3);
|
||||
|
||||
// fs.writeFile('./txt/final.txt', `${data2}\n${data3}`, 'utf-8', err => {
|
||||
// console.log('Your file has been written 😁');
|
||||
// })
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// console.log('Will read file!');
|
||||
|
||||
/////////////////////////////////
|
||||
// SERVER
|
||||
const tempOverview = fs.readFileSync(
|
||||
`${__dirname}/templates/template-overview.html`,
|
||||
'utf-8'
|
||||
);
|
||||
const tempCard = fs.readFileSync(
|
||||
`${__dirname}/templates/template-card.html`,
|
||||
'utf-8'
|
||||
);
|
||||
const tempProduct = fs.readFileSync(
|
||||
`${__dirname}/templates/template-product.html`,
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
const data = fs.readFileSync(`${__dirname}/dev-data/data.json`, 'utf-8');
|
||||
const dataObj = JSON.parse(data);
|
||||
|
||||
const slugs = dataObj.map(el => slugify(el.productName, { lower: true }));
|
||||
console.log(slugs);
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
const { query, pathname } = url.parse(req.url, true);
|
||||
|
||||
// Overview page
|
||||
if (pathname === '/' || pathname === '/overview') {
|
||||
res.writeHead(200, {
|
||||
'Content-type': 'text/html'
|
||||
});
|
||||
|
||||
const cardsHtml = dataObj.map(el => replaceTemplate(tempCard, el)).join('');
|
||||
const output = tempOverview.replace('{%PRODUCT_CARDS%}', cardsHtml);
|
||||
res.end(output);
|
||||
|
||||
// Product page
|
||||
} else if (pathname === '/product') {
|
||||
res.writeHead(200, {
|
||||
'Content-type': 'text/html'
|
||||
});
|
||||
const product = dataObj[query.id];
|
||||
const output = replaceTemplate(tempProduct, product);
|
||||
res.end(output);
|
||||
|
||||
// API
|
||||
} else if (pathname === '/api') {
|
||||
res.writeHead(200, {
|
||||
'Content-type': 'application/json'
|
||||
});
|
||||
res.end(data);
|
||||
|
||||
// Not found
|
||||
} else {
|
||||
res.writeHead(404, {
|
||||
'Content-type': 'text/html',
|
||||
'my-own-header': 'hello-world'
|
||||
});
|
||||
res.end('<h1>Page not found!</h1>');
|
||||
}
|
||||
});
|
||||
|
||||
server.listen(8000, '127.0.0.1', () => {
|
||||
console.log('Listening to requests on port 8000');
|
||||
});
|
||||
13
1-node-farm/final/modules/replaceTemplate.js
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = (temp, product) => {
|
||||
let output = temp.replace(/{%PRODUCTNAME%}/g, product.productName);
|
||||
output = output.replace(/{%IMAGE%}/g, product.image);
|
||||
output = output.replace(/{%PRICE%}/g, product.price);
|
||||
output = output.replace(/{%FROM%}/g, product.from);
|
||||
output = output.replace(/{%NUTRIENTS%}/g, product.nutrients);
|
||||
output = output.replace(/{%QUANTITY%}/g, product.quantity);
|
||||
output = output.replace(/{%DESCRIPTION%}/g, product.description);
|
||||
output = output.replace(/{%ID%}/g, product.id);
|
||||
|
||||
if(!product.organic) output = output.replace(/{%NOT_ORGANIC%}/g, 'not-organic');
|
||||
return output;
|
||||
}
|
||||
2558
1-node-farm/final/package-lock.json
generated
Normal file
17
1-node-farm/final/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "node-farm",
|
||||
"version": "1.0.0",
|
||||
"description": "Learning node.js",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "nodemon index.js"
|
||||
},
|
||||
"author": "Jonas Schmedtmann",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"slugify": "~1.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.18.11"
|
||||
}
|
||||
}
|
||||
24
1-node-farm/final/templates/template-card.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<figure class="card">
|
||||
<div class="card__emoji">{%IMAGE%}{%IMAGE%}</div>
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">{%PRODUCTNAME%}</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box {%NOT_ORGANIC%}">
|
||||
<h6 class="card__detail card__detail--organic">Organic!</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">{%QUANTITY%} per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">{%PRICE%}€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="/product?id={%ID%}">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
199
1-node-farm/final/templates/template-overview.html
Normal file
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Megrim|Nunito+Sans:400,900"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/155/ear-of-maize_1f33d.png"
|
||||
/>
|
||||
|
||||
<title>NODE FARM</title>
|
||||
|
||||
<style>
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 5rem 5rem 10rem;
|
||||
line-height: 1.7;
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
color: #555;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom right, #9be15d, #00e3ae);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 6rem;
|
||||
color: white;
|
||||
transform: skewY(-5deg);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
word-spacing: 3px;
|
||||
}
|
||||
|
||||
h1::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 65%;
|
||||
width: 49%;
|
||||
position: absolute;
|
||||
top: 105%;
|
||||
left: 50%;
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.8;
|
||||
z-index: -1;
|
||||
transform: skewY(370deg) translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 95rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.cards-container {
|
||||
margin-top: 8rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
box-shadow: 0 2rem 6rem 1rem rgba(0, 0, 0, 0.15);
|
||||
margin-bottom: 5rem;
|
||||
transform: skewX(-20deg);
|
||||
display: flex;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.card__emoji {
|
||||
font-size: 5.5rem;
|
||||
line-height: 1.2;
|
||||
padding: 1.5rem 6rem 0.5rem 1.5rem;
|
||||
letter-spacing: -4rem;
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card__title-box {
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
margin-right: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 3rem;
|
||||
}
|
||||
|
||||
.card__title {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
color: white;
|
||||
font-size: 3.25rem;
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card__details {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.card__detail-box {
|
||||
align-self: stretch;
|
||||
border-right: 1px solid #ddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card__detail-box:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.card__detail {
|
||||
font-weight: 400;
|
||||
font-size: 1.8rem;
|
||||
transform: skewX(20deg);
|
||||
padding: 1.75rem;
|
||||
}
|
||||
|
||||
.card__detail--organic {
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.9rem;
|
||||
background-image: linear-gradient(to right, #9be15d, #00e3ae);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.card__detail--price {
|
||||
font-weight: 900;
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
|
||||
.card__link:link,
|
||||
.card__link:visited {
|
||||
flex: 0 0 auto;
|
||||
background-color: #79e17b;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
padding: 2.5rem;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.card__link:hover,
|
||||
.card__link:active {
|
||||
background-color: #9be15d;
|
||||
}
|
||||
|
||||
.card__link span {
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: skewX(-20deg) scale(1.08);
|
||||
box-shadow: 0 3rem 8rem 2rem rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.emoji-left {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.emoji-right {
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.not-organic {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🌽 Node Farm 🥦</h1>
|
||||
|
||||
<div class="cards-container">
|
||||
{%PRODUCT_CARDS%}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
308
1-node-farm/final/templates/template-product.html
Normal file
@@ -0,0 +1,308 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Megrim|Nunito+Sans:400,900"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/155/ear-of-maize_1f33d.png"
|
||||
/>
|
||||
|
||||
<title>{%PRODUCTNAME%} {%IMAGE%} /// NODE FARM</title>
|
||||
|
||||
<style>
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 5rem 5rem 10rem;
|
||||
line-height: 1.7;
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
color: #555;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom right, #9be15d, #00e3ae);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 6rem;
|
||||
color: white;
|
||||
transform: skewY(-5deg);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
word-spacing: 3px;
|
||||
}
|
||||
|
||||
h1::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 65%;
|
||||
width: 49%;
|
||||
position: absolute;
|
||||
top: 105%;
|
||||
left: 50%;
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.8;
|
||||
z-index: -1;
|
||||
transform: skewY(370deg) translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 95rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.product {
|
||||
width: 60rem;
|
||||
margin: 0 auto;
|
||||
margin-top: 9rem;
|
||||
background: white;
|
||||
box-shadow: 0 3rem 6rem 1rem rgba(0, 0, 0, 0.2);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product__hero {
|
||||
position: relative;
|
||||
height: 22rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.product__hero::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-image: linear-gradient(to left bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.5;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.product__emoji {
|
||||
font-size: 15rem;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.product__emoji--1 {
|
||||
top: -4rem;
|
||||
left: -2rem;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.product__emoji--2 {
|
||||
top: -6rem;
|
||||
left: 9rem;
|
||||
}
|
||||
|
||||
.product__emoji--3 {
|
||||
top: -4rem;
|
||||
right: 15rem;
|
||||
}
|
||||
|
||||
.product__emoji--4 {
|
||||
top: -5rem;
|
||||
right: 2rem;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.product__emoji--5 {
|
||||
bottom: -9rem;
|
||||
left: 18rem;
|
||||
}
|
||||
|
||||
.product__emoji--6 {
|
||||
bottom: -8rem;
|
||||
left: 5rem;
|
||||
}
|
||||
|
||||
.product__emoji--7 {
|
||||
bottom: -12rem;
|
||||
right: 14rem;
|
||||
}
|
||||
|
||||
.product__emoji--8 {
|
||||
bottom: -8rem;
|
||||
right: -2rem;
|
||||
}
|
||||
|
||||
.product__emoji--9 {
|
||||
top: -7rem;
|
||||
left: 19rem;
|
||||
}
|
||||
|
||||
.product__organic {
|
||||
position: absolute;
|
||||
top: -4rem;
|
||||
right: -4rem;
|
||||
z-index: 1000;
|
||||
height: 11rem;
|
||||
width: 11rem;
|
||||
background-image: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
border-radius: 50%;
|
||||
transform: rotate(15deg);
|
||||
box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.product__organic h5 {
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.8rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.product__back:link,
|
||||
.product__back:visited {
|
||||
position: absolute;
|
||||
top: 2rem;
|
||||
left: 2rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
z-index: 1000;
|
||||
color: #555;
|
||||
background-color: white;
|
||||
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
|
||||
border-radius: 100rem;
|
||||
padding: 0 2rem;
|
||||
transition: all 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.product__back:hover,
|
||||
.product__back:active {
|
||||
background-color: #79e17b;
|
||||
}
|
||||
|
||||
.product__name {
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
padding: 1rem;
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 4rem;
|
||||
color: white;
|
||||
text-align: center;
|
||||
word-spacing: 2px;
|
||||
}
|
||||
|
||||
.product__details {
|
||||
background-color: #eee;
|
||||
padding: 4rem 6rem;
|
||||
font-size: 1.9rem;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: 1.5rem;
|
||||
}
|
||||
|
||||
.product__description {
|
||||
padding: 5rem 6rem;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.product__link:link,
|
||||
.product__link:visited {
|
||||
display: block;
|
||||
background-color: #79e17b;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
padding: 1.5rem;
|
||||
text-align: center;
|
||||
transform: scale(1.07) skewX(-20deg);
|
||||
box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.product__link:hover,
|
||||
.product__link:active {
|
||||
background-color: #9be15d;
|
||||
transform: scale(1.1) skewX(-20deg);
|
||||
}
|
||||
|
||||
.product__link span {
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.emoji-left {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.emoji-right {
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.not-organic {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🌽 Node Farm 🥦</h1>
|
||||
|
||||
<figure class="product">
|
||||
<div class="product__organic {%NOT_ORGANIC%}"><h5>Organic</h5></div>
|
||||
<a href="/overview" class="product__back">
|
||||
<span class="emoji-left">👈</span>Back
|
||||
</a>
|
||||
<div class="product__hero">
|
||||
<span class="product__emoji product__emoji--1">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--2">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--3">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--4">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--5">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--6">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--7">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--8">{%IMAGE%}</span>
|
||||
<span class="product__emoji product__emoji--9">{%IMAGE%}</span>
|
||||
</div>
|
||||
<h2 class="product__name">{%PRODUCTNAME%}</h2>
|
||||
<div class="product__details">
|
||||
<p><span class="emoji-left">🌍</span>From {%FROM%}</p>
|
||||
<p><span class="emoji-left">❤️</span>{%NUTRIENTS%}</p>
|
||||
<p><span class="emoji-left">📦</span>{%QUANTITY%}</p>
|
||||
<p><span class="emoji-left">🏷</span>{%PRICE%}€</p>
|
||||
</div>
|
||||
|
||||
<a href="#" class="product__link">
|
||||
<span class="emoji-left">🛒</span>
|
||||
<span>Add to shopping card ({%PRICE%}€)</span>
|
||||
</a>
|
||||
|
||||
<p class="product__description">
|
||||
{%DESCRIPTION%}
|
||||
</p>
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
1-node-farm/final/txt/append.txt
Normal file
@@ -0,0 +1 @@
|
||||
APPENDIX: Generally, avocados 🥑 are served raw, but some cultivars can be cooked for a short time without becoming bitter.
|
||||
2
1-node-farm/final/txt/final.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
The avocado 🥑 is also used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices.
|
||||
APPENDIX: Generally, avocados 🥑 are served raw, but some cultivars can be cooked for a short time without becoming bitter.
|
||||
1
1-node-farm/final/txt/input.txt
Normal file
@@ -0,0 +1 @@
|
||||
The avocado 🥑 is popular in vegetarian cuisine as a substitute for meats in sandwiches and salads because of its high fat content 😄
|
||||
2
1-node-farm/final/txt/output.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
This is what we know about the avocado: The avocado 🥑 is popular in vegetarian cuisine as a substitute for meats in sandwiches and salads because of its high fat content 😄.
|
||||
Created on 1555080042101
|
||||
1
1-node-farm/final/txt/read-this.txt
Normal file
@@ -0,0 +1 @@
|
||||
The avocado 🥑 is also used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices.
|
||||
1
1-node-farm/final/txt/start.txt
Normal file
@@ -0,0 +1 @@
|
||||
read-this
|
||||
57
1-node-farm/starter/dev-data/data.json
Normal file
@@ -0,0 +1,57 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"productName": "Fresh Avocados",
|
||||
"image": "🥑",
|
||||
"from": "Spain",
|
||||
"nutrients": "Vitamin B, Vitamin K",
|
||||
"quantity": "4 🥑",
|
||||
"price": "6.50",
|
||||
"organic": true,
|
||||
"description": "A ripe avocado yields to gentle pressure when held in the palm of the hand and squeezed. The fruit is not sweet, but distinctly and subtly flavored, with smooth texture. The avocado is popular in vegetarian cuisine as a substitute for meats in sandwiches and salads because of its high fat content. Generally, avocado is served raw, though some cultivars, including the common 'Hass', can be cooked for a short time without becoming bitter. It is used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices."
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"productName": "Goat and Sheep Cheese",
|
||||
"image": "🧀",
|
||||
"from": "Portugal",
|
||||
"nutrients": "Vitamin A, Calcium",
|
||||
"quantity": "250g",
|
||||
"price": "5.00",
|
||||
"organic": false,
|
||||
"description": "Creamy and distinct in flavor, goat cheese is a dairy product enjoyed around the world. Goat cheese comes in a wide variety of flavors and textures, from soft and spreadable fresh cheese to salty, crumbly aged cheese. Although it’s made using the same coagulation and separation process as cheese made from cow’s milk, goat cheese differs in nutrient content."
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"productName": "Apollo Broccoli",
|
||||
"image": "🥦",
|
||||
"from": "Portugal",
|
||||
"nutrients": "Vitamin C, Vitamin K",
|
||||
"quantity": "3 🥦",
|
||||
"price": "5.50",
|
||||
"organic": true,
|
||||
"description": "Broccoli is known to be a hearty and tasty vegetable which is rich in dozens of nutrients. It is said to pack the most nutritional punch of any vegetable. When we think about green vegetables to include in our diet, broccoli is one of the foremost veggies to come to our mind. Broccoli is a cruciferous vegetable and part of the cabbage family, which includes vegetables such as Brussel sprouts and kale. Although the tastes are different, broccoli and these other vegetables are from the same family."
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"productName": "Baby Carrots",
|
||||
"image": "🥕",
|
||||
"from": "France",
|
||||
"nutrients": "Vitamin A, Vitamin K",
|
||||
"quantity": "20 🥕",
|
||||
"price": "3.00",
|
||||
"organic": true,
|
||||
"description": "The carrot is a root vegetable that is often claimed to be the perfect health food. It is crunchy, tasty and highly nutritious. Carrots are a particularly good source of beta-carotene, fiber, vitamin K, potassium and antioxidants. Carrots have a number of health benefits. They are a weight loss friendly food and have been linked to lower cholesterol levels and improved eye health."
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"productName": "Sweet Corncobs",
|
||||
"image": "🌽",
|
||||
"from": "Germany",
|
||||
"nutrients": "Vitamin C, Magnesium",
|
||||
"quantity": "2 🌽",
|
||||
"price": "2.00",
|
||||
"organic": false,
|
||||
"description": "Also known as maize, corn is one of the most popular cereal grains in the world. Popcorn and sweet corn are commonly eaten varieties, but refined corn products are also widely consumed, frequently as ingredients in foods. These include tortillas, tortilla chips, polenta, cornmeal, corn flour, corn syrup, and corn oil. Whole-grain corn is as healthy as any cereal grain, rich in fiber and many vitamins, minerals, and antioxidants."
|
||||
}
|
||||
]
|
||||
315
1-node-farm/starter/templates/overview.html
Normal file
@@ -0,0 +1,315 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Megrim|Nunito+Sans:400,900"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/155/ear-of-maize_1f33d.png"
|
||||
/>
|
||||
|
||||
<title>NODE FARM</title>
|
||||
|
||||
<style>
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 5rem 5rem 10rem;
|
||||
line-height: 1.7;
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
color: #555;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom right, #9be15d, #00e3ae);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 6rem;
|
||||
color: white;
|
||||
transform: skewY(-5deg);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
word-spacing: 3px;
|
||||
}
|
||||
|
||||
h1::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 65%;
|
||||
width: 49%;
|
||||
position: absolute;
|
||||
top: 105%;
|
||||
left: 50%;
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.8;
|
||||
z-index: -1;
|
||||
transform: skewY(370deg) translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 95rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.cards-container {
|
||||
margin-top: 8rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
box-shadow: 0 2rem 6rem 1rem rgba(0, 0, 0, 0.15);
|
||||
margin-bottom: 5rem;
|
||||
transform: skewX(-20deg);
|
||||
display: flex;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.card__emoji {
|
||||
font-size: 5.5rem;
|
||||
line-height: 1.2;
|
||||
padding: 1.5rem 6rem 0.5rem 1.5rem;
|
||||
letter-spacing: -4rem;
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card__title-box {
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
margin-right: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 3rem;
|
||||
}
|
||||
|
||||
.card__title {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
color: white;
|
||||
font-size: 3.25rem;
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card__details {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.card__detail-box {
|
||||
align-self: stretch;
|
||||
border-right: 1px solid #ddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card__detail-box:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.card__detail {
|
||||
font-weight: 400;
|
||||
font-size: 1.8rem;
|
||||
transform: skewX(20deg);
|
||||
padding: 1.75rem;
|
||||
}
|
||||
|
||||
.card__detail--organic {
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.9rem;
|
||||
background-image: linear-gradient(to right, #9be15d, #00e3ae);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.card__detail--price {
|
||||
font-weight: 900;
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
|
||||
.card__link:link,
|
||||
.card__link:visited {
|
||||
flex: 0 0 auto;
|
||||
background-color: #79e17b;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
padding: 2.5rem;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.card__link:hover,
|
||||
.card__link:active {
|
||||
background-color: #9be15d;
|
||||
}
|
||||
|
||||
.card__link span {
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: skewX(-20deg) scale(1.08);
|
||||
box-shadow: 0 3rem 8rem 2rem rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.emoji-left {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.emoji-right {
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.not-organic {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🌽 Node Farm 🥦</h1>
|
||||
|
||||
<div class="cards-container">
|
||||
<figure class="card">
|
||||
<div class="card__emoji">🥑🥑</div>
|
||||
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">Fresh Avocado</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--organic">Organic!</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">4 🥑 per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">6.50€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="#">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<figure class="card">
|
||||
<div class="card__emoji">🧀🧀</div>
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">Goat and Sheep Cheese</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">250g per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">5.00€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="#">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<figure class="card">
|
||||
<div class="card__emoji">🥦🥦</div>
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">Apollo Broccoli</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--organic">Organic!</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">3 🥦 per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">5.50€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="#">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<figure class="card">
|
||||
<div class="card__emoji">🥕🥕</div>
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">Baby Carrots</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--organic">Organic!</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">20 🥕 per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">3.00€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="#">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
|
||||
<figure class="card">
|
||||
<div class="card__emoji">🌽🌽</div>
|
||||
<div class="card__title-box">
|
||||
<h2 class="card__title">Sweet Corncobs</h2>
|
||||
</div>
|
||||
|
||||
<div class="card__details">
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail">2 🌽 per 📦</h6>
|
||||
</div>
|
||||
|
||||
<div class="card__detail-box">
|
||||
<h6 class="card__detail card__detail--price">2.00€</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="card__link" href="#">
|
||||
<span>Detail <i class="emoji-right">👉</i></span>
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
316
1-node-farm/starter/templates/product.html
Normal file
@@ -0,0 +1,316 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Megrim|Nunito+Sans:400,900"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
href="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/155/ear-of-maize_1f33d.png"
|
||||
/>
|
||||
|
||||
<title>Fresh Avocados 🥑 /// NODE FARM</title>
|
||||
|
||||
<style>
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 62.5%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 5rem 5rem 10rem;
|
||||
line-height: 1.7;
|
||||
font-family: 'Nunito Sans', sans-serif;
|
||||
color: #555;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to bottom right, #9be15d, #00e3ae);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 6rem;
|
||||
color: white;
|
||||
transform: skewY(-5deg);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
word-spacing: 3px;
|
||||
}
|
||||
|
||||
h1::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 65%;
|
||||
width: 49%;
|
||||
position: absolute;
|
||||
top: 105%;
|
||||
left: 50%;
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.8;
|
||||
z-index: -1;
|
||||
transform: skewY(370deg) translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 95rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.product {
|
||||
width: 60rem;
|
||||
margin: 0 auto;
|
||||
margin-top: 9rem;
|
||||
background: white;
|
||||
box-shadow: 0 3rem 6rem 1rem rgba(0, 0, 0, 0.2);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product__hero {
|
||||
position: relative;
|
||||
height: 22rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.product__hero::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-image: linear-gradient(to left bottom, #9be15d, #00e3ae);
|
||||
opacity: 0.5;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.product__emoji {
|
||||
font-size: 15rem;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.product__emoji--1 {
|
||||
top: -4rem;
|
||||
left: -2rem;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.product__emoji--2 {
|
||||
top: -6rem;
|
||||
left: 9rem;
|
||||
}
|
||||
|
||||
.product__emoji--3 {
|
||||
top: -4rem;
|
||||
right: 15rem;
|
||||
}
|
||||
|
||||
.product__emoji--4 {
|
||||
top: -5rem;
|
||||
right: 2rem;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.product__emoji--5 {
|
||||
bottom: -9rem;
|
||||
left: 18rem;
|
||||
}
|
||||
|
||||
.product__emoji--6 {
|
||||
bottom: -8rem;
|
||||
left: 5rem;
|
||||
}
|
||||
|
||||
.product__emoji--7 {
|
||||
bottom: -12rem;
|
||||
right: 14rem;
|
||||
}
|
||||
|
||||
.product__emoji--8 {
|
||||
bottom: -8rem;
|
||||
right: -2rem;
|
||||
}
|
||||
|
||||
.product__emoji--9 {
|
||||
top: -7rem;
|
||||
left: 19rem;
|
||||
}
|
||||
|
||||
.product__organic {
|
||||
position: absolute;
|
||||
top: -4rem;
|
||||
right: -4rem;
|
||||
z-index: 1000;
|
||||
height: 11rem;
|
||||
width: 11rem;
|
||||
background-image: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
border-radius: 50%;
|
||||
transform: rotate(15deg);
|
||||
box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.product__organic h5 {
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.8rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.product__back:link,
|
||||
.product__back:visited {
|
||||
position: absolute;
|
||||
top: 2rem;
|
||||
left: 2rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
z-index: 1000;
|
||||
color: #555;
|
||||
background-color: white;
|
||||
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
|
||||
border-radius: 100rem;
|
||||
padding: 0 2rem;
|
||||
transition: all 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.product__back:hover,
|
||||
.product__back:active {
|
||||
background-color: #79e17b;
|
||||
}
|
||||
|
||||
.product__name {
|
||||
background: linear-gradient(to bottom, #9be15d, #00e3ae);
|
||||
padding: 1rem;
|
||||
font-family: 'Megrim', sans-serif;
|
||||
font-size: 4rem;
|
||||
color: white;
|
||||
text-align: center;
|
||||
word-spacing: 2px;
|
||||
}
|
||||
|
||||
.product__details {
|
||||
background-color: #eee;
|
||||
padding: 4rem 6rem;
|
||||
font-size: 1.9rem;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: 1.5rem;
|
||||
}
|
||||
|
||||
.product__description {
|
||||
padding: 5rem 6rem;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.product__link:link,
|
||||
.product__link:visited {
|
||||
display: block;
|
||||
background-color: #79e17b;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
padding: 1.5rem;
|
||||
text-align: center;
|
||||
transform: scale(1.07) skewX(-20deg);
|
||||
box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.product__link:hover,
|
||||
.product__link:active {
|
||||
background-color: #9be15d;
|
||||
transform: scale(1.1) skewX(-20deg);
|
||||
}
|
||||
|
||||
.product__link span {
|
||||
transform: skewX(20deg);
|
||||
}
|
||||
|
||||
.emoji-left {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.emoji-right {
|
||||
font-size: 2rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.not-organic {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🌽 Node Farm 🥦</h1>
|
||||
|
||||
<figure class="product">
|
||||
<div class="product__organic"><h5>Organic</h5></div>
|
||||
<a href="#" class="product__back">
|
||||
<span class="emoji-left">👈</span>Back
|
||||
</a>
|
||||
<div class="product__hero">
|
||||
<span class="product__emoji product__emoji--1">🥑</span>
|
||||
<span class="product__emoji product__emoji--2">🥑</span>
|
||||
<span class="product__emoji product__emoji--3">🥑</span>
|
||||
<span class="product__emoji product__emoji--4">🥑</span>
|
||||
<span class="product__emoji product__emoji--5">🥑</span>
|
||||
<span class="product__emoji product__emoji--6">🥑</span>
|
||||
<span class="product__emoji product__emoji--7">🥑</span>
|
||||
<span class="product__emoji product__emoji--8">🥑</span>
|
||||
<span class="product__emoji product__emoji--9">🥑</span>
|
||||
</div>
|
||||
<h2 class="product__name">Fresh Avocados</h2>
|
||||
<div class="product__details">
|
||||
<p><span class="emoji-left">🌍</span> From Portugal</p>
|
||||
<p><span class="emoji-left">❤️</span> Vitamin B, Vitamin K</p>
|
||||
<p><span class="emoji-left">📦</span> 4 🥑</p>
|
||||
<p><span class="emoji-left">🏷</span> 6.50€</p>
|
||||
</div>
|
||||
|
||||
<a href="#" class="product__link">
|
||||
<span class="emoji-left">🛒</span>
|
||||
<span>Add to shopping card (6.50€)</span>
|
||||
</a>
|
||||
|
||||
<p class="product__description">
|
||||
A ripe avocado yields to gentle pressure when held in the palm of the
|
||||
hand and squeezed. The fruit is not sweet, but distinctly and subtly
|
||||
flavored, with smooth texture. The avocado is popular in vegetarian
|
||||
cuisine as a substitute for meats in sandwiches and salads because of
|
||||
its high fat content. Generally, avocado is served raw, though some
|
||||
cultivars, including the common 'Hass', can be cooked for a short time
|
||||
without becoming bitter. It is used as the base for the Mexican dip
|
||||
known as guacamole, as well as a spread on corn tortillas or toast,
|
||||
served with spices.
|
||||
</p>
|
||||
</figure>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
1-node-farm/starter/txt/append.txt
Normal file
@@ -0,0 +1 @@
|
||||
APPENDIX: Generally, avocados 🥑 are served raw, but some cultivars can be cooked for a short time without becoming bitter.
|
||||
1
1-node-farm/starter/txt/final.txt
Normal file
@@ -0,0 +1 @@
|
||||
The avocado 🥑 is also used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices. APPENDIX: Generally, avocados 🥑 are served raw, but some cultivars can be cooked for a short time without becoming bitter.
|
||||
1
1-node-farm/starter/txt/input.txt
Normal file
@@ -0,0 +1 @@
|
||||
The avocado 🥑 is popular in vegetarian cuisine as a substitute for meats in sandwiches and salads because of its high fat content 😄
|
||||
1
1-node-farm/starter/txt/read-this.txt
Normal file
@@ -0,0 +1 @@
|
||||
The avocado 🥑 is also used as the base for the Mexican dip known as guacamole, as well as a spread on corn tortillas or toast, served with spices.
|
||||
1
1-node-farm/starter/txt/start.txt
Normal file
@@ -0,0 +1 @@
|
||||
read-this
|
||||
33
2-how-node-works/final/event-loop.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const fs = require("fs");
|
||||
const crypto = require("crypto");
|
||||
|
||||
const start = Date.now();
|
||||
process.env.UV_THREADPOOL_SIZE = 4;
|
||||
|
||||
setTimeout(() => console.log("Timer 1 finished"), 0);
|
||||
setImmediate(() => console.log("Immediate 1 finished"));
|
||||
|
||||
fs.readFile("test-file.txt", () => {
|
||||
console.log("I/O finished");
|
||||
console.log("----------------");
|
||||
|
||||
setTimeout(() => console.log("Timer 2 finished"), 0);
|
||||
setTimeout(() => console.log("Timer 3 finished"), 3000);
|
||||
setImmediate(() => console.log("Immediate 2 finished"));
|
||||
|
||||
process.nextTick(() => console.log("Process.nextTick"));
|
||||
|
||||
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
|
||||
console.log(Date.now() - start, "Password encrypted");
|
||||
|
||||
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
|
||||
console.log(Date.now() - start, "Password encrypted");
|
||||
|
||||
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
|
||||
console.log(Date.now() - start, "Password encrypted");
|
||||
|
||||
crypto.pbkdf2Sync("password", "salt", 100000, 1024, "sha512");
|
||||
console.log(Date.now() - start, "Password encrypted");
|
||||
});
|
||||
|
||||
console.log("Hello from the top-level code");
|
||||
46
2-how-node-works/final/events.js
Normal file
@@ -0,0 +1,46 @@
|
||||
const EventEmitter = require("events");
|
||||
const http = require("http");
|
||||
|
||||
class Sales extends EventEmitter {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
const myEmitter = new Sales();
|
||||
|
||||
myEmitter.on("newSale", () => {
|
||||
console.log("There was a new sale!");
|
||||
});
|
||||
|
||||
myEmitter.on("newSale", () => {
|
||||
console.log("Costumer name: Jonas");
|
||||
});
|
||||
|
||||
myEmitter.on("newSale", stock => {
|
||||
console.log(`There are now ${stock} items left in stock.`);
|
||||
});
|
||||
|
||||
myEmitter.emit("newSale", 9);
|
||||
|
||||
//////////////////
|
||||
|
||||
const server = http.createServer();
|
||||
|
||||
server.on("request", (req, res) => {
|
||||
console.log("Request received!");
|
||||
console.log(req.url);
|
||||
res.end("Request received");
|
||||
});
|
||||
|
||||
server.on("request", (req, res) => {
|
||||
console.log("Another request 😀");
|
||||
});
|
||||
|
||||
server.on("close", () => {
|
||||
console.log("Server closed");
|
||||
});
|
||||
|
||||
server.listen(8000, "127.0.0.1", () => {
|
||||
console.log("Waiting for requests...");
|
||||
});
|
||||
17
2-how-node-works/final/modules.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// console.log(arguments);
|
||||
// console.log(require("module").wrapper);
|
||||
|
||||
// module.exports
|
||||
const C = require("./test-module-1");
|
||||
const calc1 = new C();
|
||||
console.log(calc1.add(2, 5));
|
||||
|
||||
// exports
|
||||
// const calc2 = require("./test-module-2");
|
||||
const { add, multiply } = require("./test-module-2");
|
||||
console.log(multiply(2, 5));
|
||||
|
||||
// caching
|
||||
require("./test-module-3")();
|
||||
require("./test-module-3")();
|
||||
require("./test-module-3")();
|
||||
33
2-how-node-works/final/streams.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const fs = require("fs");
|
||||
const server = require("http").createServer();
|
||||
|
||||
server.on("request", (req, res) => {
|
||||
// Solution 1
|
||||
// fs.readFile("test-file.txt", (err, data) => {
|
||||
// if (err) console.log(err);
|
||||
// res.end(data);
|
||||
// });
|
||||
|
||||
// Solution 2: Streams
|
||||
// const readable = fs.createReadStream("test-file.txt");
|
||||
// readable.on("data", chunk => {
|
||||
// res.write(chunk);
|
||||
// });
|
||||
// readable.on("end", () => {
|
||||
// res.end();
|
||||
// });
|
||||
// readable.on("error", err => {
|
||||
// console.log(err);
|
||||
// res.statusCode = 500;
|
||||
// res.end("File not found!");
|
||||
// });
|
||||
|
||||
// Solution 3
|
||||
const readable = fs.createReadStream("test-file.txt");
|
||||
readable.pipe(res);
|
||||
// readableSource.pipe(writeableDest)
|
||||
});
|
||||
|
||||
server.listen(8000, "127.0.0.1", () => {
|
||||
console.log("Listening...");
|
||||
});
|
||||
1000001
2-how-node-works/final/test-file.txt
Normal file
27
2-how-node-works/final/test-module-1.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// class Calculator {
|
||||
// add(a, b) {
|
||||
// return a + b;
|
||||
// }
|
||||
|
||||
// multiply(a, b) {
|
||||
// return a * b;
|
||||
// }
|
||||
|
||||
// divide(a, b) {
|
||||
// return a / b;
|
||||
// }
|
||||
// }
|
||||
|
||||
module.exports = class {
|
||||
add(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
multiply(a, b) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
divide(a, b) {
|
||||
return a / b;
|
||||
}
|
||||
};
|
||||
3
2-how-node-works/final/test-module-2.js
Normal file
@@ -0,0 +1,3 @@
|
||||
exports.add = (a, b) => a + b;
|
||||
exports.multiply = (a, b) => a * b;
|
||||
exports.divide = (a, b) => a / b;
|
||||
3
2-how-node-works/final/test-module-3.js
Normal file
@@ -0,0 +1,3 @@
|
||||
console.log("Hello from the module");
|
||||
|
||||
module.exports = () => console.log("Log this beautiful text 😍");
|
||||
1000001
2-how-node-works/starter/test-file.txt
Normal file
4
3-asynchronous-JS/final/.prettierrc
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"printWidth": 80
|
||||
}
|
||||
3
3-asynchronous-JS/final/dog-img.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
https://images.dog.ceo/breeds/labrador/n02099712_7411.jpg
|
||||
https://images.dog.ceo/breeds/labrador/n02099712_6644.jpg
|
||||
https://images.dog.ceo/breeds/labrador/n02099712_4705.jpg
|
||||
1
3-asynchronous-JS/final/dog.txt
Normal file
@@ -0,0 +1 @@
|
||||
labrador
|
||||
88
3-asynchronous-JS/final/index.js
Normal file
@@ -0,0 +1,88 @@
|
||||
const fs = require('fs');
|
||||
const superagent = require('superagent');
|
||||
|
||||
const readFilePro = file => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile(file, (err, data) => {
|
||||
if (err) reject('I could not find that file 😢');
|
||||
resolve(data);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const writeFilePro = (file, data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.writeFile(file, data, err => {
|
||||
if (err) reject('Could not write file 😢');
|
||||
resolve('success');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const getDogPic = async () => {
|
||||
try {
|
||||
const data = await readFilePro(`${__dirname}/dog.txt`);
|
||||
console.log(`Breed: ${data}`);
|
||||
|
||||
const res1Pro = superagent.get(
|
||||
`https://dog.ceo/api/breed/${data}/images/random`
|
||||
);
|
||||
const res2Pro = superagent.get(
|
||||
`https://dog.ceo/api/breed/${data}/images/random`
|
||||
);
|
||||
const res3Pro = superagent.get(
|
||||
`https://dog.ceo/api/breed/${data}/images/random`
|
||||
);
|
||||
const all = await Promise.all([res1Pro, res2Pro, res3Pro]);
|
||||
const imgs = all.map(el => el.body.message);
|
||||
console.log(imgs);
|
||||
|
||||
await writeFilePro('dog-img.txt', imgs.join('\n'));
|
||||
console.log('Random dog image saved to file!');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
||||
throw err;
|
||||
}
|
||||
return '2: READY 🐶';
|
||||
};
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
console.log('1: Will get dog pics!');
|
||||
const x = await getDogPic();
|
||||
console.log(x);
|
||||
console.log('3: Done getting dog pics!');
|
||||
} catch (err) {
|
||||
console.log('ERROR 💥');
|
||||
}
|
||||
})();
|
||||
|
||||
/*
|
||||
console.log('1: Will get dog pics!');
|
||||
getDogPic()
|
||||
.then(x => {
|
||||
console.log(x);
|
||||
console.log('3: Done getting dog pics!');
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('ERROR 💥');
|
||||
});
|
||||
*/
|
||||
/*
|
||||
readFilePro(`${__dirname}/dog.txt`)
|
||||
.then(data => {
|
||||
console.log(`Breed: ${data}`);
|
||||
return superagent.get(`https://dog.ceo/api/breed/${data}/images/random`);
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res.body.message);
|
||||
return writeFilePro('dog-img.txt', res.body.message);
|
||||
})
|
||||
.then(() => {
|
||||
console.log('Random dog image saved to file!');
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
*/
|
||||
147
3-asynchronous-JS/final/package-lock.json
generated
Normal file
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"name": "3-asynchronous-js",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
|
||||
"integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"component-emitter": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
|
||||
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz",
|
||||
"integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
|
||||
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"formidable": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz",
|
||||
"integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg=="
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
},
|
||||
"methods": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
|
||||
},
|
||||
"mime": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz",
|
||||
"integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg=="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.38.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
|
||||
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.22",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
|
||||
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
|
||||
"requires": {
|
||||
"mime-db": "~1.38.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.7.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
||||
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
|
||||
"integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ=="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
|
||||
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"superagent": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/superagent/-/superagent-5.0.2.tgz",
|
||||
"integrity": "sha512-CqeqvwByDJuLwhcO6NOSuPatyQOIZX/TlvD5GJnXg5tzBTth2xQGZGdAZdo/kX+BtzvwJFX2IGGczTZgEIT7Wg==",
|
||||
"requires": {
|
||||
"component-emitter": "^1.2.1",
|
||||
"cookiejar": "^2.1.2",
|
||||
"debug": "^4.1.1",
|
||||
"form-data": "^2.3.3",
|
||||
"formidable": "^1.2.1",
|
||||
"methods": "^1.1.2",
|
||||
"mime": "^2.4.0",
|
||||
"qs": "^6.7.0",
|
||||
"readable-stream": "^3.2.0",
|
||||
"semver": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
}
|
||||
}
|
||||
}
|
||||
14
3-asynchronous-JS/final/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "3-asynchronous-js",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"superagent": "^5.0.2"
|
||||
}
|
||||
}
|
||||
1
3-asynchronous-JS/starter/dog.txt
Normal file
@@ -0,0 +1 @@
|
||||
retriever
|
||||
19
4-natours/after-section-06/.eslintrc.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": ["airbnb", "prettier", "plugin:node/recommended"],
|
||||
"plugins": ["prettier"],
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"spaced-comment": "off",
|
||||
"no-console": "warn",
|
||||
"consistent-return": "off",
|
||||
"func-names": "off",
|
||||
"object-shorthand": "off",
|
||||
"no-process-exit": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-return-await": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"prefer-destructuring": ["error", { "object": true, "array": false }],
|
||||
"no-unused-vars": ["error", { "argsIgnorePattern": "req|res|next|val" }]
|
||||
}
|
||||
}
|
||||
3
4-natours/after-section-06/.prettierrc
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"singleQuote": true
|
||||
}
|
||||
31
4-natours/after-section-06/app.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const express = require('express');
|
||||
const morgan = require('morgan');
|
||||
|
||||
const tourRouter = require('./routes/tourRoutes');
|
||||
const userRouter = require('./routes/userRoutes');
|
||||
|
||||
const app = express();
|
||||
|
||||
// 1) MIDDLEWARES
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
app.use(morgan('dev'));
|
||||
}
|
||||
|
||||
app.use(express.json());
|
||||
app.use(express.static(`${__dirname}/public`));
|
||||
|
||||
app.use((req, res, next) => {
|
||||
console.log('Hello from the middleware 👋');
|
||||
next();
|
||||
});
|
||||
|
||||
app.use((req, res, next) => {
|
||||
req.requestTime = new Date().toISOString();
|
||||
next();
|
||||
});
|
||||
|
||||
// 3) ROUTES
|
||||
app.use('/api/v1/tours', tourRouter);
|
||||
app.use('/api/v1/users', userRouter);
|
||||
|
||||
module.exports = app;
|
||||
4
4-natours/after-section-06/config.env
Normal file
@@ -0,0 +1,4 @@
|
||||
NODE_ENV=development
|
||||
PORT=3000
|
||||
USERNAME=jonas
|
||||
PASSWORD=123456
|
||||
92
4-natours/after-section-06/controllers/tourController.js
Normal file
@@ -0,0 +1,92 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const tours = JSON.parse(
|
||||
fs.readFileSync(`${__dirname}/../dev-data/data/tours-simple.json`)
|
||||
);
|
||||
|
||||
exports.checkID = (req, res, next, val) => {
|
||||
console.log(`Tour id is: ${val}`);
|
||||
|
||||
if (req.params.id * 1 > tours.length) {
|
||||
return res.status(404).json({
|
||||
status: 'fail',
|
||||
message: 'Invalid ID'
|
||||
});
|
||||
}
|
||||
next();
|
||||
};
|
||||
|
||||
exports.checkBody = (req, res, next) => {
|
||||
if (!req.body.name || !req.body.price) {
|
||||
return res.status(400).json({
|
||||
status: 'fail',
|
||||
message: 'Missing name or price'
|
||||
});
|
||||
}
|
||||
next();
|
||||
};
|
||||
|
||||
exports.getAllTours = (req, res) => {
|
||||
console.log(req.requestTime);
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
requestedAt: req.requestTime,
|
||||
results: tours.length,
|
||||
data: {
|
||||
tours
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.getTour = (req, res) => {
|
||||
console.log(req.params);
|
||||
const id = req.params.id * 1;
|
||||
|
||||
const tour = tours.find(el => el.id === id);
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
data: {
|
||||
tour
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.createTour = (req, res) => {
|
||||
// console.log(req.body);
|
||||
|
||||
const newId = tours[tours.length - 1].id + 1;
|
||||
const newTour = Object.assign({ id: newId }, req.body);
|
||||
|
||||
tours.push(newTour);
|
||||
|
||||
fs.writeFile(
|
||||
`${__dirname}/dev-data/data/tours-simple.json`,
|
||||
JSON.stringify(tours),
|
||||
err => {
|
||||
res.status(201).json({
|
||||
status: 'success',
|
||||
data: {
|
||||
tour: newTour
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
exports.updateTour = (req, res) => {
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
data: {
|
||||
tour: '<Updated tour here...>'
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.deleteTour = (req, res) => {
|
||||
res.status(204).json({
|
||||
status: 'success',
|
||||
data: null
|
||||
});
|
||||
};
|
||||
30
4-natours/after-section-06/controllers/userController.js
Normal file
@@ -0,0 +1,30 @@
|
||||
exports.getAllUsers = (req, res) => {
|
||||
res.status(500).json({
|
||||
status: 'error',
|
||||
message: 'This route is not yet defined!'
|
||||
});
|
||||
};
|
||||
exports.getUser = (req, res) => {
|
||||
res.status(500).json({
|
||||
status: 'error',
|
||||
message: 'This route is not yet defined!'
|
||||
});
|
||||
};
|
||||
exports.createUser = (req, res) => {
|
||||
res.status(500).json({
|
||||
status: 'error',
|
||||
message: 'This route is not yet defined!'
|
||||
});
|
||||
};
|
||||
exports.updateUser = (req, res) => {
|
||||
res.status(500).json({
|
||||
status: 'error',
|
||||
message: 'This route is not yet defined!'
|
||||
});
|
||||
};
|
||||
exports.deleteUser = (req, res) => {
|
||||
res.status(500).json({
|
||||
status: 'error',
|
||||
message: 'This route is not yet defined!'
|
||||
});
|
||||
};
|
||||
422
4-natours/after-section-06/dev-data/data/reviews.json
Normal file
@@ -0,0 +1,422 @@
|
||||
[
|
||||
{
|
||||
"_id": "5c8a34ed14eb5c17645c9108",
|
||||
"review": "Cras mollis nisi parturient mi nec aliquet suspendisse sagittis eros condimentum scelerisque taciti mattis praesent feugiat eu nascetur a tincidunt",
|
||||
"rating": 5,
|
||||
"user": "5c8a1dfa2f8fb814b56fa181",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a355b14eb5c17645c9109",
|
||||
"review": "Tempus curabitur faucibus auctor bibendum duis gravida tincidunt litora himenaeos facilisis vivamus vehicula potenti semper fusce suspendisse sagittis!",
|
||||
"rating": 4,
|
||||
"user": "5c8a1dfa2f8fb814b56fa181",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a359914eb5c17645c910a",
|
||||
"review": "Convallis turpis porttitor sapien ad urna efficitur dui vivamus in praesent nulla hac non potenti!",
|
||||
"rating": 5,
|
||||
"user": "5c8a1dfa2f8fb814b56fa181",
|
||||
"tour": "5c88fa8cf4afda39709c295d"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a35b614eb5c17645c910b",
|
||||
"review": "Habitasse scelerisque class quam primis convallis integer eros congue nulla proin nam faucibus parturient.",
|
||||
"rating": 4,
|
||||
"user": "5c8a1dfa2f8fb814b56fa181",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a364c14eb5c17645c910c",
|
||||
"review": "Cras consequat fames faucibus ac aliquam dolor a euismod porttitor rhoncus venenatis himenaeos montes tristique pretium libero nisi!",
|
||||
"rating": 5,
|
||||
"user": "5c8a1e1a2f8fb814b56fa182",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a368c14eb5c17645c910d",
|
||||
"review": "Laoreet justo volutpat per etiam donec at augue penatibus eu facilisis lorem phasellus ipsum tristique urna quam platea.",
|
||||
"rating": 5,
|
||||
"user": "5c8a1e1a2f8fb814b56fa182",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a36a014eb5c17645c910e",
|
||||
"review": "Senectus lectus eleifend ex lobortis cras nam cursus accumsan tellus lacus faucibus himenaeos posuere!",
|
||||
"rating": 5,
|
||||
"user": "5c8a1e1a2f8fb814b56fa182",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a36b714eb5c17645c910f",
|
||||
"review": "Pulvinar taciti etiam aenean lacinia natoque interdum fringilla suspendisse nam sapien urna!",
|
||||
"rating": 4,
|
||||
"user": "5c8a1e1a2f8fb814b56fa182",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a379a14eb5c17645c9110",
|
||||
"review": "Pretium vel inceptos fringilla sit dui fusce varius gravida platea morbi semper erat elit porttitor potenti!",
|
||||
"rating": 5,
|
||||
"user": "5c8a24402f8fb814b56fa190",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a37b114eb5c17645c9111",
|
||||
"review": "Ex a bibendum quis volutpat consequat euismod vulputate parturient laoreet diam sagittis amet at blandit.",
|
||||
"rating": 4,
|
||||
"user": "5c8a24402f8fb814b56fa190",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a37cb14eb5c17645c9112",
|
||||
"review": "Auctor euismod interdum augue tristique senectus nascetur cras justo eleifend mattis libero id adipiscing amet placerat",
|
||||
"rating": 5,
|
||||
"user": "5c8a24402f8fb814b56fa190",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a37dd14eb5c17645c9113",
|
||||
"review": "A facilisi justo ornare magnis velit diam dictumst parturient arcu nullam rhoncus nec!",
|
||||
"rating": 4,
|
||||
"user": "5c8a24402f8fb814b56fa190",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a37f114eb5c17645c9114",
|
||||
"review": "Porttitor ullamcorper rutrum semper proin mus felis varius convallis conubia nisl erat lectus eget.",
|
||||
"rating": 5,
|
||||
"user": "5c8a24402f8fb814b56fa190",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a381714eb5c17645c9115",
|
||||
"review": "Porttitor ullamcorper rutrum semper proin mus felis varius convallis conubia nisl erat lectus eget.",
|
||||
"rating": 5,
|
||||
"user": "5c8a1ec62f8fb814b56fa183",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a382d14eb5c17645c9116",
|
||||
"review": "Semper blandit felis nostra facilisi sodales pulvinar habitasse diam sapien lobortis urna nunc ipsum orci.",
|
||||
"rating": 5,
|
||||
"user": "5c8a1ec62f8fb814b56fa183",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a384114eb5c17645c9117",
|
||||
"review": "Neque amet vel integer placerat ex pretium elementum vitae quis ullamcorper nullam nunc habitant cursus justo!!!",
|
||||
"rating": 5,
|
||||
"user": "5c8a1ec62f8fb814b56fa183",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a385614eb5c17645c9118",
|
||||
"review": "Sollicitudin sagittis ex ut fringilla enim condimentum et netus tristique.",
|
||||
"rating": 5,
|
||||
"user": "5c8a1ec62f8fb814b56fa183",
|
||||
"tour": "5c88fa8cf4afda39709c295d"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a387214eb5c17645c9119",
|
||||
"review": "Semper tempus curae at platea lobortis ullamcorper curabitur luctus maecenas nisl laoreet!",
|
||||
"rating": 5,
|
||||
"user": "5c8a1ec62f8fb814b56fa183",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a38ac14eb5c17645c911a",
|
||||
"review": "Arcu adipiscing lobortis sem finibus consequat ac justo nisi pharetra ultricies facilisi!",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a38c714eb5c17645c911b",
|
||||
"review": "Rutrum viverra turpis nunc ultricies dolor ornare metus habitant ex quis sociosqu nascetur pellentesque quam!",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a38da14eb5c17645c911c",
|
||||
"review": "Elementum massa porttitor enim vitae eu ligula vivamus amet imperdiet urna tristique donec mattis mus erat.",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a38ed14eb5c17645c911d",
|
||||
"review": "Fusce ullamcorper gravida libero nullam lacus litora class orci habitant sollicitudin...",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c295d"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a390d14eb5c17645c911e",
|
||||
"review": "Varius potenti proin hendrerit felis sit convallis nunc non id facilisis aliquam platea elementum",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a391f14eb5c17645c911f",
|
||||
"review": "Sem feugiat sed lorem vel dignissim platea habitasse dolor suscipit ultricies dapibus",
|
||||
"rating": 5,
|
||||
"user": "5c8a211f2f8fb814b56fa188",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a395b14eb5c17645c9120",
|
||||
"review": "Sem feugiat sed lorem vel dignissim platea habitasse dolor suscipit ultricies dapibus",
|
||||
"rating": 5,
|
||||
"user": "5c8a20d32f8fb814b56fa187",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a399014eb5c17645c9121",
|
||||
"review": "Tortor dolor sed vehicula neque ultrices varius orci feugiat dignissim auctor consequat.",
|
||||
"rating": 4,
|
||||
"user": "5c8a20d32f8fb814b56fa187",
|
||||
"tour": "5c88fa8cf4afda39709c295d"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a39a214eb5c17645c9122",
|
||||
"review": "Felis mauris aenean eu lectus fringilla habitasse nullam eros senectus ante etiam!",
|
||||
"rating": 5,
|
||||
"user": "5c8a20d32f8fb814b56fa187",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a39b614eb5c17645c9123",
|
||||
"review": "Blandit varius nascetur est felis praesent lorem himenaeos pretium dapibus tellus bibendum consequat ac duis",
|
||||
"rating": 3,
|
||||
"user": "5c8a20d32f8fb814b56fa187",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3a7014eb5c17645c9124",
|
||||
"review": "Blandit varius nascetur est felis praesent lorem himenaeos pretium dapibus tellus bibendum consequat ac duis",
|
||||
"rating": 5,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3a8d14eb5c17645c9125",
|
||||
"review": "Iaculis mauris eget sed nec lobortis rhoncus montes etiam dapibus suspendisse hendrerit quam pellentesque potenti sapien!",
|
||||
"rating": 5,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3a9914eb5c17645c9126",
|
||||
"review": "Netus eleifend adipiscing ligula placerat fusce orci sollicitudin vivamus conubia.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3aaa14eb5c17645c9127",
|
||||
"review": "Eleifend suspendisse ultricies platea primis ut ornare purus vel taciti faucibus justo nunc",
|
||||
"rating": 4,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3abc14eb5c17645c9128",
|
||||
"review": "Malesuada consequat congue vel gravida eros conubia in sapien praesent diam!",
|
||||
"rating": 4,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3acf14eb5c17645c9129",
|
||||
"review": "Curabitur maximus montes vestibulum nulla vel dictum cubilia himenaeos nunc hendrerit amet urna.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23c82f8fb814b56fa18d",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b1e14eb5c17645c912a",
|
||||
"review": "Curabitur maximus montes vestibulum nulla vel dictum cubilia himenaeos nunc hendrerit amet urna.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23de2f8fb814b56fa18e",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b3214eb5c17645c912b",
|
||||
"review": "Sociosqu eleifend tincidunt aenean condimentum gravida lorem arcu pellentesque felis dui feugiat nec.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23de2f8fb814b56fa18e",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b4714eb5c17645c912c",
|
||||
"review": "Ridiculus facilisis sem id aenean amet penatibus gravida phasellus a mus dui lacinia accumsan!!",
|
||||
"rating": 1,
|
||||
"user": "5c8a23de2f8fb814b56fa18e",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b6714eb5c17645c912e",
|
||||
"review": "Venenatis molestie luctus cubilia taciti tempor faucibus nostra nisi curae integer.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23de2f8fb814b56fa18e",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b7c14eb5c17645c912f",
|
||||
"review": "Tempor pellentesque eu placerat auctor enim nam suscipit tincidunt natoque ipsum est.",
|
||||
"rating": 5,
|
||||
"user": "5c8a23de2f8fb814b56fa18e",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3b9f14eb5c17645c9130",
|
||||
"review": "Tempor pellentesque eu placerat auctor enim nam suscipit tincidunt natoque ipsum est.",
|
||||
"rating": 5,
|
||||
"user": "5c8a24282f8fb814b56fa18f",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3bc414eb5c17645c9131",
|
||||
"review": "Conubia semper efficitur rhoncus suspendisse taciti lectus ex sapien dolor molestie fusce class.",
|
||||
"rating": 5,
|
||||
"user": "5c8a24282f8fb814b56fa18f",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3bdc14eb5c17645c9132",
|
||||
"review": "Conubia pharetra pulvinar libero hac class congue curabitur mi porttitor!!",
|
||||
"rating": 5,
|
||||
"user": "5c8a24282f8fb814b56fa18f",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3bf514eb5c17645c9133",
|
||||
"review": "Nullam felis dictumst eros nulla torquent arcu inceptos mi faucibus ridiculus pellentesque gravida mauris.",
|
||||
"rating": 5,
|
||||
"user": "5c8a24282f8fb814b56fa18f",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c2514eb5c17645c9134",
|
||||
"review": "Euismod suscipit ipsum efficitur rutrum dis mus dictumst laoreet lectus.",
|
||||
"rating": 5,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c3b14eb5c17645c9135",
|
||||
"review": "Massa orci lacus suspendisse maximus ad integer donec arcu parturient facilisis accumsan consectetur non",
|
||||
"rating": 4,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c295a"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c5314eb5c17645c9136",
|
||||
"review": "Blandit varius finibus imperdiet tortor hendrerit erat rhoncus dictumst inceptos massa in.",
|
||||
"rating": 5,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c6814eb5c17645c9137",
|
||||
"review": "Tristique semper proin pellentesque ipsum urna habitasse venenatis tincidunt morbi nisi at",
|
||||
"rating": 4,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c295d"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c7814eb5c17645c9138",
|
||||
"review": "Potenti etiam placerat mi metus ipsum curae eget nisl torquent pretium",
|
||||
"rating": 4,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3c9014eb5c17645c9139",
|
||||
"review": "Molestie non montes at fermentum cubilia quis dis placerat maecenas vulputate sapien facilisis",
|
||||
"rating": 5,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3ca314eb5c17645c913a",
|
||||
"review": "Velit vulputate faucibus in nascetur praesent potenti primis pulvinar tempor",
|
||||
"rating": 5,
|
||||
"user": "5c8a245f2f8fb814b56fa191",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3cdc14eb5c17645c913b",
|
||||
"review": "Magna magnis tellus dui vivamus donec placerat vehicula erat turpis",
|
||||
"rating": 5,
|
||||
"user": "5c8a24822f8fb814b56fa192",
|
||||
"tour": "5c88fa8cf4afda39709c2955"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3cf414eb5c17645c913c",
|
||||
"review": "Ligula lorem taciti fringilla himenaeos ex aliquam litora nam ad maecenas sit phasellus lectus!!",
|
||||
"rating": 5,
|
||||
"user": "5c8a24822f8fb814b56fa192",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3d1e14eb5c17645c913d",
|
||||
"review": "Nam ultrices quis leo viverra tristique curae facilisi luctus sapien eleifend fames orci lacinia pulvinar.",
|
||||
"rating": 4,
|
||||
"user": "5c8a24822f8fb814b56fa192",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3d3a14eb5c17645c913e",
|
||||
"review": "Ullamcorper ac nec id habitant a commodo eget libero cras congue!",
|
||||
"rating": 4,
|
||||
"user": "5c8a24822f8fb814b56fa192",
|
||||
"tour": "5c88fa8cf4afda39709c2970"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3d5314eb5c17645c913f",
|
||||
"review": "Ultrices nam dui ex posuere velit varius himenaeos bibendum fermentum sollicitudin purus",
|
||||
"rating": 5,
|
||||
"user": "5c8a24822f8fb814b56fa192",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3d8614eb5c17645c9140",
|
||||
"review": "Ultrices nam dui ex posuere velit varius himenaeos bibendum fermentum sollicitudin purus",
|
||||
"rating": 5,
|
||||
"user": "5c8a24a02f8fb814b56fa193",
|
||||
"tour": "5c88fa8cf4afda39709c2974"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3d9b14eb5c17645c9141",
|
||||
"review": "Vitae vulputate id quam metus orci cras mollis vivamus vehicula sapien et",
|
||||
"rating": 2,
|
||||
"user": "5c8a24a02f8fb814b56fa193",
|
||||
"tour": "5c88fa8cf4afda39709c296c"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3de514eb5c17645c9143",
|
||||
"review": "Sem risus tempor auctor mattis netus montes tincidunt mollis lacinia natoque adipiscing",
|
||||
"rating": 5,
|
||||
"user": "5c8a24a02f8fb814b56fa193",
|
||||
"tour": "5c88fa8cf4afda39709c2961"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3e0714eb5c17645c9144",
|
||||
"review": "Feugiat egestas ac pulvinar quis dui ligula tempor ad platea quisque scelerisque!",
|
||||
"rating": 5,
|
||||
"user": "5c8a24a02f8fb814b56fa193",
|
||||
"tour": "5c88fa8cf4afda39709c2951"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a3e63e12c44188b4dbc5b",
|
||||
"review": "Quisque egestas faucibus primis ridiculus mi felis tristique curabitur habitasse vehicula",
|
||||
"rating": 4,
|
||||
"user": "5c8a24a02f8fb814b56fa193",
|
||||
"tour": "5c88fa8cf4afda39709c2966"
|
||||
}
|
||||
]
|
||||
17
4-natours/after-section-06/dev-data/data/tour5.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/* eslint-disable */
|
||||
const tour5 = {
|
||||
id: 5,
|
||||
name: 'The Sports Lover',
|
||||
startLocation: 'California, USA',
|
||||
nextStartDate: 'July 2021',
|
||||
duration: 14,
|
||||
maxGroupSize: 8,
|
||||
difficulty: 'difficult',
|
||||
avgRating: 4.7,
|
||||
numReviews: 23,
|
||||
regPrice: 2997,
|
||||
shortDescription:
|
||||
'Surfing, skating, parajumping, rock climbing and more, all in one tour',
|
||||
longDescription:
|
||||
'Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nVoluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur!'
|
||||
};
|
||||
140
4-natours/after-section-06/dev-data/data/tours-simple.json
Normal file
@@ -0,0 +1,140 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"name": "The Forest Hiker",
|
||||
"duration": 5,
|
||||
"maxGroupSize": 25,
|
||||
"difficulty": "easy",
|
||||
"ratingsAverage": 4.7,
|
||||
"ratingsQuantity": 37,
|
||||
"price": 397,
|
||||
"summary": "Breathtaking hike through the Canadian Banff National Park",
|
||||
"description": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
"imageCover": "tour-1-cover.jpg",
|
||||
"images": ["tour-1-1.jpg", "tour-1-2.jpg", "tour-1-3.jpg"],
|
||||
"startDates": ["2021-04-25,10:00", "2021-07-20,10:00", "2021-10-05,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "The Sea Explorer",
|
||||
"duration": 7,
|
||||
"maxGroupSize": 15,
|
||||
"difficulty": "medium",
|
||||
"ratingsAverage": 4.8,
|
||||
"ratingsQuantity": 23,
|
||||
"price": 497,
|
||||
"summary": "Exploring the jaw-dropping US east coast by foot and by boat",
|
||||
"description": "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nIrure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"imageCover": "tour-2-cover.jpg",
|
||||
"images": ["tour-2-1.jpg", "tour-2-2.jpg", "tour-2-3.jpg"],
|
||||
"startDates": ["2021-06-19,10:00", "2021-07-20,10:00", "2021-08-18,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "The Snow Adventurer",
|
||||
"duration": 4,
|
||||
"maxGroupSize": 10,
|
||||
"difficulty": "difficult",
|
||||
"ratingsAverage": 4.5,
|
||||
"ratingsQuantity": 13,
|
||||
"price": 997,
|
||||
"summary": "Exciting adventure in the snow with snowboarding and skiing",
|
||||
"description": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua, ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!\nDolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, exercitation ullamco laboris nisi ut aliquip. Lorem ipsum dolor sit amet, consectetur adipisicing elit!",
|
||||
"imageCover": "tour-3-cover.jpg",
|
||||
"images": ["tour-3-1.jpg", "tour-3-2.jpg", "tour-3-3.jpg"],
|
||||
"startDates": ["2022-01-05,10:00", "2022-02-12,10:00", "2023-01-06,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "The City Wanderer",
|
||||
"duration": 9,
|
||||
"maxGroupSize": 20,
|
||||
"difficulty": "easy",
|
||||
"ratingsAverage": 4.6,
|
||||
"ratingsQuantity": 54,
|
||||
"price": 1197,
|
||||
"summary": "Living the life of Wanderlust in the US' most beatiful cities",
|
||||
"description": "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat lorem ipsum dolor sit amet.\nConsectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat!",
|
||||
"imageCover": "tour-4-cover.jpg",
|
||||
"images": ["tour-4-1.jpg", "tour-4-2.jpg", "tour-4-3.jpg"],
|
||||
"startDates": ["2021-03-11,10:00", "2021-05-02,10:00", "2021-06-09,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "The Park Camper",
|
||||
"duration": 10,
|
||||
"maxGroupSize": 15,
|
||||
"difficulty": "medium",
|
||||
"ratingsAverage": 4.9,
|
||||
"ratingsQuantity": 19,
|
||||
"price": 1497,
|
||||
"summary": "Breathing in Nature in America's most spectacular National Parks",
|
||||
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!",
|
||||
"imageCover": "tour-5-cover.jpg",
|
||||
"images": ["tour-5-1.jpg", "tour-5-2.jpg", "tour-5-3.jpg"],
|
||||
"startDates": ["2021-08-05,10:00", "2022-03-20,10:00", "2022-08-12,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "The Sports Lover",
|
||||
"duration": 14,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "difficult",
|
||||
"ratingsAverage": 4.7,
|
||||
"ratingsQuantity": 28,
|
||||
"price": 2997,
|
||||
"summary": "Surfing, skating, parajumping, rock climbing and more, all in one tour",
|
||||
"description": "Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nVoluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur!",
|
||||
"imageCover": "tour-6-cover.jpg",
|
||||
"images": ["tour-6-1.jpg", "tour-6-2.jpg", "tour-6-3.jpg"],
|
||||
"startDates": ["2021-07-19,10:00", "2021-09-06,10:00", "2022-03-18,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "The Wine Taster",
|
||||
"duration": 5,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "easy",
|
||||
"ratingsAverage": 4.5,
|
||||
"ratingsQuantity": 35,
|
||||
"price": 1997,
|
||||
"summary": "Exquisite wines, scenic views, exclusive barrel tastings, and much more",
|
||||
"description": "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nIrure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"imageCover": "tour-7-cover.jpg",
|
||||
"images": ["tour-7-1.jpg", "tour-7-2.jpg", "tour-7-3.jpg"],
|
||||
"startDates": ["2021-02-12,10:00", "2021-04-14,10:00", "2021-09-01,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "The Star Gazer",
|
||||
"duration": 9,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "medium",
|
||||
"ratingsAverage": 4.7,
|
||||
"ratingsQuantity": 28,
|
||||
"price": 2997,
|
||||
"summary": "The most remote and stunningly beautiful places for seeing the night sky",
|
||||
"description": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
"imageCover": "tour-8-cover.jpg",
|
||||
"images": ["tour-8-1.jpg", "tour-8-2.jpg", "tour-8-3.jpg"],
|
||||
"startDates": ["2021-03-23,10:00", "2021-10-25,10:00", "2022-01-30,10:00"]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "The Northern Lights",
|
||||
"duration": 3,
|
||||
"maxGroupSize": 12,
|
||||
"difficulty": "easy",
|
||||
"ratingsAverage": 4.9,
|
||||
"ratingsQuantity": 33,
|
||||
"price": 1497,
|
||||
"summary": "Enjoy the Northern Lights in one of the best places in the world",
|
||||
"description": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua, ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!\nDolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, exercitation ullamco laboris nisi ut aliquip. Lorem ipsum dolor sit amet, consectetur adipisicing elit!",
|
||||
"imageCover": "tour-9-cover.jpg",
|
||||
"images": ["tour-9-1.jpg", "tour-9-2.jpg", "tour-9-3.jpg"],
|
||||
"startDates": ["2021-12-16,10:00", "2022-01-16,10:00", "2022-12-12,10:00"]
|
||||
},
|
||||
{ "id": 9, "name": "Test Tour", "duration": 10, "difficulty": "easy" },
|
||||
{ "id": 10, "name": "Test Tour", "duration": 10, "difficulty": "easy" },
|
||||
{ "id": 11, "name": "Test Tour 2", "duration": 5, "difficulty": "easy" }
|
||||
]
|
||||
470
4-natours/after-section-06/dev-data/data/tours.json
Normal file
@@ -0,0 +1,470 @@
|
||||
[
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Miami, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-80.185942, 25.774772],
|
||||
"address": "301 Biscayne Blvd, Miami, FL 33132, USA"
|
||||
},
|
||||
"ratingsAverage": 4.8,
|
||||
"ratingsQuantity": 6,
|
||||
"images": ["tour-2-1.jpg", "tour-2-2.jpg", "tour-2-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-06-19T09:00:00.000Z",
|
||||
"2021-07-20T09:00:00.000Z",
|
||||
"2021-08-18T09:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2955",
|
||||
"name": "The Sea Explorer",
|
||||
"duration": 7,
|
||||
"maxGroupSize": 15,
|
||||
"difficulty": "medium",
|
||||
"guides": ["5c8a22c62f8fb814b56fa18b", "5c8a1f4e2f8fb814b56fa185"],
|
||||
"price": 497,
|
||||
"summary": "Exploring the jaw-dropping US east coast by foot and by boat",
|
||||
"description": "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nIrure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"imageCover": "tour-2-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2959",
|
||||
"description": "Lummus Park Beach",
|
||||
"type": "Point",
|
||||
"coordinates": [-80.128473, 25.781842],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2958",
|
||||
"description": "Islamorada",
|
||||
"type": "Point",
|
||||
"coordinates": [-80.647885, 24.909047],
|
||||
"day": 2
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2957",
|
||||
"description": "Sombrero Beach",
|
||||
"type": "Point",
|
||||
"coordinates": [-81.0784, 24.707496],
|
||||
"day": 3
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2956",
|
||||
"description": "West Key",
|
||||
"type": "Point",
|
||||
"coordinates": [-81.768719, 24.552242],
|
||||
"day": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Banff, CAN",
|
||||
"type": "Point",
|
||||
"coordinates": [-115.570154, 51.178456],
|
||||
"address": "224 Banff Ave, Banff, AB, Canada"
|
||||
},
|
||||
"ratingsAverage": 5,
|
||||
"ratingsQuantity": 9,
|
||||
"images": ["tour-1-1.jpg", "tour-1-2.jpg", "tour-1-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-04-25T09:00:00.000Z",
|
||||
"2021-07-20T09:00:00.000Z",
|
||||
"2021-10-05T09:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2951",
|
||||
"name": "The Forest Hiker",
|
||||
"duration": 5,
|
||||
"maxGroupSize": 25,
|
||||
"difficulty": "easy",
|
||||
"guides": [
|
||||
"5c8a21d02f8fb814b56fa189",
|
||||
"5c8a201e2f8fb814b56fa186",
|
||||
"5c8a1f292f8fb814b56fa184"
|
||||
],
|
||||
"price": 397,
|
||||
"summary": "Breathtaking hike through the Canadian Banff National Park",
|
||||
"description": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
"imageCover": "tour-1-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2954",
|
||||
"description": "Banff National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-116.214531, 51.417611],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2953",
|
||||
"description": "Jasper National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.076152, 52.875223],
|
||||
"day": 3
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2952",
|
||||
"description": "Glacier National Park of Canada",
|
||||
"type": "Point",
|
||||
"coordinates": [-117.490309, 51.261937],
|
||||
"day": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Aspen, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-106.822318, 39.190872],
|
||||
"address": "419 S Mill St, Aspen, CO 81611, USA"
|
||||
},
|
||||
"ratingsAverage": 4.5,
|
||||
"ratingsQuantity": 6,
|
||||
"images": ["tour-3-1.jpg", "tour-3-2.jpg", "tour-3-3.jpg"],
|
||||
"startDates": [
|
||||
"2022-01-05T10:00:00.000Z",
|
||||
"2022-02-12T10:00:00.000Z",
|
||||
"2023-01-06T10:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c295a",
|
||||
"name": "The Snow Adventurer",
|
||||
"duration": 4,
|
||||
"maxGroupSize": 10,
|
||||
"difficulty": "difficult",
|
||||
"guides": [
|
||||
"5c8a21d02f8fb814b56fa189",
|
||||
"5c8a23412f8fb814b56fa18c",
|
||||
"5c8a1f4e2f8fb814b56fa185"
|
||||
],
|
||||
"price": 997,
|
||||
"summary": "Exciting adventure in the snow with snowboarding and skiing",
|
||||
"description": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua, ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!\nDolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, exercitation ullamco laboris nisi ut aliquip. Lorem ipsum dolor sit amet, consectetur adipisicing elit!",
|
||||
"imageCover": "tour-3-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c295c",
|
||||
"description": "Aspen Highlands",
|
||||
"type": "Point",
|
||||
"coordinates": [-106.855385, 39.182677],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c295b",
|
||||
"description": "Beaver Creek",
|
||||
"type": "Point",
|
||||
"coordinates": [-106.516623, 39.60499],
|
||||
"day": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Las Vegas, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-115.172652, 36.110904],
|
||||
"address": "3663 S Las Vegas Blvd, Las Vegas, NV 89109, USA"
|
||||
},
|
||||
"ratingsAverage": 4.7,
|
||||
"ratingsQuantity": 7,
|
||||
"images": ["tour-5-1.jpg", "tour-5-2.jpg", "tour-5-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-08-05T09:00:00.000Z",
|
||||
"2022-03-20T10:00:00.000Z",
|
||||
"2022-08-12T09:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2961",
|
||||
"name": "The Park Camper",
|
||||
"duration": 10,
|
||||
"maxGroupSize": 15,
|
||||
"difficulty": "medium",
|
||||
"guides": [
|
||||
"5c8a21f22f8fb814b56fa18a",
|
||||
"5c8a23412f8fb814b56fa18c",
|
||||
"5c8a201e2f8fb814b56fa186"
|
||||
],
|
||||
"price": 1497,
|
||||
"summary": "Breathing in Nature in America's most spectacular National Parks",
|
||||
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!",
|
||||
"imageCover": "tour-5-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2965",
|
||||
"description": "Zion Canyon National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-112.987418, 37.198125],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2964",
|
||||
"description": "Antelope Canyon",
|
||||
"type": "Point",
|
||||
"coordinates": [-111.376161, 36.86438],
|
||||
"day": 4
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2963",
|
||||
"description": "Grand Canyon National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-112.115763, 36.058973],
|
||||
"day": 5
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2962",
|
||||
"description": "Joshua Tree National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-116.107963, 34.011646],
|
||||
"day": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "NYC, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-73.985141, 40.75894],
|
||||
"address": "Manhattan, NY 10036, USA"
|
||||
},
|
||||
"ratingsAverage": 4.6,
|
||||
"ratingsQuantity": 5,
|
||||
"images": ["tour-4-1.jpg", "tour-4-2.jpg", "tour-4-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-03-11T10:00:00.000Z",
|
||||
"2021-05-02T09:00:00.000Z",
|
||||
"2021-06-09T09:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c295d",
|
||||
"name": "The City Wanderer",
|
||||
"duration": 9,
|
||||
"maxGroupSize": 20,
|
||||
"difficulty": "easy",
|
||||
"guides": ["5c8a22c62f8fb814b56fa18b", "5c8a201e2f8fb814b56fa186"],
|
||||
"price": 1197,
|
||||
"summary": "Living the life of Wanderlust in the US' most beatiful cities",
|
||||
"description": "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat lorem ipsum dolor sit amet.\nConsectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat!",
|
||||
"imageCover": "tour-4-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2960",
|
||||
"description": "New York",
|
||||
"type": "Point",
|
||||
"coordinates": [-73.967696, 40.781821],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c295f",
|
||||
"description": "Los Angeles",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.324396, 34.097984],
|
||||
"day": 3
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c295e",
|
||||
"description": "San Francisco",
|
||||
"type": "Point",
|
||||
"coordinates": [-122.408865, 37.787825],
|
||||
"day": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "California, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.803461, 34.006072],
|
||||
"address": "29130 Cliffside Dr, Malibu, CA 90265, USA"
|
||||
},
|
||||
"ratingsAverage": 3.9,
|
||||
"ratingsQuantity": 7,
|
||||
"images": ["tour-6-1.jpg", "tour-6-2.jpg", "tour-6-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-07-19T09:00:00.000Z",
|
||||
"2021-09-06T09:00:00.000Z",
|
||||
"2022-03-18T10:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2966",
|
||||
"name": "The Sports Lover",
|
||||
"duration": 14,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "difficult",
|
||||
"guides": [
|
||||
"5c8a21f22f8fb814b56fa18a",
|
||||
"5c8a1f292f8fb814b56fa184",
|
||||
"5c8a1f4e2f8fb814b56fa185"
|
||||
],
|
||||
"price": 2997,
|
||||
"summary": "Surfing, skating, parajumping, rock climbing and more, all in one tour",
|
||||
"description": "Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nVoluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur!",
|
||||
"imageCover": "tour-6-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c296b",
|
||||
"description": "Point Dume Beach",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.809361, 34.003098],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c296a",
|
||||
"description": "Venice Skate Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.47549, 33.987367],
|
||||
"day": 4
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2969",
|
||||
"description": "San Diego Skydive",
|
||||
"type": "Point",
|
||||
"coordinates": [-116.830104, 33.022843],
|
||||
"day": 6
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2968",
|
||||
"description": "Kern River Rafting",
|
||||
"type": "Point",
|
||||
"coordinates": [-118.4547, 35.710359],
|
||||
"day": 7
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2967",
|
||||
"description": "Yosemite National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-119.600492, 37.742371],
|
||||
"day": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Utah, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-109.55099, 37.283469],
|
||||
"address": "Bluff, UT 84512, USA"
|
||||
},
|
||||
"ratingsAverage": 4.8,
|
||||
"ratingsQuantity": 6,
|
||||
"images": ["tour-8-1.jpg", "tour-8-2.jpg", "tour-8-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-03-23T10:00:00.000Z",
|
||||
"2021-10-25T09:00:00.000Z",
|
||||
"2022-01-30T10:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2970",
|
||||
"name": "The Star Gazer",
|
||||
"duration": 9,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "medium",
|
||||
"guides": ["5c8a21d02f8fb814b56fa189", "5c8a1f292f8fb814b56fa184"],
|
||||
"price": 2997,
|
||||
"summary": "The most remote and stunningly beautiful places for seeing the night sky",
|
||||
"description": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
"imageCover": "tour-8-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2973",
|
||||
"description": "Natural Bridges National Monument",
|
||||
"type": "Point",
|
||||
"coordinates": [-109.99953, 37.629017],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2972",
|
||||
"description": "Horseshoe Bend",
|
||||
"type": "Point",
|
||||
"coordinates": [-111.50954, 36.883269],
|
||||
"day": 3
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2971",
|
||||
"description": "Death Valley National Park",
|
||||
"type": "Point",
|
||||
"coordinates": [-117.07399, 36.501435],
|
||||
"day": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "Yellowknife, CAN",
|
||||
"type": "Point",
|
||||
"coordinates": [-114.406097, 62.439943],
|
||||
"address": "Yellowknife, NT X1A 2L2, Canada"
|
||||
},
|
||||
"ratingsAverage": 4.7,
|
||||
"ratingsQuantity": 7,
|
||||
"images": ["tour-9-1.jpg", "tour-9-2.jpg", "tour-9-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-12-16T10:00:00.000Z",
|
||||
"2022-01-16T10:00:00.000Z",
|
||||
"2022-12-12T10:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c2974",
|
||||
"name": "The Northern Lights",
|
||||
"duration": 3,
|
||||
"maxGroupSize": 12,
|
||||
"difficulty": "easy",
|
||||
"guides": [
|
||||
"5c8a21f22f8fb814b56fa18a",
|
||||
"5c8a201e2f8fb814b56fa186",
|
||||
"5c8a23412f8fb814b56fa18c"
|
||||
],
|
||||
"price": 1497,
|
||||
"summary": "Enjoy the Northern Lights in one of the best places in the world",
|
||||
"description": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua, ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!\nDolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, exercitation ullamco laboris nisi ut aliquip. Lorem ipsum dolor sit amet, consectetur adipisicing elit!",
|
||||
"imageCover": "tour-9-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c2975",
|
||||
"description": "Yellowknife",
|
||||
"type": "Point",
|
||||
"coordinates": [-114.406097, 62.439943],
|
||||
"day": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"startLocation": {
|
||||
"description": "California, USA",
|
||||
"type": "Point",
|
||||
"coordinates": [-122.29286, 38.294065],
|
||||
"address": "560 Jefferson St, Napa, CA 94559, USA"
|
||||
},
|
||||
"ratingsAverage": 4.4,
|
||||
"ratingsQuantity": 7,
|
||||
"images": ["tour-7-1.jpg", "tour-7-2.jpg", "tour-7-3.jpg"],
|
||||
"startDates": [
|
||||
"2021-02-12T10:00:00.000Z",
|
||||
"2021-04-14T09:00:00.000Z",
|
||||
"2021-09-01T09:00:00.000Z"
|
||||
],
|
||||
"_id": "5c88fa8cf4afda39709c296c",
|
||||
"name": "The Wine Taster",
|
||||
"duration": 5,
|
||||
"maxGroupSize": 8,
|
||||
"difficulty": "easy",
|
||||
"guides": ["5c8a22c62f8fb814b56fa18b", "5c8a23412f8fb814b56fa18c"],
|
||||
"price": 1997,
|
||||
"summary": "Exquisite wines, scenic views, exclusive barrel tastings, and much more",
|
||||
"description": "Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nIrure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"imageCover": "tour-7-cover.jpg",
|
||||
"locations": [
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c296f",
|
||||
"description": "Beringer Vineyards",
|
||||
"type": "Point",
|
||||
"coordinates": [-122.479887, 38.510312],
|
||||
"day": 1
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c296e",
|
||||
"description": "Clos Pegase Winery & Tasting Room",
|
||||
"type": "Point",
|
||||
"coordinates": [-122.582948, 38.585707],
|
||||
"day": 3
|
||||
},
|
||||
{
|
||||
"_id": "5c88fa8cf4afda39709c296d",
|
||||
"description": "Raymond Vineyard and Cellar",
|
||||
"type": "Point",
|
||||
"coordinates": [-122.434697, 38.482181],
|
||||
"day": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
182
4-natours/after-section-06/dev-data/data/users.json
Normal file
@@ -0,0 +1,182 @@
|
||||
[
|
||||
{
|
||||
"_id": "5c8a1d5b0190b214360dc057",
|
||||
"name": "Jonas Schmedtmann",
|
||||
"email": "admin@natours.io",
|
||||
"role": "admin",
|
||||
"active": true,
|
||||
"photo": "user-1.jpg",
|
||||
"password": "$2a$12$Q0grHjH9PXc6SxivC8m12.2mZJ9BbKcgFpwSG4Y1ZEII8HJVzWeyS"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a1dfa2f8fb814b56fa181",
|
||||
"name": "Lourdes Browning",
|
||||
"email": "loulou@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-2.jpg",
|
||||
"password": "$2a$12$hP1h2pnNp7wgyZNRwPsOTeZuNzWBv7vHmsR3DT/OaPSUBQT.y0S.."
|
||||
},
|
||||
{
|
||||
"_id": "5c8a1e1a2f8fb814b56fa182",
|
||||
"name": "Sophie Louise Hart",
|
||||
"email": "sophie@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-3.jpg",
|
||||
"password": "$2a$12$9nFqToiTmjgfFVJiQvjmreLt4k8X4gGYCETGapSZOb2hHa55t0dDq"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a1ec62f8fb814b56fa183",
|
||||
"name": "Ayla Cornell",
|
||||
"email": "ayls@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-4.jpg",
|
||||
"password": "$2a$12$tm33.M/4pfEbZF64WbFuHuVFv85v4qEhi.ik8njbud7yaoqCZpjiy"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a1f292f8fb814b56fa184",
|
||||
"name": "Leo Gillespie",
|
||||
"email": "leo@example.com",
|
||||
"role": "guide",
|
||||
"active": true,
|
||||
"photo": "user-5.jpg",
|
||||
"password": "$2a$12$OOPr90tBEBF1Iho3ox0Jde0O/WXUR0VLA5xdh6tWcu7qb.qOCvSg2"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a1f4e2f8fb814b56fa185",
|
||||
"name": "Jennifer Hardy",
|
||||
"email": "jennifer@example.com",
|
||||
"role": "guide",
|
||||
"active": true,
|
||||
"photo": "user-6.jpg",
|
||||
"password": "$2a$12$XCXvvlhRBJ8CydKH09v1v.jpg0hB9gVVfMVEoz4MsxqL9zb5PrF42"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a201e2f8fb814b56fa186",
|
||||
"name": "Kate Morrison",
|
||||
"email": "kate@example.com",
|
||||
"role": "guide",
|
||||
"active": true,
|
||||
"photo": "user-7.jpg",
|
||||
"password": "$2a$12$II1F3aBSFDF3Xz7iB4rk/.a2dogwkClMN5gGCWrRlILrG1xtJG7q6"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a20d32f8fb814b56fa187",
|
||||
"name": "Eliana Stout",
|
||||
"email": "eliana@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-8.jpg",
|
||||
"password": "$2a$12$Jb/ILhdDV.ZpnPMu19xfe.NRh5ntE2LzNMNcsty05QWwRbmFFVMKO"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a211f2f8fb814b56fa188",
|
||||
"name": "Cristian Vega",
|
||||
"email": "chris@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-9.jpg",
|
||||
"password": "$2a$12$r7/jtdWtzNfrfC7zw3uS.eDJ3Bs.8qrO31ZdbMljL.lUY0TAsaAL6"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a21d02f8fb814b56fa189",
|
||||
"name": "Steve T. Scaife",
|
||||
"email": "steve@example.com",
|
||||
"role": "lead-guide",
|
||||
"active": true,
|
||||
"photo": "user-10.jpg",
|
||||
"password": "$2a$12$q7v9dm.S4DvqhAeBc4KwduedEDEkDe2GGFGzteW6xnHt120oRpkqm"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a21f22f8fb814b56fa18a",
|
||||
"name": "Aarav Lynn",
|
||||
"email": "aarav@example.com",
|
||||
"role": "lead-guide",
|
||||
"active": true,
|
||||
"photo": "user-11.jpg",
|
||||
"password": "$2a$12$lKWhzujFvQwG4m/X3mnTneOB3ib9IYETsOqQ8aN5QEWDjX6X2wJJm"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a22c62f8fb814b56fa18b",
|
||||
"name": "Miyah Myles",
|
||||
"email": "miyah@example.com",
|
||||
"role": "lead-guide",
|
||||
"active": true,
|
||||
"photo": "user-12.jpg",
|
||||
"password": "$2a$12$.XIvvmznHQSa9UOI639yhe4vzHKCYO1vpTUZc4d45oiT4GOZQe1kS"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a23412f8fb814b56fa18c",
|
||||
"name": "Ben Hadley",
|
||||
"email": "ben@example.com",
|
||||
"role": "guide",
|
||||
"active": true,
|
||||
"photo": "user-13.jpg",
|
||||
"password": "$2a$12$D3fyuS9ETdBBw5lOwceTMuZcDTyVq28ieeGUAanIuLMcSDz6bpfIe"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a23c82f8fb814b56fa18d",
|
||||
"name": "Laura Wilson",
|
||||
"email": "laura@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-14.jpg",
|
||||
"password": "$2a$12$VPYaAAOsI44uhq11WbZ5R.cHT4.fGdlI9gKJd95jmYw3.sAsmbvBq"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a23de2f8fb814b56fa18e",
|
||||
"name": "Max Smith",
|
||||
"email": "max@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-15.jpg",
|
||||
"password": "$2a$12$l5qamwqcqC2NlgN6o5A5..9Fxzr6X.bjx/8j3a9jYUHWGOL99oXlm"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a24282f8fb814b56fa18f",
|
||||
"name": "Isabel Kirkland",
|
||||
"email": "isabel@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-16.jpg",
|
||||
"password": "$2a$12$IUnwPH0MGFeMuz7g4gtfvOll.9wgLyxG.9C3TKlttfLtCQWEE6GIu"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a24402f8fb814b56fa190",
|
||||
"name": "Alexander Jones",
|
||||
"email": "alex@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-17.jpg",
|
||||
"password": "$2a$12$NnclhoYFNcSApoQ3ML8kk.b4B3gbpOmZJLfqska07miAnXukOgK6y"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a245f2f8fb814b56fa191",
|
||||
"name": "Eduardo Hernandez",
|
||||
"email": "edu@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-18.jpg",
|
||||
"password": "$2a$12$uB5H1OxLMOqDYTuTlptAoewlovENJvjrLwzsL1wUZ6OkAIByPPBGq"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a24822f8fb814b56fa192",
|
||||
"name": "John Riley",
|
||||
"email": "john@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-19.jpg",
|
||||
"password": "$2a$12$11JElTatQlAFo1Obw/dwd..vuVmQyYS7MT14pkl3lRvVPjGA00G8O"
|
||||
},
|
||||
{
|
||||
"_id": "5c8a24a02f8fb814b56fa193",
|
||||
"name": "Lisa Brown",
|
||||
"email": "lisa@example.com",
|
||||
"role": "user",
|
||||
"active": true,
|
||||
"photo": "user-20.jpg",
|
||||
"password": "$2a$12$uA9FsDw63v6dkJKGlLQ/8ufYBs8euB7kqIQewyYlZXU5azEKeLEky"
|
||||
}
|
||||
]
|
||||
BIN
4-natours/after-section-06/dev-data/img/aarav.jpg
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
4-natours/after-section-06/dev-data/img/leo.jpg
Normal file
|
After Width: | Height: | Size: 202 KiB |
BIN
4-natours/after-section-06/dev-data/img/monica.jpg
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
4-natours/after-section-06/dev-data/img/new-tour-1.jpg
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
4-natours/after-section-06/dev-data/img/new-tour-2.jpg
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
4-natours/after-section-06/dev-data/img/new-tour-3.jpg
Normal file
|
After Width: | Height: | Size: 864 KiB |
BIN
4-natours/after-section-06/dev-data/img/new-tour-4.jpg
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
@@ -0,0 +1,6 @@
|
||||
main.main
|
||||
.error
|
||||
.error__title
|
||||
h2.heading-secondary.heading-secondary--error Uh oh! Something went wrong!
|
||||
h2.error__emoji 😢 🤯
|
||||
.error__msg Page not found!
|
||||
@@ -0,0 +1,12 @@
|
||||
main.main
|
||||
.login-form
|
||||
h2.heading-secondary.ma-bt-lg Log into your account
|
||||
form.form
|
||||
.form__group
|
||||
label.form__label(for='email') Email address
|
||||
input#email.form__input(type='email', placeholder='you@example.com', required)
|
||||
.form__group.ma-bt-md
|
||||
label.form__label(for='password') Password
|
||||
input#password.form__input(type='password', placeholder='••••••••', required, minlength='8')
|
||||
.form__group
|
||||
button.btn.btn--green Login
|
||||
@@ -0,0 +1,37 @@
|
||||
.card
|
||||
.card__header
|
||||
.card__picture
|
||||
.card__picture-overlay
|
||||
img.card__picture-img(src='img/tour-1-cover.jpg', alt='Tour 1')
|
||||
h3.heading-tertirary
|
||||
span The Forest Hiker
|
||||
|
||||
.card__details
|
||||
h4.card__sub-heading Easy 5-day tour
|
||||
p.card__text Breathtaking hike through the Canadian Banff National Park
|
||||
.card__data
|
||||
svg.card__icon
|
||||
use(xlink:href='img/icons.svg#icon-map-pin')
|
||||
span Banff, Canada
|
||||
.card__data
|
||||
svg.card__icon
|
||||
use(xlink:href='img/icons.svg#icon-calendar')
|
||||
span April 2021
|
||||
.card__data
|
||||
svg.card__icon
|
||||
use(xlink:href='img/icons.svg#icon-flag')
|
||||
|
|
||||
span 3 stops
|
||||
.card__data
|
||||
svg.card__icon
|
||||
use(xlink:href='img/icons.svg#icon-user')
|
||||
span 25 people
|
||||
|
||||
.card__footer
|
||||
p
|
||||
span.card__footer-value $297
|
||||
span.card__footer-text per person
|
||||
p.card__ratings
|
||||
span.card__footer-value 4.9
|
||||
span.card__footer-text rating (21)
|
||||
a.btn.btn--green.btn--small(href='#') Details
|
||||
105
4-natours/after-section-06/dev-data/templates/tourTemplate.pug
Normal file
@@ -0,0 +1,105 @@
|
||||
section.section-header
|
||||
.header__hero
|
||||
.header__hero-overlay
|
||||
img.header__hero-img(src='/img/tour-5-cover.jpg', alt='Tour 5')
|
||||
|
||||
.heading-box
|
||||
h1.heading-primary
|
||||
span The Park Camper Tour
|
||||
.heading-box__group
|
||||
.heading-box__detail
|
||||
svg.heading-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-clock')
|
||||
span.heading-box__text 10 days
|
||||
.heading-box__detail
|
||||
svg.heading-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-map-pin')
|
||||
span.heading-box__text Las Vegas, USA
|
||||
|
||||
section.section-description
|
||||
.overview-box
|
||||
div
|
||||
.overview-box__group
|
||||
h2.heading-secondary.ma-bt-lg Quick facts
|
||||
.overview-box__detail
|
||||
svg.overview-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-calendar')
|
||||
span.overview-box__label Next date
|
||||
span.overview-box__text August 2021
|
||||
.overview-box__detail
|
||||
svg.overview-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-trending-up')
|
||||
span.overview-box__label Difficulty
|
||||
span.overview-box__text Medium
|
||||
.overview-box__detail
|
||||
svg.overview-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-user')
|
||||
span.overview-box__label Participants
|
||||
span.overview-box__text 10 people
|
||||
.overview-box__detail
|
||||
svg.overview-box__icon
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
span.overview-box__label Rating
|
||||
span.overview-box__text 4.9 / 5
|
||||
|
||||
.overview-box__group
|
||||
h2.heading-secondary.ma-bt-lg Your tour guides
|
||||
.overview-box__detail
|
||||
img.overview-box__img(src='/img/users/user-19.jpg', alt='Lead guide')
|
||||
span.overview-box__label Lead guide
|
||||
span.overview-box__text Steven Miller
|
||||
.overview-box__detail
|
||||
img.overview-box__img(src='/img/users/user-18.jpg', alt='Tour guide')
|
||||
span.overview-box__label Tour guide
|
||||
span.overview-box__text Lisa Brown
|
||||
.overview-box__detail
|
||||
img.overview-box__img(src='/img/users/user-17.jpg', alt='Intern')
|
||||
span.overview-box__label Intern
|
||||
span.overview-box__text Max Smith
|
||||
|
||||
.description-box
|
||||
h2.heading-secondary.ma-bt-lg About the park camper tour
|
||||
p.description__text Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
||||
p.description__text Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum!
|
||||
|
||||
section.section-pictures
|
||||
.picture-box
|
||||
img.picture-box__img.picture-box__img--1(src='/img/tour-5-1.jpg', alt='The Park Camper Tour 1')
|
||||
.picture-box
|
||||
img.picture-box__img.picture-box__img--2(src='/img/tour-5-2.jpg', alt='The Park Camper Tour 1')
|
||||
.picture-box
|
||||
img.picture-box__img.picture-box__img--3(src='/img/tour-5-3.jpg', alt='The Park Camper Tour 1')
|
||||
|
||||
section.section-map
|
||||
#map
|
||||
|
||||
section.section-reviews
|
||||
.reviews
|
||||
|
||||
.reviews__card
|
||||
.reviews__avatar
|
||||
img.reviews__avatar-img(src='/img/users/user-7.jpg', alt='Jim Brown')
|
||||
h6.reviews__user Jim Brown
|
||||
p.reviews__text Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque dignissimos sint quo commodi corrupti accusantium veniam saepe numquam.
|
||||
.reviews__rating
|
||||
svg.reviews__star.reviews__star--active
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
svg.reviews__star.reviews__star--active
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
svg.reviews__star.reviews__star--active
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
svg.reviews__star.reviews__star--active
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
svg.reviews__star.reviews__star--active
|
||||
use(xlink:href='/img/icons.svg#icon-star')
|
||||
|
||||
section.section-cta
|
||||
.cta
|
||||
.cta__img.cta__img--logo
|
||||
img(src='/img/logo-white.png', alt='Natours logo')
|
||||
img.cta__img.cta__img--1(src='/img/tour-5-2.jpg', alt='')
|
||||
img.cta__img.cta__img--2(src='/img/tour-5-1.jpg', alt='')
|
||||
.cta__content
|
||||
h2.heading-secondary What are you waiting for?
|
||||
p.cta__text 10 days. 1 adventure. Infinite memories. Make it yours today!
|
||||
button.btn.btn--green.span-all-rows Book tour now!
|
||||
@@ -0,0 +1,77 @@
|
||||
main.main
|
||||
.user-view
|
||||
nav.user-view__menu
|
||||
ul.side-nav
|
||||
li.side-nav--active
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-settings')
|
||||
| Settings
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-briefcase')
|
||||
| My bookings
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-star')
|
||||
| My reviews
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-credit-card')
|
||||
| Billing
|
||||
.admin-nav
|
||||
h5.admin-nav__heading Admin
|
||||
ul.side-nav
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-map')
|
||||
| Manage tours
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-users')
|
||||
| Manage users
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-star')
|
||||
| Manage reviews
|
||||
li
|
||||
a(href='#')
|
||||
svg
|
||||
use(xlink:href='img/icons.svg#icon-briefcase')
|
||||
|
||||
.user-view__content
|
||||
.user-view__form-container
|
||||
h2.heading-secondary.ma-bt-md Your account settings
|
||||
form.form.form-user-data
|
||||
.form__group
|
||||
label.form__label(for='name') Name
|
||||
input#name.form__input(type='text', value='Jonas Schmedtmann', required)
|
||||
.form__group.ma-bt-md
|
||||
label.form__label(for='email') Email address
|
||||
input#email.form__input(type='email', value='admin@natours.io', required)
|
||||
.form__group.form__photo-upload
|
||||
img.form__user-photo(src='img/user.jpg', alt='User photo')
|
||||
a.btn-text(href='') Choose new photo
|
||||
.form__group.right
|
||||
button.btn.btn--small.btn--green Save settings
|
||||
.line
|
||||
.user-view__form-container
|
||||
h2.heading-secondary.ma-bt-md Password change
|
||||
form.form.form-user-settings
|
||||
.form__group
|
||||
label.form__label(for='password-current') Current password
|
||||
input#password-current.form__input(type='password', placeholder='••••••••', required, minlength='8')
|
||||
.form__group
|
||||
label.form__label(for='password') New password
|
||||
input#password.form__input(type='password', placeholder='••••••••', required, minlength='8')
|
||||
.form__group.ma-bt-lg
|
||||
label.form__label(for='password-confirm') Confirm password
|
||||
input#password-confirm.form__input(type='password', placeholder='••••••••', required, minlength='8')
|
||||
.form__group.right
|
||||
button.btn.btn--small.btn--green Save password
|
||||
1973
4-natours/after-section-06/package-lock.json
generated
Normal file
28
4-natours/after-section-06/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "natours",
|
||||
"version": "1.0.0",
|
||||
"description": "Learning node, express and mongoDB",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"start:dev": "nodemon server.js",
|
||||
"start:prod": "NODE_ENV=production nodemon server.js"
|
||||
},
|
||||
"author": "Jonas Schmedtmann",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^7.0.0",
|
||||
"express": "^4.16.4",
|
||||
"morgan": "^1.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-prettier": "^4.1.0",
|
||||
"eslint-plugin-import": "^2.17.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"eslint-plugin-prettier": "^3.0.1",
|
||||
"eslint-plugin-react": "^7.12.4",
|
||||
"prettier": "^1.17.0"
|
||||
}
|
||||
}
|
||||
1324
4-natours/after-section-06/public/css/style.css
Normal file
BIN
4-natours/after-section-06/public/img/favicon.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
1324
4-natours/after-section-06/public/img/icons.svg
Executable file
|
After Width: | Height: | Size: 141 KiB |
BIN
4-natours/after-section-06/public/img/logo-green-round.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
4-natours/after-section-06/public/img/logo-green-small.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
4-natours/after-section-06/public/img/logo-green.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
4-natours/after-section-06/public/img/logo-white.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
4-natours/after-section-06/public/img/pin.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-1-1.jpg
Executable file
|
After Width: | Height: | Size: 647 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-1-2.jpg
Executable file
|
After Width: | Height: | Size: 837 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-1-3.jpg
Executable file
|
After Width: | Height: | Size: 717 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-1-cover.jpg
Normal file
|
After Width: | Height: | Size: 950 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-2-1.jpg
Executable file
|
After Width: | Height: | Size: 588 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-2-2.jpg
Executable file
|
After Width: | Height: | Size: 308 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-2-3.jpg
Executable file
|
After Width: | Height: | Size: 903 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-2-cover.jpg
Normal file
|
After Width: | Height: | Size: 776 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-3-1.jpg
Executable file
|
After Width: | Height: | Size: 256 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-3-2.jpg
Normal file
|
After Width: | Height: | Size: 675 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-3-3.jpg
Normal file
|
After Width: | Height: | Size: 563 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-3-cover.jpg
Normal file
|
After Width: | Height: | Size: 606 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-4-1.jpg
Executable file
|
After Width: | Height: | Size: 618 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-4-2.jpg
Executable file
|
After Width: | Height: | Size: 787 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-4-3.jpg
Executable file
|
After Width: | Height: | Size: 970 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-4-cover.jpg
Normal file
|
After Width: | Height: | Size: 574 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-5-1.jpg
Normal file
|
After Width: | Height: | Size: 718 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-5-2.jpg
Normal file
|
After Width: | Height: | Size: 298 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-5-3.jpg
Normal file
|
After Width: | Height: | Size: 539 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-5-cover.jpg
Normal file
|
After Width: | Height: | Size: 626 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-6-1.jpg
Executable file
|
After Width: | Height: | Size: 571 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-6-2.jpg
Executable file
|
After Width: | Height: | Size: 545 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-6-3.jpg
Executable file
|
After Width: | Height: | Size: 387 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-6-cover.jpg
Normal file
|
After Width: | Height: | Size: 853 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-7-1.jpg
Executable file
|
After Width: | Height: | Size: 436 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-7-2.jpg
Normal file
|
After Width: | Height: | Size: 607 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-7-3.jpg
Executable file
|
After Width: | Height: | Size: 432 KiB |
BIN
4-natours/after-section-06/public/img/tours/tour-7-cover.jpg
Executable file
|
After Width: | Height: | Size: 275 KiB |