diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js index 997731055a..3151958fdc 100644 --- a/server/boot/randomAPIs.js +++ b/server/boot/randomAPIs.js @@ -34,6 +34,7 @@ module.exports = function(app) { router.get('/submit-cat-photo', submitCatPhoto); router.get('/labs', showLabs); router.get('/stories', showTestimonials); + router.get('/all-stories', showAllTestimonials); app.use(router); @@ -192,7 +193,16 @@ module.exports = function(app) { function showTestimonials(req, res) { res.render('resources/stories', { title: 'Testimonials from Happy Free Code Camp Students who got Software Engineer Jobs', - stories: testimonials + stories: testimonials.slice(0, 75), + moreStories: true + }); + } + + function showAllTestimonials(req, res) { + res.render('resources/stories', { + title: 'Testimonials from Happy Free Code Camp Students who got Software Engineer Jobs', + stories: testimonials, + moreStories: false }); } diff --git a/server/views/resources/stories.jade b/server/views/resources/stories.jade index 576287baa3..9ffe1180ac 100644 --- a/server/views/resources/stories.jade +++ b/server/views/resources/stories.jade @@ -17,6 +17,12 @@ block content p.text-justify= story.quote + if moreStories + .text-center + a.btn.btn-lg.btn-primary.btn-primary-ghost.btn-block(href="/all-stories") Show more stories + .spacer + + if !user .text-center a.btn.btn-cta.signup-btn(href="/login") Start learning to code (it's free)