Skip to content

Commit

Permalink
Merge pull request #21 from fac-14/designsystem
Browse files Browse the repository at this point in the history
Relates #11 - Add design system document and sass middleware.
  • Loading branch information
sunuwars authored Sep 12, 2018
2 parents 72c7639 + 0f84c2e commit 2bd7db9
Show file tree
Hide file tree
Showing 11 changed files with 726 additions and 177 deletions.
Binary file added Documents/techaccessdesignsystem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
870 changes: 694 additions & 176 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"env2": "^2.2.2",
"express": "^4.16.3",
"express-handlebars": "^3.0.0",
"node-sass-middleware": "^0.11.0",
"pg-promise": "^8.4.6",
"querystring": "^0.2.0",
"sequelize": "^4.38.0",
Expand Down
Empty file removed public/.gitkeep
Empty file.
Binary file added public/images/unsplashpeoplecoding.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
8 changes: 8 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const express = require('express');
const handlebars = require('express-handlebars');
var sassMiddleware = require('node-sass-middleware');
const path = require('path');
const controllers = require('./controllers/index.js');
// const helpers = require('./views/helpers/index.js');
Expand All @@ -23,6 +24,13 @@ app.engine(
app.set('port', process.env.PORT || 1337);
app.set('host', process.env.PORT || 'localhost');
//app.use(favicon(path.join(__dirname, '..', 'public', 'favicon.ico')));
app.use(sassMiddleware({
src: __dirname,
dest: path.join(__dirname, '..', 'public'),
debug: true,
outputStyle: 'compressed',
prefix: '/stylesheets'
}));
app.use(express.static(path.join(__dirname, '..', 'public')));
app.use(controllers);

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/home.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exports.get = (req, res) => {
res.send('Hello there! You have a server');
res.render('home', {activePage:{home: true}})
}
7 changes: 7 additions & 0 deletions src/views/home.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<nav>Tech Access App</nav>
<figure>
<img src='/images/unsplashpeoplecoding.jpeg' alt='image of people coding'>
</figure>
<section>
<p>Think that a career in tech isn't for 'someone like you?' Let us prove you wrong.</p>
</section>
9 changes: 9 additions & 0 deletions src/views/layouts/main.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en">
{{>htmlhead}}
<body>
<main>
{{{body}}}
</main>
</body>
</html>
6 changes: 6 additions & 0 deletions src/views/partials/htmlhead.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>tech-access</title>
</head>

0 comments on commit 2bd7db9

Please sign in to comment.