mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 12:16:37 +00:00 
			
		
		
		
	Redesign list layout
This commit is contained in:
		
							parent
							
								
									6dfd8c00d4
								
							
						
					
					
						commit
						88589ee1af
					
				
					 5 changed files with 122 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +1,18 @@
 | 
			
		|||
<div class="media list-page-item mb-3" data-id="{{ with .File}}{{ .File.UniqueID }}{{ end }}">
 | 
			
		||||
  <div class="media-body">
 | 
			
		||||
    <a href="{{ .RelPermalink }}">
 | 
			
		||||
      <h5 class="my-0">{{ .Title }}</h5>
 | 
			
		||||
    </a>
 | 
			
		||||
    <small>{{ partial "content-details.html" . }}</small>
 | 
			
		||||
    <p>{{ partial "summary.html" . }}</p>
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
<!-- Obtain "dateformat" from scratchpad (or fall back to default) -->
 | 
			
		||||
{{ if not (.Scratch.Get "dateformat") }}
 | 
			
		||||
{{ .Scratch.Set "dateformat" "Jan 02, 2006" }}
 | 
			
		||||
{{ end }}
 | 
			
		||||
{{ $dateformat := .Scratch.Get "dateformat" }}
 | 
			
		||||
<!-- Reset scratchpad for next use (in next page) - avoids using old values -->
 | 
			
		||||
{{ .Scratch.Set "dateformat" nil }}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<a class="item-link" href="{{ .RelPermalink }}">
 | 
			
		||||
    <span class="item-title">{{ .Title }}</span>
 | 
			
		||||
    {{ if not .Date.IsZero }}
 | 
			
		||||
    <span class="item-day">{{ .Date.Format $dateformat }}</span>
 | 
			
		||||
    {{ end }}
 | 
			
		||||
</a>
 | 
			
		||||
<small class="item-details">{{ partial "content-details.html" . }}</small>
 | 
			
		||||
<!-- TODO: Only show summary on hover? -->
 | 
			
		||||
<p class="item-summary">{{ partial "summary.html" . }}</p>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue