mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 04:06:36 +00:00 
			
		
		
		
	Add partials
This commit is contained in:
		
							parent
							
								
									16103599b3
								
							
						
					
					
						commit
						9f753226f6
					
				
					 6 changed files with 52 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -4,12 +4,21 @@
 | 
			
		|||
    <title>{{.Title}}</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <h1>{{.Title}}</h1>
 | 
			
		||||
    {{.Content}}
 | 
			
		||||
    {{ range .Pages }}
 | 
			
		||||
        <ul>
 | 
			
		||||
            <li><a href="{{.Permalink}}">{{.Title}}</a></li>
 | 
			
		||||
        </ul>
 | 
			
		||||
    {{end}}
 | 
			
		||||
    {{ partial "content.html" . }}
 | 
			
		||||
 | 
			
		||||
    <!--Group posts by months-->
 | 
			
		||||
    {{ range .Pages.GroupByDate "2006-01" }}
 | 
			
		||||
        {{ $month := print .Key  "-01"}}
 | 
			
		||||
        {{ $display := dateFormat "2006-01" $month }}
 | 
			
		||||
        <h3 id="{{ $display }}">
 | 
			
		||||
            <a href="#{{ $display }}">
 | 
			
		||||
                <time datetime="{{ $month }}" title='{{ dateFormat "January 2006" $month }}'>{{ $display }}</time>
 | 
			
		||||
            </a>
 | 
			
		||||
        </h3>
 | 
			
		||||
        <!--List posts belonging to current month -->
 | 
			
		||||
        {{ range (sort .Pages "Date" "desc") }}
 | 
			
		||||
            {{ partial "list_item.html" . }}
 | 
			
		||||
        {{ end }}
 | 
			
		||||
    {{ end }}
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue