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
23 changes: 23 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const express = require("express")
const app = express();

app.use(express.static('public'))

//primera ruta

app.get('/home', (request, response, next) =>
response.sendFile(__dirname + '/views/index.html'));

//ruta para la pagina about

app.get('/aboutButerin', (request, response, next) =>
response.sendFile(__dirname + '/views/about.html'));

app.get('/works', (request, response, next) =>
response.sendFile(__dirname + '/views/works.html'));

app.get('/gallery', (request, response, next) =>
response.sendFile(__dirname + '/views/gallery.html'));

app.listen('3000', () => console.log("la app escuchando en el puerto 3000")) //con esto express recibe la peticion
//conecta servidor interno HTTP de Node con la app Express
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"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/Jopen-89/lab-express-basic-site.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"bugs": {
"url": "https://github.com/Jopen-89/lab-express-basic-site/issues"
},
"homepage": "https://github.com/Jopen-89/lab-express-basic-site#readme",
"dependencies": {
"express": "^5.1.0"
}
}
27 changes: 27 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
body {
margin: 0;
padding: 0;
}

.galeria {
display: flex;
align-items: center;
justify-content: center;
}

.btn {
display: inline-block;
padding: 10px 15px;
background-color: #4CAF50;
color: white;
text-decoration: none;
border-radius: 5px;
margin: 5px;
border-radius: 5px;
border: 2px solid #2e7d32; /* 👈 borde visible */
margin: 5px;
}

.btn:hover {
background-color: #45a049;
}
Binary file added public/images/Buterin.jpg
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/Buterin.jpg:Zone.Identifier
Binary file not shown.
Binary file added public/images/descarga (1).jpg
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/descarga (1).jpg:Zone.Identifier
Binary file not shown.
Binary file added public/images/descarga (2).jpg
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/descarga (2).jpg:Zone.Identifier
Binary file not shown.
Binary file added public/images/descarga.jpg
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/descarga.jpg:Zone.Identifier
Binary file not shown.
17 changes: 17 additions & 0 deletions views/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Buterin</title>
<meta name="description" content="Página para los fans de Vitalik Buterin">

<link rel="stylesheet" href="/public/css/style.css">
<script src="/app.js" defer></script>

</head>
<body>
<h2>Aqui explico la historia de Buterin</h2>

</body>
</html>
24 changes: 24 additions & 0 deletions views/gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Buterin</title>
<meta name="description" content="Página para los fans de Vitalik Buterin">

<link rel="stylesheet" href="/public/css/style.css">
<script src="/app.js" defer></script>

</head>
<body>
<h1>La galeria de Buterin</h1>

<div class="galeria">

<img src="\images\Buterin.jpg" alt="buterin">
<img src="\images\descarga (1).jpg" alt="buterin">
<img src="\images\descarga (2).jpg" alt="buterin">
<img src="\images\descarga.jpg" alt="buterin">
</div>
</body>
</html>
28 changes: 28 additions & 0 deletions views/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Buterin</title>
<meta name="description" content="Página para los fans de Vitalik Buterin">

<link rel="stylesheet" href="/css/style.css">
<script src="/app.js" defer></script>

</head>
<body>

<header>
<h1>El Magnífico Buterin</h1>
<nav>
<nav>
<a href="/home" class="btn">🏠 Home</a>
<a href="/aboutButerin" class="btn">ℹ️ About</a>
<a href="/works" class="btn">💼 Works</a>
<a href="/gallery" class="btn">🖼️ Gallery</a>
</nav>
</nav>
</header>
<img src="\images\Buterin.jpg" alt="buterin">
</body>
</html>
17 changes: 17 additions & 0 deletions views/works.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Buterin</title>
<meta name="description" content="Página para los fans de Vitalik Buterin">

<link rel="stylesheet" href="/public/css/style.css">
<script src="/app.js" defer></script>

</head>
<body>
<h2>Vitalik es conocido por ser el creador de la blockchain Ethereum</h2>

</body>
</html>