fix directory layout in layouts according to new Hugo structure
This commit is contained in:
		
							parent
							
								
									cfb7931a33
								
							
						
					
					
						commit
						dcbe59a322
					
				
					 32 changed files with 128 additions and 0 deletions
				
			
		| Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B | 
| Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B | 
| Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B | 
							
								
								
									
										48
									
								
								layouts/topics/list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								layouts/topics/list.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,48 @@ | ||||||
|  | {{ define "main" }} | ||||||
|  | 
 | ||||||
|  | <div class="home"> | ||||||
|  | 
 | ||||||
|  |   {{- $parents := .Params.Topics -}} | ||||||
|  |   {{- $mainWidth := or (and $parents "8") "12" -}} | ||||||
|  |   {{- $children := (where  | ||||||
|  |                       (where .Site.Pages "Section" "topics")  | ||||||
|  |                    "Params.topics" "intersect" (slice .Name))  -}} | ||||||
|  |   <div class="row"> | ||||||
|  |     <div class="col-md-{{ $mainWidth }}"> | ||||||
|  |       <div class="card mt-3 mb-3"> | ||||||
|  |         <div class="card-header"> | ||||||
|  |           <h2 class="card-text">{{i18n .Data.Singular}}: {{ .Title }}</h2> | ||||||
|  |         </div> | ||||||
|  |         <div class="card-body"> | ||||||
|  |           {{ with .Content -}} | ||||||
|  |             <div class="card-text">{{ . }}</div> | ||||||
|  |           {{- end }} | ||||||
|  |           {{ with $children -}} | ||||||
|  |             <p class="card-text"> | ||||||
|  |             {{- i18n "child-topics" -}}: | ||||||
|  |             {{ range . -}} | ||||||
|  |               <span class="badge rounded-pill bg-secondary m-1"> | ||||||
|  |                 <a href="{{ .Permalink }}">{{ .Title }}</a> | ||||||
|  |               </span> | ||||||
|  |             {{- end }} | ||||||
|  |             </p> | ||||||
|  |           {{- end }} | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |     {{ partial "parent-topics.html" . }} | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  |   <div class="row"> | ||||||
|  |     {{ $paginator := .Paginate (.Data.Pages) }} | ||||||
|  |     {{ range $paginator.Pages }} | ||||||
|  |       {{ partial "card.html" . }} | ||||||
|  |     {{ end }} | ||||||
|  |   </div>  | ||||||
|  |      | ||||||
|  |   <div class="row"> | ||||||
|  |     {{ partial "pagination.html" . }} | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  | </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										48
									
								
								layouts/topics/taxonomy.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								layouts/topics/taxonomy.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,48 @@ | ||||||
|  | {{ define "main" }} | ||||||
|  | 
 | ||||||
|  | <div class="home"> | ||||||
|  | 
 | ||||||
|  |   {{- $parents := .Params.Topics -}} | ||||||
|  |   {{- $mainWidth := or (and $parents "8") "12" -}} | ||||||
|  |   {{- $children := (where  | ||||||
|  |                       (where .Site.Pages "Section" "topics")  | ||||||
|  |                    "Params.topics" "intersect" (slice .Name))  -}} | ||||||
|  |   <div class="row"> | ||||||
|  |     <div class="col-md-{{ $mainWidth }}"> | ||||||
|  |       <div class="card mt-3 mb-3"> | ||||||
|  |         <div class="card-header"> | ||||||
|  |           <h2 class="card-text">{{i18n .Data.Singular}}: {{ .Title }}</h2> | ||||||
|  |         </div> | ||||||
|  |         <div class="card-body"> | ||||||
|  |           {{ with .Content -}} | ||||||
|  |             <div class="card-text">{{ . }}</div> | ||||||
|  |           {{- end }} | ||||||
|  |           {{ with $children -}} | ||||||
|  |             <p class="card-text"> | ||||||
|  |             {{- i18n "child-topics" -}}: | ||||||
|  |             {{ range . -}} | ||||||
|  |               <span class="badge rounded-pill bg-secondary m-1"> | ||||||
|  |                 <a href="{{ .Permalink }}">{{ .Title }}</a> | ||||||
|  |               </span> | ||||||
|  |             {{- end }} | ||||||
|  |             </p> | ||||||
|  |           {{- end }} | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |     {{ partial "parent-topics.html" . }} | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  |   <div class="row"> | ||||||
|  |     {{ $paginator := .Paginate (.Data.Pages) }} | ||||||
|  |     {{ range $paginator.Pages }} | ||||||
|  |       {{ partial "card.html" . }} | ||||||
|  |     {{ end }} | ||||||
|  |   </div>  | ||||||
|  |      | ||||||
|  |   <div class="row"> | ||||||
|  |     {{ partial "pagination.html" . }} | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  | </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										32
									
								
								layouts/topics/terms.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								layouts/topics/terms.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | ||||||
|  | {{ define "main" }} | ||||||
|  | 
 | ||||||
|  | <div id="home"> | ||||||
|  | 
 | ||||||
|  |   <div class="row"> | ||||||
|  |     <div class="col-md-12"> | ||||||
|  |       <div class="card mt-3"> | ||||||
|  |         <div class="card-body bg-light"> | ||||||
|  |           <h2 class="card-text"> {{or (i18n .Title) .Title }}</h2> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  |   <div class="row"> | ||||||
|  |     {{- $site := .Site }} | ||||||
|  |     {{ range .Data.Terms.ByCount -}} | ||||||
|  |     <div class="col-md-{{or $site.Params.TaxoWidth 4}} mt-3"> | ||||||
|  |       <div class="card"> | ||||||
|  |         <a href="{{ .Page.Permalink }}"  | ||||||
|  |            class="list-group-item d-flex justify-content-between align-items-center"> | ||||||
|  |           {{ .Page.Title }} | ||||||
|  |           <span class="badge rounded-pill bg-secondary">{{ .Count }}</span> | ||||||
|  |         </a> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |     {{- end }} | ||||||
|  |   </div> | ||||||
|  | 
 | ||||||
|  | </div> | ||||||
|  | 
 | ||||||
|  | {{ end }} | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue