Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Require Express
const express = require('express');

// Express server handling requests and responses
const app = express();

// Make everything inside of public/ available
app.use(express.static('public'));

// first route, home
app.get('/home', (req, resp, next) => resp.sendFile(__dirname + '/views/home-page.html'))
console.log(__dirname)

// second route, about
app.get('/about', (req, resp, next) => resp.sendFile(__dirname + '/views/about-page.html'));

// third route, works
app.get('/works', (req, resp, next) => resp.sendFile(__dirname + '/views/works-page.html'));

// fourth route, gallery
app.get('/gallery', (req, resp, next) => resp.sendFile(__dirname + '/views/gallery-page.html'));



// Server Started
app.listen(3000, () => console.log('My website on port 3000!'));
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "lab-express-basic-site",
"version": "1.0.0",
"description": "![logo_ironhack_blue 7](https://user-images.githubusercontent.com/23629340/40541063-a07a0a8a-601a-11e8-91b5-2f13e4e6b441.png)",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.18.3"
}
}
Binary file added public/images/JKR.jpg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hpbooks.jpg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
body {
color:darkslateblue;
background-color:antiquewhite;
text-align:center;
display: flex;
flex-direction: column;
justify-content: space-evenly;

}

ul {
list-style: none;
display: flex;
justify-content: space-around;
}

a {
color: black;
padding: 15px;
background-color:chocolate;
text-decoration: none;
border: 1px solid yellow;
}

a:hover {
background-color:goldenrod
}

#jkr, #hpbooks {
color: black;
text-align: justify;
width: 60%;
margin: auto;
}

#jkr-pic {
width: 30%;
margin: auto;
}

#hp-pic {
width: 60%;
margin: auto;
}
38 changes: 38 additions & 0 deletions views/about-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>About</title>
<link rel="stylesheet" href="/stylesheets/style.css" />
</head>
<body>
<h1>J. K. Rowling</h1>

<img id="jkr-pic" src="/images/JKR.jpg.png" />
<div id="jkr">
<p>
J.K. Rowling is a British author who is best known for creating the
"Harry Potter" series, which consists of seven fantasy novels. The
series follows the life and adventures of a young wizard, Harry Potter,
and his friends Hermione Granger and Ron Weasley, as they attend
Hogwarts School of Witchcraft and Wizardry.
</p>
<p>
The "Harry Potter" series has become one of the most popular and
successful literary franchises in history, selling over 500 million
copies worldwide and being translated into numerous languages. It has
also been adapted into a highly successful film series.
</p>
<p>
J.K. Rowling's work has had a profound impact on popular culture and
literature, and she is celebrated for her imaginative storytelling,
intricate world-building, and compelling characters. Additionally, she
has been recognized for her philanthropy and advocacy on issues such as
children's welfare, literacy, and equality.
</p>
</div>
<ul>
<li><a href="/home">Come back</a></li>
</ul>
</body>
</html>
16 changes: 16 additions & 0 deletions views/gallery-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/stylesheets/style.css" />
<title>Gallery</title>
</head>
<body>
<h1>Gallery</h1>
<img id="hp-pic" src="/images/hpbooks.jpg.png" alt="HP Books">
<ul>
<li><a href="/home">Come back</a></li>
</ul>
</body>
</html>
16 changes: 16 additions & 0 deletions views/home-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Welcome</title>
<link rel="stylesheet" href="/stylesheets/style.css" />
</head>
<body>
<h1 id="Welcome">Welcome to this magic world!</h1>
<ul>
<li><a href="/about">About the writter</a></li>
<li><a href="/works">Works -Harry Potter</a></li>
<li><a href="/gallery">Gallery</a></li>
</ul>
</body>
</html>
77 changes: 77 additions & 0 deletions views/works-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/stylesheets/style.css" />
<title>Works</title>
</head>
<body>
<h1>Works</h1>
<h2>Harry Potter Books</h2>
<div id="hpbooks">
<h3>Harry Potter and the Philosopher's Stone</h3>
<p>
Harry Potter discovers he is a wizard on his eleventh birthday and is
accepted into Hogwarts School of Witchcraft and Wizardry. He learns
about his past and his parents' deaths, makes friends, and faces the
dark wizard Voldemort, who seeks the Philosopher's Stone for
immortality.
</p>

<h3>Harry Potter and the Chamber of Secrets</h3>
<p>
Harry returns to Hogwarts for his second year, where strange things
start happening, including students being petrified. Harry uncovers the
Chamber of Secrets, where a monster lurks, and must stop it from
attacking Muggle-born students.
</p>

<h3>Harry Potter and the Prisoner of Azkaban</h3>
<p>
Harry learns that Sirius Black, a prisoner and alleged supporter of
Voldemort, has escaped Azkaban and is hunting him. With the help of his
friends and a time-turner, Harry discovers the truth about Sirius and
his connection to his past.
</p>

<h3>Harry Potter and the Goblet of Fire</h3>
<p>
Harry is unexpectedly entered into the Triwizard Tournament, a dangerous
magical competition. As the youngest contestant, Harry faces dragons,
mermaids, and a dark plot orchestrated by Voldemort, leading to his
return to power.
</p>

<h3>Harry Potter and the Order of the Phoenix</h3>
<p>
Harry returns to Hogwarts amidst denial of Voldemort's return by the
Ministry of Magic. He forms Dumbledore's Army to learn defensive spells
and faces challenges from the Ministry, Umbridge, and visions of
Voldemort.
</p>

<h3>Harry Potter and the Half-Blood Prince</h3>
<p>
Harry learns more about Voldemort's past and his Horcruxes, objects
containing fragments of his soul. He receives private lessons from
Dumbledore, discovers the importance of the prophecy regarding him and
Voldemort, and faces tragedy with the death of a beloved character.
</p>

<h3>Harry Potter and the Deathly Hallows</h3>
<p>
Harry, Ron, and Hermione embark on a quest to find and destroy
Voldemort's remaining Horcruxes. They face danger, loss, and betrayal
while uncovering the Deathly Hallows, powerful magical objects. The
final battle between Harry and Voldemort leads to the defeat of the Dark
Lord and the restoration of peace in the wizarding world.
</p>
<p>Text:ChatGPT</p>
</div>

<ul>
<li><a href="/home">Come back</a></li>
</ul>
</body>
</html>