mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-10-31 06:08:33 +00:00 
			
		
		
		
	feat(11ty): abstract defintions list into own components
This commit is contained in:
		
							
								
								
									
										13
									
								
								11ty/_includes/components/definition.njk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								11ty/_includes/components/definition.njk
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| <article id={{ definition.data.slug }}> | ||||
|   <h3>{{ definition.data.title}}</h3> | ||||
|   <p>{{ definition.data.flag }}</p> | ||||
|   {# <p>{{ definition.data.alt_words }}</p> #} | ||||
|   {%- if definition.data.alt_words -%} | ||||
|     <h4>Alt words</h4> | ||||
|     <ul class="list-semicolon"> | ||||
|       {% for word in definition.data.alt_words %} | ||||
|         <li>{{ word }}</li> | ||||
|       {% endfor %} | ||||
|     </ul> | ||||
|   {% endif %} | ||||
| </article> | ||||
							
								
								
									
										3
									
								
								11ty/_includes/components/defintions-list.njk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								11ty/_includes/components/defintions-list.njk
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| {% for definition in collections.definedDefinitions %} | ||||
|   {% include 'components/definition.njk' %} | ||||
| {% endfor %} | ||||
| @@ -34,21 +34,7 @@ | ||||
|       </section> | ||||
|       <section class="auto-grid"> | ||||
|         <h2>Words</h2> | ||||
|         {% for definition in collections.definitions %} | ||||
|           <article id={{ definition.data.slug }}> | ||||
|             <h3>{{ definition.data.title}}</h3> | ||||
|             <p>{{ definition.data.flag }}</p> | ||||
|             {# <p>{{ definition.data.alt_words }}</p> #} | ||||
|             {%- if definition.data.alt_words -%} | ||||
|               <h4>Alt words</h4> | ||||
|               <ul class="list-semicolon"> | ||||
|                 {% for word in definition.data.alt_words %} | ||||
|                   <li>{{ word }}</li> | ||||
|                 {% endfor %} | ||||
|               </ul> | ||||
|             {% endif %} | ||||
|           </article> | ||||
|         {% endfor %} | ||||
|         {% include 'components/defintions-list.njk' %} | ||||
|       </section> | ||||
|     </main> | ||||
|   </body> | ||||
|   </body> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Oscar
					Oscar