Update testimonial views
This commit is contained in:
@ -34,6 +34,7 @@ module.exports = function(app) {
|
|||||||
router.get('/submit-cat-photo', submitCatPhoto);
|
router.get('/submit-cat-photo', submitCatPhoto);
|
||||||
router.get('/labs', showLabs);
|
router.get('/labs', showLabs);
|
||||||
router.get('/stories', showTestimonials);
|
router.get('/stories', showTestimonials);
|
||||||
|
router.get('/all-stories', showAllTestimonials);
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
|
||||||
@ -192,7 +193,16 @@ module.exports = function(app) {
|
|||||||
function showTestimonials(req, res) {
|
function showTestimonials(req, res) {
|
||||||
res.render('resources/stories', {
|
res.render('resources/stories', {
|
||||||
title: 'Testimonials from Happy Free Code Camp Students who got Software Engineer Jobs',
|
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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,12 @@ block content
|
|||||||
p.text-justify= story.quote
|
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
|
if !user
|
||||||
.text-center
|
.text-center
|
||||||
a.btn.btn-cta.signup-btn(href="/login") Start learning to code (it's free)
|
a.btn.btn-cta.signup-btn(href="/login") Start learning to code (it's free)
|
||||||
|
Reference in New Issue
Block a user