list on home
This commit is contained in:
		
							parent
							
								
									5dffee9429
								
							
						
					
					
						commit
						78bc7a366c
					
				
					 4 changed files with 8 additions and 6 deletions
				
			
		
							
								
								
									
										2
									
								
								app.js
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								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 } ) | ||||
| }) | ||||
| 
 | ||||
|  |  | |||
|  | @ -4,5 +4,6 @@ | |||
|   <div> | ||||
|     <a href="/list" class="button-cta">View full database</a> | ||||
|   </div> | ||||
|   {{> pronounList}} | ||||
| </div> | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| <div class="flex flex-col gap-8"> | ||||
|   <h1 class="text-3xl">List of Popular Pronouns</h1> | ||||
|   <ul class="columns-1 md:columns-2 gap-4"> | ||||
|     {{#each pronounList}} | ||||
|       <li class="mb-2"><a href="/{{this}}" class="pronoun-list-link">{{this}}</a></li> | ||||
|     {{/each}} | ||||
|   </ul> | ||||
|   {{> pronounList}} | ||||
| </div> | ||||
|  |  | |||
							
								
								
									
										5
									
								
								src/views/partials/pronounList.handlebars
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/views/partials/pronounList.handlebars
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
|   <ul class="columns-1 md:columns-2 gap-4"> | ||||
|     {{#each pronounList}} | ||||
|       <li class="mb-2"><a href="/{{this}}" class="pronoun-list-link">{{this}}</a></li> | ||||
|     {{/each}} | ||||
|   </ul> | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ava Gaiety W
						Ava Gaiety W