You've already forked no-js-hugo-theme
							
							
		
			
				
	
	
		
			31 lines
		
	
	
		
			976 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			976 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{ define "main" }}
 | 
						|
  {{ .Content }}
 | 
						|
  {{ if gt ( len ( where .Pages "Section" "posts" )) 0 }}
 | 
						|
    <h2>Recent Posts</h2>
 | 
						|
    {{ range first 2 ( where .Pages "Section" "posts" ) }}
 | 
						|
      <article class="all-list">
 | 
						|
        <div class="title-list">
 | 
						|
          <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
 | 
						|
          <div class="title-list-date">
 | 
						|
            {{ if eq .Date.IsZero false }}
 | 
						|
              <time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
 | 
						|
            {{ end }}
 | 
						|
            {{ if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
 | 
						|
              (updated)
 | 
						|
            {{ end }}
 | 
						|
          </div>
 | 
						|
        </div>
 | 
						|
        <div class="body-list">
 | 
						|
          <p></p> {{/* Spacing is weird if we don't include this */}}
 | 
						|
          <p>
 | 
						|
            {{ .Summary }}
 | 
						|
          </p>
 | 
						|
          {{ if .Truncated }}
 | 
						|
            <a href="{{ .RelPermalink }}">Read More…</a>
 | 
						|
          {{ end }}
 | 
						|
        </div>
 | 
						|
      </article>
 | 
						|
    {{ end }}
 | 
						|
  {{ end }}
 | 
						|
{{ end }}
 |