Browse Source

added reference page

master
Sean Clarke 2 years ago
parent
commit
81c998d614
  1. 6
      controllers/sites.js
  2. 4
      public/stylesheets/main.css
  3. 1
      routes/index.js
  4. 17
      views/reference.pug

6
controllers/sites.js

@ -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
public/stylesheets/main.css

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

1
routes/index.js

@ -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
views/reference.pug

@ -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