From 78bc7a366cf27fd792c4782f3b38902996b2927f Mon Sep 17 00:00:00 2001 From: Ava Gaiety W Date: Wed, 15 Mar 2023 00:17:20 -0500 Subject: [PATCH] list on home --- app.js | 2 +- src/views/home.handlebars | 1 + src/views/list.handlebars | 6 +----- src/views/partials/pronounList.handlebars | 5 +++++ 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/views/partials/pronounList.handlebars diff --git a/app.js b/app.js index 521ae1f..b46415d 100644 --- a/app.js +++ b/app.js @@ -26,7 +26,7 @@ function constructLexicon(nominative, accusative, pronominalPossessive, predicat app.get('/', (req, res) => { const pageTitle = siteName; - const pronounListLimited = data.map(pronounObject => Object.values(pronounObject).join('/')).slice(pronounsToDisplayOnHome) + const pronounListLimited = data.map(pronounObject => Object.values(pronounObject).join('/')).slice(0, pronounsToDisplayOnHome) res.render('home', { siteName, pageTitle, pronounList: pronounListLimited } ) }) diff --git a/src/views/home.handlebars b/src/views/home.handlebars index 8dc4b6d..c34926e 100644 --- a/src/views/home.handlebars +++ b/src/views/home.handlebars @@ -4,5 +4,6 @@
View full database
+ {{> pronounList}} diff --git a/src/views/list.handlebars b/src/views/list.handlebars index f6a4a82..b886ba7 100644 --- a/src/views/list.handlebars +++ b/src/views/list.handlebars @@ -1,8 +1,4 @@

List of Popular Pronouns

- + {{> pronounList}}
diff --git a/src/views/partials/pronounList.handlebars b/src/views/partials/pronounList.handlebars new file mode 100644 index 0000000..fede72f --- /dev/null +++ b/src/views/partials/pronounList.handlebars @@ -0,0 +1,5 @@ +