Added TILs to the mix!
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>All {{ .Type }}</h1>
|
||||
<ul>
|
||||
{{ range .Data.Pages }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>Today I Learned</h1>
|
||||
|
||||
<p>Debug Info:</p>
|
||||
<ul>
|
||||
<li>Total Pages: {{ len .Pages }}</li>
|
||||
<li>Is Section: {{ .IsSection }}</li>
|
||||
<li>Section Name: {{ .Section }}</li>
|
||||
</ul>
|
||||
|
||||
{{ range .Pages }}
|
||||
<article>
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
<p>Date: {{ .Date.Format "January 2, 2006" }}</p>
|
||||
{{ with .Description }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq (len .Pages) 0 }}
|
||||
<p>No TIL posts found.</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,31 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1 class="page-title">{{ .Title }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<div class="posts-list">
|
||||
{{ range .Pages }}
|
||||
<article class="post-entry">
|
||||
<header class="entry-header">
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ .Permalink }}" rel="bookmark">
|
||||
{{ .Date.Format "Jan 2, 2006" }} - {{ .Title }}
|
||||
</a>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
{{ with .Description }}
|
||||
<div class="entry-summary">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq (len .Pages) 0 }}
|
||||
<p>No TIL posts yet.</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{- partial "post.html" . -}}
|
||||
{{- partial "toc.html" . -}}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user