From e49623106cadcb3f57bd494dfcf56285b2b188a8 Mon Sep 17 00:00:00 2001 From: David Merfield Date: Sat, 30 Mar 2019 09:48:02 -0400 Subject: [PATCH] Updated header and index --- app/brochure/routes/featured/build.js | 2 + app/brochure/routes/featured/featured.json | 43 +++++++++++++++++++ app/brochure/routes/index.js | 6 ++- app/brochure/views/index.html | 2 +- app/brochure/views/layout.html | 14 ++++-- .../views/publishing/formatting/index.html | 2 +- 6 files changed, 62 insertions(+), 7 deletions(-) diff --git a/app/brochure/routes/featured/build.js b/app/brochure/routes/featured/build.js index 1e8cb781b5b..db8005dee7e 100644 --- a/app/brochure/routes/featured/build.js +++ b/app/brochure/routes/featured/build.js @@ -45,6 +45,7 @@ function build(callback) { .slice(1) .join(" ") .split(",")[0]; + var firstName = name.split(" ")[0]; var bio = words .slice(1) .join(" ") @@ -62,6 +63,7 @@ function build(callback) { link: link, host: host, name: name, + firstName: firstName, bio: bio, favicon: faviconPath + "/" + favicons[host] }); diff --git a/app/brochure/routes/featured/featured.json b/app/brochure/routes/featured/featured.json index 2c552f90e03..e3cb30a80c4 100644 --- a/app/brochure/routes/featured/featured.json +++ b/app/brochure/routes/featured/featured.json @@ -3,6 +3,7 @@ "link": "https://www.tillmanjex.info", "host": "www.tillmanjex.info", "name": "Tillman Jex", + "firstName": "Tillman", "bio": " is a composer based in Berlin", "favicon": "/images/featured/www.tillmanjex.info.png" }, @@ -10,6 +11,7 @@ "link": "https://photos.rachelpietraszek.com", "host": "photos.rachelpietraszek.com", "name": "Rachel Pietraszek", + "firstName": "Rachel", "bio": " is a lawyer based in Toronto", "favicon": "/images/featured/photos.rachelpietraszek.com.jpg" }, @@ -17,6 +19,7 @@ "link": "https://blog.andrewjanjigian.com", "host": "blog.andrewjanjigian.com", "name": "Andrew Janjigian", + "firstName": "Andrew", "bio": " is a photographer at Cook’s Illustrated", "favicon": "/images/featured/blog.andrewjanjigian.com.jpg" }, @@ -24,6 +27,7 @@ "link": "https://hannautkin.com", "host": "hannautkin.com", "name": "Hanna Utkin", + "firstName": "Hanna", "bio": " is a filmmaker and producer from New York City", "favicon": "/images/featured/hannautkin.com.jpg" }, @@ -31,6 +35,7 @@ "link": "https://keywords.oxus.net", "host": "keywords.oxus.net", "name": "Kerim Friedman", + "firstName": "Kerim", "bio": " teaches anthropology in Taiwan", "favicon": "/images/featured/keywords.oxus.net.jpg" }, @@ -38,6 +43,7 @@ "link": "https://com.johnbeeler.com", "host": "com.johnbeeler.com", "name": "John Beeler", + "firstName": "John", "bio": " is the label director at Asthmatic Kitty Records", "favicon": "/images/featured/com.johnbeeler.com.jpg" }, @@ -45,6 +51,7 @@ "link": "https://bitdepth.org", "host": "bitdepth.org", "name": "Chris Campbell", + "firstName": "Chris", "bio": " is a filmmaker based in Nova Scotia", "favicon": "/images/featured/bitdepth.org.jpg" }, @@ -52,6 +59,7 @@ "link": "https://www.matthewbattles.org", "host": "www.matthewbattles.org", "name": "Matthew Battles", + "firstName": "Matthew", "bio": " directs metaLAB at Harvard", "favicon": "/images/featured/www.matthewbattles.org.jpg" }, @@ -59,6 +67,7 @@ "link": "https://www.rebeccatron.com", "host": "www.rebeccatron.com", "name": "Rebecca Kukshtel", + "firstName": "Rebecca", "bio": " is an engineer based in New York City", "favicon": "/images/featured/www.rebeccatron.com.jpg" }, @@ -66,6 +75,7 @@ "link": "https://blog.aurynn.com", "host": "blog.aurynn.com", "name": "Aurynn Shaw", + "firstName": "Aurynn", "bio": " is a writer and engineer from New Zealand", "favicon": "/images/featured/blog.aurynn.com.jpg" }, @@ -73,6 +83,7 @@ "link": "https://www.skincarriedaway.com", "host": "www.skincarriedaway.com", "name": "Tiffany Cecilia", + "firstName": "Tiffany", "bio": " writes about skincare from San Francisco", "favicon": "/images/featured/www.skincarriedaway.com.jpg" }, @@ -80,6 +91,7 @@ "link": "https://www.kristianhjelle.com", "host": "www.kristianhjelle.com", "name": "Kristian Hjelle", + "firstName": "Kristian", "bio": " is a designer and partner at Bakken & Bæck", "favicon": "/images/featured/www.kristianhjelle.com.jpg" }, @@ -87,6 +99,7 @@ "link": "https://www.alexgibson.nyc", "host": "www.alexgibson.nyc", "name": "Alexander Gibson", + "firstName": "Alexander", "bio": " is an artist from New York City", "favicon": "/images/featured/www.alexgibson.nyc.png" }, @@ -94,6 +107,7 @@ "link": "https://www.jacobyyoung.com/about", "host": "www.jacobyyoung.com", "name": "Jacoby Young", + "firstName": "Jacoby", "bio": " works at Kapālama Elementary School in Hawaii", "favicon": "/images/featured/www.jacobyyoung.com.png" }, @@ -101,6 +115,7 @@ "link": "https://john.pavlusoffice.com", "host": "john.pavlusoffice.com", "name": "John Pavlus", + "firstName": "John", "bio": " is a writer and filmmaker based in Portland, Oregon", "favicon": "/images/featured/john.pavlusoffice.com.jpg" }, @@ -108,6 +123,7 @@ "link": "https://iiiiiiiii.in", "host": "iiiiiiiii.in", "name": "Ishtaarth Dalmia", + "firstName": "Ishtaarth", "bio": " writes about internet culture from Bengaluru", "favicon": "/images/featured/iiiiiiiii.in.jpg" }, @@ -115,6 +131,7 @@ "link": "https://kiefer.design", "host": "kiefer.design", "name": "Kiefer Sutherland", + "firstName": "Kiefer", "bio": " is a freelance designer and art director", "favicon": "/images/featured/kiefer.design.jpg" }, @@ -122,6 +139,7 @@ "link": "https://www.failuretolerated.com", "host": "www.failuretolerated.com", "name": "Sean McCoy", + "firstName": "Sean", "bio": " is a game designer from Dallas Texas", "favicon": "/images/featured/www.failuretolerated.com.jpg" }, @@ -129,6 +147,7 @@ "link": "https://mrfris.by", "host": "mrfris.by", "name": "Stuart Frisby", + "firstName": "Stuart", "bio": " is the Director of Design at Booking.com", "favicon": "/images/featured/mrfris.by.jpg" }, @@ -136,6 +155,7 @@ "link": "https://www.querlin.com", "host": "www.querlin.com", "name": "Querlin Ricci", + "firstName": "Querlin", "bio": " is a designer based in Atlanta", "favicon": "/images/featured/www.querlin.com.jpg" }, @@ -143,6 +163,7 @@ "link": "https://eli.li", "host": "eli.li", "name": "Eli Mellen", + "firstName": "Eli", "bio": " is a web developer based in Portland Maine", "favicon": "/images/featured/eli.li.jpg" }, @@ -150,6 +171,7 @@ "link": "https://rile.yt", "host": "rile.yt", "name": "Riley Tomasek", + "firstName": "Riley", "bio": " is a software engineer based in New York City", "favicon": "/images/featured/rile.yt.png" }, @@ -157,6 +179,7 @@ "link": "https://juicenews.com", "host": "juicenews.com", "name": "Jan van Iperen", + "firstName": "Jan", "bio": " analyzes the juice industry", "favicon": "/images/featured/juicenews.com.jpg" }, @@ -164,6 +187,7 @@ "link": "https://paul.af", "host": "paul.af", "name": "Paul Esch-Laurent", + "firstName": "Paul", "bio": " is a software engineer from Michigan", "favicon": "/images/featured/paul.af.jpg" }, @@ -171,6 +195,7 @@ "link": "https://diary.craigwhite.nyc", "host": "diary.craigwhite.nyc", "name": "Craig White", + "firstName": "Craig", "bio": " is a visual artist based in Harlem New York", "favicon": "/images/featured/diary.craigwhite.nyc.jpg" }, @@ -178,6 +203,7 @@ "link": "https://shashwati.com", "host": "shashwati.com", "name": "Shashwati Talukdar", + "firstName": "Shashwati", "bio": " is an independent filmmaker", "favicon": "/images/featured/shashwati.com.jpg" }, @@ -185,6 +211,7 @@ "link": "https://shawn.medero.net", "host": "shawn.medero.net", "name": "Shawn Medero", + "firstName": "Shawn", "bio": " is a software engineer based in Claremont", "favicon": "/images/featured/shawn.medero.net.jpg" }, @@ -192,6 +219,7 @@ "link": "https://mariusmasalar.me", "host": "mariusmasalar.me", "name": "Marius Masalar", + "firstName": "Marius", "bio": " is a photographer and journalist based in Toronto", "favicon": "/images/featured/mariusmasalar.me.jpg" }, @@ -199,6 +227,7 @@ "link": "https://www.thingelstad.com", "host": "www.thingelstad.com", "name": "Jamie Thingelstad", + "firstName": "Jamie", "bio": " is CTO at SPS Commerce in Minneapolis", "favicon": "/images/featured/www.thingelstad.com.jpg" }, @@ -206,6 +235,7 @@ "link": "https://www.ishshah.me", "host": "www.ishshah.me", "name": "Ish Shah", + "firstName": "Ish", "bio": " is an engineer based in San Francisco", "favicon": "/images/featured/www.ishshah.me.jpg" }, @@ -213,6 +243,7 @@ "link": "https://www.chrbutler.com", "host": "www.chrbutler.com", "name": "Chris Butler", + "firstName": "Chris", "bio": " is a designer based in Chapel Hill", "favicon": "/images/featured/www.chrbutler.com.png" }, @@ -220,6 +251,7 @@ "link": "https://tyler.vc", "host": "tyler.vc", "name": "Tyler Menezes", + "firstName": "Tyler", "bio": " is a programmer based in Seattle", "favicon": "/images/featured/tyler.vc.jpg" }, @@ -227,6 +259,7 @@ "link": "https://benlog.net", "host": "benlog.net", "name": "Ben Greenberg", + "firstName": "Ben", "bio": " is an investigative reporter based in Boston", "favicon": "/images/featured/benlog.net.jpg" }, @@ -234,6 +267,7 @@ "link": "https://www.enzel.io", "host": "www.enzel.io", "name": "David Enzel", + "firstName": "David", "bio": " is a lawyer based in Washington D.C.", "favicon": "/images/featured/www.enzel.io.jpg" }, @@ -241,6 +275,7 @@ "link": "https://journal.cheribaker.com", "host": "journal.cheribaker.com", "name": "Cheri Baker", + "firstName": "Cheri", "bio": " is a writer based in Seattle", "favicon": "/images/featured/journal.cheribaker.com.jpg" }, @@ -248,6 +283,7 @@ "link": "https://blog.amitgawande.com", "host": "blog.amitgawande.com", "name": "Amit Gawande", + "firstName": "Amit", "bio": " is software developer based in Pune India", "favicon": "/images/featured/blog.amitgawande.com.jpg" }, @@ -255,6 +291,7 @@ "link": "https://www.crossingthethreshold.net", "host": "www.crossingthethreshold.net", "name": "David Johnson", + "firstName": "David", "bio": " is a life coach in Maui Hawaii", "favicon": "/images/featured/www.crossingthethreshold.net.jpg" }, @@ -262,6 +299,7 @@ "link": "https://www.inthemargins.ca", "host": "www.inthemargins.ca", "name": "Sameer Vasta", + "firstName": "Sameer", "bio": " writes letters and takes long walks in Ontario, Canada", "favicon": "/images/featured/www.inthemargins.ca.jpg" }, @@ -269,6 +307,7 @@ "link": "https://www.jmablog.com", "host": "www.jmablog.com", "name": "James Adams", + "firstName": "James", "bio": " is a sports therapist based in London", "favicon": "/images/featured/www.jmablog.com.jpg" }, @@ -276,6 +315,7 @@ "link": "https://www.seanmcdevitt.com", "host": "www.seanmcdevitt.com", "name": "Sean McDevitt", + "firstName": "Sean", "bio": " is a writer from Illinois", "favicon": "/images/featured/www.seanmcdevitt.com.jpg" }, @@ -283,6 +323,7 @@ "link": "https://afc.letterspace.org", "host": "afc.letterspace.org", "name": "Robert van Vliet", + "firstName": "Robert", "bio": " is a writer in Minneapolis", "favicon": "/images/featured/afc.letterspace.org.jpg" }, @@ -290,6 +331,7 @@ "link": "https://discombobulated.co.nz", "host": "discombobulated.co.nz", "name": "Jessica Nickelsen", + "firstName": "Jessica", "bio": " is a writer from New Zealand", "favicon": "/images/featured/discombobulated.co.nz.jpg" }, @@ -297,6 +339,7 @@ "link": "https://blog.tomwhite.io", "host": "blog.tomwhite.io", "name": "Thomas White", + "firstName": "Thomas", "bio": " is a biologist at the University of Sydney", "favicon": "/images/featured/blog.tomwhite.io.jpg" } diff --git a/app/brochure/routes/index.js b/app/brochure/routes/index.js index 52160fc06bf..9bdb432a020 100644 --- a/app/brochure/routes/index.js +++ b/app/brochure/routes/index.js @@ -41,10 +41,14 @@ brochure.use(function(req, res, next) { res.locals.base = ""; res.locals.selected = {}; - req.originalUrl.split('/').forEach(function(slug){ + var slugs = req.originalUrl.split('/'); + + slugs.forEach(function(slug, i){ res.locals.selected[slug] = 'selected'; }); + res.locals.selected[slugs[slugs.length - 1] + 'Index'] = 'selected'; + // Handle index page of site. if (req.originalUrl === '/') res.locals.selected.index = 'selected'; diff --git a/app/brochure/views/index.html b/app/brochure/views/index.html index ad480938049..4212e2625a0 100644 --- a/app/brochure/views/index.html +++ b/app/brochure/views/index.html @@ -38,7 +38,7 @@ {{#featured}} - {{name}} {{bio}}. {{name}} uses the Default template.
+ {{name}} {{bio}}. {{firstName}} uses the Default template.
{{/featured}} diff --git a/app/brochure/views/layout.html b/app/brochure/views/layout.html index 23523979aaa..d8fd03d7057 100644 --- a/app/brochure/views/layout.html +++ b/app/brochure/views/layout.html @@ -16,7 +16,8 @@ } header a { - color: #005eb8; + color: #969696; + /*color: #005eb8;*/ text-decoration: none; } /* @@ -128,7 +129,7 @@ {{#if selected.publishing}}