Browse Source

added reference page

master
Sean Clarke 11 months ago
parent
commit
81c998d614
4 changed files with 28 additions and 0 deletions
  1. +6
    -0
      controllers/sites.js
  2. +4
    -0
      public/stylesheets/main.css
  3. +1
    -0
      routes/index.js
  4. +17
    -0
      views/reference.pug

+ 6
- 0
controllers/sites.js View File

@ -43,6 +43,12 @@ module.exports = {
res.render('site-listing', { title: "All Sites", sites: sites });
});
},
getReference: function(req, res){
Site.getAll(function(err, sites){
if(err) throw err;
res.render('reference', { title: "Reference", sites: sites });
});
},
UniqueSiteVisits: function(req, res){
Visit.findUniqueSites(function(err, uniqueSites){
if(err) throw err;

+ 4
- 0
public/stylesheets/main.css View File

@ -63,3 +63,7 @@ h2 {
margin-top: 8px;
margin-left: 36px;
}
span.num {
color: var(--neon-purple)
}

+ 1
- 0
routes/index.js View File

@ -5,6 +5,7 @@ var sitesController = require('../controllers/sites')
router.get('/', sitesController.getHome);
router.get('/sites', sitesController.getAll);
router.get('/reference', sitesController.getReference);
router.get('/visits', sitesController.UniqueSiteVisits);
module.exports = router;

+ 17
- 0
views/reference.pug View File

@ -0,0 +1,17 @@
extends layout
block content
div(class='title')
h1= title
p Please use this reference sheet to coordiate your entries with the corresponding site identification number.
- var sitesVisited = [];
h2= "Site References"
each site in sites
div(class="listing")
h3
span(class='num') #{site.id}:
| #{site.site}
include footer.pug

Loading…
Cancel
Save