diff --git a/app.js b/app.js index e69de29bb..905c767ae 100644 --- a/app.js +++ b/app.js @@ -0,0 +1,10 @@ +const express = require('express'); +const app = express(); +app.use(express.static('public')); + +app.get("/", (request, response) => response.sendFile(__dirname + '/views/home.html')); +app.get("/about", (request, response) => response.sendFile(__dirname + '/views/about.html')); +app.get("/works", (request, response) => response.sendFile(__dirname + '/views/works.html')); +app.get("/gallery", (request, response) => response.sendFile(__dirname + '/views/photo-gallery.html')); + +app.listen(3000, () => console.log('My first app listening on port 3000! ')); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..3b8777f45 --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "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" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/VINIRR99/lab-express-basic-site.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/VINIRR99/lab-express-basic-site/issues" + }, + "homepage": "https://github.com/VINIRR99/lab-express-basic-site#readme", + "dependencies": { + "express": "^4.17.3" + } +} diff --git a/public/images/image1.webp b/public/images/image1.webp new file mode 100644 index 000000000..335714ddc Binary files /dev/null and b/public/images/image1.webp differ diff --git a/public/scripts/navbar.js b/public/scripts/navbar.js new file mode 100644 index 000000000..ed8b39982 --- /dev/null +++ b/public/scripts/navbar.js @@ -0,0 +1,18 @@ +const navbar = document.createElement("nav"); +navbar.innerHTML = ` + +`; + +const navSpace = document.createElement("div"); +navSpace.setAttribute("style", "height: 26px;"); + +const body = document.body; +body.prepend(navSpace); +body.prepend(navbar); \ No newline at end of file diff --git a/public/stylesheets/about.css b/public/stylesheets/about.css new file mode 100644 index 000000000..e69de29bb diff --git a/public/stylesheets/home.css b/public/stylesheets/home.css new file mode 100644 index 000000000..a626c3ec9 --- /dev/null +++ b/public/stylesheets/home.css @@ -0,0 +1,20 @@ +section { + height: 589px; + background-image: url("/images/image1.webp"); + background-repeat: no-repeat; + background-size: 100% 589px; + display: flex; + justify-content: center; +} + +div { + text-align: center; +} + +h1 { + color: red; +} + +h3 { + color: blue +} \ No newline at end of file diff --git a/public/stylesheets/navbar.css b/public/stylesheets/navbar.css new file mode 100644 index 000000000..7c4cec520 --- /dev/null +++ b/public/stylesheets/navbar.css @@ -0,0 +1,31 @@ +body { + margin: 25px 0 0; +} + +nav { + width: 100%; + background-color: #c4c4c4; + border-bottom: 1px solid gray; + display: flex; + align-items: center; + position: fixed; +} + +nav ul { + width: 100%; + display: flex; + justify-content: space-around; +} + +nav li { + display: inline; +} + +nav a { + text-decoration: none; + color: black; +} + +nav a:hover { + color: red; +} \ No newline at end of file diff --git a/public/stylesheets/photo-gallery.css b/public/stylesheets/photo-gallery.css new file mode 100644 index 000000000..e69de29bb diff --git a/public/stylesheets/works.css b/public/stylesheets/works.css new file mode 100644 index 000000000..e69de29bb diff --git a/views/about.html b/views/about.html new file mode 100644 index 000000000..ae2814e85 --- /dev/null +++ b/views/about.html @@ -0,0 +1,13 @@ + + + + + Zé Ramalho + + + + +
About
+ + + \ No newline at end of file diff --git a/views/home.html b/views/home.html new file mode 100644 index 000000000..90db4dc9b --- /dev/null +++ b/views/home.html @@ -0,0 +1,18 @@ + + + + + Zé Ramalho + + + + +
+
+

Welcome to the Zé Ramalho fan page

+

Here you can discover more information about one of the best brazilian musicians ever!

+
+
+ + + \ No newline at end of file diff --git a/views/photo-gallery.html b/views/photo-gallery.html new file mode 100644 index 000000000..266aba0ac --- /dev/null +++ b/views/photo-gallery.html @@ -0,0 +1,13 @@ + + + + + Zé Ramalho + + + + +
Gallery
+ + + \ No newline at end of file diff --git a/views/works.html b/views/works.html new file mode 100644 index 000000000..c7d602730 --- /dev/null +++ b/views/works.html @@ -0,0 +1,13 @@ + + + + + Zé Ramalho + + + + +
Works
+ + + \ No newline at end of file