tweaked index, inline site/state, changed colours

This commit is contained in:
2020-01-08 10:37:24 -05:00
parent 571a65986c
commit c219347305
4 changed files with 57 additions and 28 deletions

View File

@ -13,26 +13,28 @@ block content
h2= "Visits"
each visit in visits
- sitesVisited.push(visit.id);
h3 #[a(href="/sites/" + visit.slug) #{visit.site}]
//- Commmand list of all the states
h5
- var states = visit.states.split(',')
- for (var i = 0; i < states.length; i++)
| #{states[i]}
if (i + 1 < states.length)
| ,
h2= "Remaining"
each site in sites
if !(sitesVisited.includes(site.id))
h3 #[a(href="/sites/" + site.slug) #{site.site}]
div(class="listing")
h3(class="site") #[a(href="/sites/" + visit.slug) #{visit.site}]
//- Commmand list of all the states
h5
- var states = site.states.split(',')
h5(class="state")
- var states = visit.states.split(',')
- for (var i = 0; i < states.length; i++)
| #{states[i]}
if (i + 1 < states.length)
| ,
h2= "Remaining"
each site in sites
if !(sitesVisited.includes(site.id))
div(class="listing")
h3(class="site") #[a(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)
| ,
else
//- h3= "Removed!"

View File

@ -4,9 +4,9 @@ block content
h1= title
h2= "Sites: " + sites.length
each site in sites
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,16 +9,13 @@ 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
h2= "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... "
include footer.pug