visits added to site page

This commit is contained in:
2020-01-07 17:41:30 -05:00
parent e69a1e03f8
commit 571a65986c
6 changed files with 30 additions and 12 deletions

View File

@ -1,7 +1,7 @@
extends layout
block content
h1= title
h1(id='title')= title
h2= "Sites Visited: "
a(href="/visits") #{visits.length}
@ -13,7 +13,7 @@ block content
h2= "Visits"
each visit in visits
- sitesVisited.push(visit.id);
h3= visit.site
h3 #[a(href="/sites/" + visit.slug) #{visit.site}]
//- Commmand list of all the states
h5
- var states = visit.states.split(',')
@ -25,7 +25,7 @@ block content
h2= "Remaining"
each site in sites
if !(sitesVisited.includes(site.id))
h3= site.site
h3 #[a(href="/sites/" + site.slug) #{site.site}]
//- Commmand list of all the states
h5
- var states = site.states.split(',')

View File

@ -9,4 +9,16 @@ block content
h5= site.category
.content
p #{site.description}
//- - var states = visit.states.split(',')
//- - for (var i = 0; i < states.length; i++)
//- | #{states[i]}
//- if (i + 1 < states.length)
//- | ,
if visits
each visit in visits
p #{visit.date}: #{visit.img} at the site: #{visit.site_id}
include footer.pug