diff --git a/app.js b/app.js index e69de29bb..516ec0e75 100644 --- a/app.js +++ b/app.js @@ -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!')); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..5174af450 --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/public/images/JKR.jpg.png b/public/images/JKR.jpg.png new file mode 100644 index 000000000..dee281a98 Binary files /dev/null and b/public/images/JKR.jpg.png differ diff --git a/public/images/hpbooks.jpg.png b/public/images/hpbooks.jpg.png new file mode 100644 index 000000000..1eb5b774e Binary files /dev/null and b/public/images/hpbooks.jpg.png differ diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css new file mode 100644 index 000000000..04864daa8 --- /dev/null +++ b/public/stylesheets/style.css @@ -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; +} \ No newline at end of file diff --git a/views/about-page.html b/views/about-page.html new file mode 100644 index 000000000..004436614 --- /dev/null +++ b/views/about-page.html @@ -0,0 +1,38 @@ + + + + + About + + + +

J. K. Rowling

+ + +
+

+ 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. +

+

+ 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. +

+

+ 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. +

+
+ + + diff --git a/views/gallery-page.html b/views/gallery-page.html new file mode 100644 index 000000000..92180ff77 --- /dev/null +++ b/views/gallery-page.html @@ -0,0 +1,16 @@ + + + + + + + Gallery + + +

Gallery

+ HP Books + + + diff --git a/views/home-page.html b/views/home-page.html new file mode 100644 index 000000000..a31c40645 --- /dev/null +++ b/views/home-page.html @@ -0,0 +1,16 @@ + + + + + Welcome + + + +

Welcome to this magic world!

+ + + diff --git a/views/works-page.html b/views/works-page.html new file mode 100644 index 000000000..6165bfd9f --- /dev/null +++ b/views/works-page.html @@ -0,0 +1,77 @@ + + + + + + + Works + + +

Works

+

Harry Potter Books

+
+

Harry Potter and the Philosopher's Stone

+

+ 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. +

+ +

Harry Potter and the Chamber of Secrets

+

+ 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. +

+ +

Harry Potter and the Prisoner of Azkaban

+

+ 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. +

+ +

Harry Potter and the Goblet of Fire

+

+ 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. +

+ +

Harry Potter and the Order of the Phoenix

+

+ 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. +

+ +

Harry Potter and the Half-Blood Prince

+

+ 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. +

+ +

Harry Potter and the Deathly Hallows

+

+ 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. +

+

Text:ChatGPT

+
+ + + +