From 4c28ef12b541a0e7f4405ac4f8945917d578f6fc Mon Sep 17 00:00:00 2001 From: Sean Clarke Date: Sat, 11 Jan 2020 11:59:33 -0500 Subject: [PATCH] tweaked some visuals in site --- controllers/sites.js | 2 +- public/stylesheets/main.css | 14 ++++++++++++-- views/site-listing.pug | 18 ++++++++++-------- views/site.pug | 15 +++++++++------ 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/controllers/sites.js b/controllers/sites.js index f111d5d..c09fdb3 100644 --- a/controllers/sites.js +++ b/controllers/sites.js @@ -54,7 +54,7 @@ module.exports = { if(err) throw err; Site.findAllById(uniqueSites, function(err, uniqueSiteVisits){ if(err) throw err; - res.render('site-listing', { title: "UniqueSiteVisits", sites: uniqueSiteVisits }); + res.render('site-listing', { title: "Sites Visited", sites: uniqueSiteVisits }); }); }); } diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 436aea8..de8608b 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -46,7 +46,7 @@ a { display: inline; } -h2 { +h1, h2.visits { color: var(--neon-blue); } @@ -68,6 +68,16 @@ span.num { color: var(--neon-purple) } -#title, #sub-title, #footer { +#title, #sub-title, #footer, h2.visits { text-align: center; } + +h1#title { + margin-bottom: 8px; +} + +#sub-title h2, #sub-title h5 { + color: white; + margin: 0px; + padding: 0px; +} diff --git a/views/site-listing.pug b/views/site-listing.pug index b72f264..69a65e4 100644 --- a/views/site-listing.pug +++ b/views/site-listing.pug @@ -6,13 +6,15 @@ block content h2= "Sites: " + sites.length each site in sites - h3 #[a(href="/sites/" + site.slug) #{site.site}] - //- Commmand list of all the states - h5 - - var states = site.states.split(',') - - for (var i = 0; i < states.length; i++) - | #{states[i]} - if (i + 1 < states.length) - | , + div(class="listing") + h3(class="site") #[a(class="remaining" href="/sites/" + site.slug) #{site.site}] + //- Commmand list of all the states + h5(class="state") + - var states = site.states.split(',') + - for (var i = 0; i < states.length; i++) + | #{states[i]} + if (i + 1 < states.length) + | , + include footer.pug diff --git a/views/site.pug b/views/site.pug index 2391d67..b8e2fb3 100644 --- a/views/site.pug +++ b/views/site.pug @@ -2,20 +2,23 @@ extends layout block content h1(id="title")= site.site - h3(id="sub-title")= "Date Inscribed: " + site.date_inscribed - img(src= site.img_url alt= site.site) - h4= "Located: " + site.latitude + " " + site.longitude + div(id="sub-title") + h2= site.date_inscribed + h5= site.latitude + " " + site.longitude + h5= site.category + + + //- img(src= site.img_url alt= site.site) - h5= site.category .content p #{site.description} if visits - h2= "Visits" + h2(class="visits")= "Visits" each visit in visits p #{visit.date}: #{visit.img} at the site: #{visit.site_id} else - h2= "This site has yet to be visited. Soon... " + h2(class="visits")= "This site has yet to be visited. Soon... " include footer.pug