mirror of
https://github.com/len0rd/personal-website.git
synced 2025-03-01 03:51:57 -05:00
the start of something new
This commit is contained in:
commit
a80122b24e
23
package.json
Normal file
23
package.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "len0rd_net",
|
||||
"version": "0.0.1",
|
||||
"description": "src for lenords.net",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/len0rd/personal-website.git"
|
||||
},
|
||||
"author": "len0rd",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/len0rd/personal-website/issues"
|
||||
},
|
||||
"homepage": "https://github.com/len0rd/personal-website#readme",
|
||||
"dependencies": {
|
||||
"ejs": "^2.6.1",
|
||||
"express": "^4.16.3"
|
||||
}
|
||||
}
|
17
server.js
Normal file
17
server.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
var express = require('express');
|
||||
var app = express();
|
||||
|
||||
// set the view engine to ejs
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
// use res.render to load an ejs view file
|
||||
|
||||
app.get('/', function(req, res) {
|
||||
res.render('pages/index');
|
||||
});
|
||||
|
||||
app.get('/about', function(req, res) {
|
||||
res.render('pages/about');
|
||||
});
|
||||
|
||||
app.listen(8080);
|
18
views/pages/index.ejs
Normal file
18
views/pages/index.ejs
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<% include ../partials/includes %>
|
||||
</head>
|
||||
|
||||
<body class="container">
|
||||
|
||||
<main>
|
||||
<div class="jumbotron">
|
||||
<h1>This is great</h1>
|
||||
<p>Welcome to templating using EJS</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
6
views/partials/include.ejs
Normal file
6
views/partials/include.ejs
Normal file
|
@ -0,0 +1,6 @@
|
|||
<meta charset="UTF-8">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
|
3
views/partials/nav.ejs
Normal file
3
views/partials/nav.ejs
Normal file
|
@ -0,0 +1,3 @@
|
|||
<nav class="navbar navbar-dark bg-dark">
|
||||
<!-- Navbar content -->
|
||||
</nav>
|
Loading…
Reference in a new issue