Bones of a Twitter section
Copied over the templates from blog/ and set up permalinks. Drew some bespoke star and retweet icons. Wrote a script to import data from the archive.
This commit is contained in:
parent
16f96558cc
commit
cac32298b8
10 changed files with 362 additions and 0 deletions
7
layouts/twitter/li_grid_with_date.html
Normal file
7
layouts/twitter/li_grid_with_date.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<li class=tweet>
|
||||
{{ .Content }}
|
||||
<ul class=metadata>
|
||||
<li class=timestamp><a href="{{ .Permalink }}">{{ .Date | time.Format ":date_full" }}, {{ .Date | time.Format ":time_short" }}</a></li>
|
||||
</ul>
|
||||
{{ partial "development/draft_tag.html" . }}
|
||||
</li>
|
26
layouts/twitter/list.html
Normal file
26
layouts/twitter/list.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{ define "header" }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ $paginator := .Paginator 100 }}
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
|
||||
<ul class=tweets>
|
||||
{{ range $paginator.Pages }}
|
||||
{{- if or (not .Draft) (not hugo.IsProduction) -}}
|
||||
{{- .Render "li_grid_with_date" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
0
layouts/twitter/section.atom.atom
Normal file
0
layouts/twitter/section.atom.atom
Normal file
0
layouts/twitter/section.rss.rss
Normal file
0
layouts/twitter/section.rss.rss
Normal file
15
layouts/twitter/single.html
Normal file
15
layouts/twitter/single.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" }}
|
||||
<article class=tweet>
|
||||
{{ .Content }}
|
||||
<footer>
|
||||
<ul class=metadata>
|
||||
<li class=timestamp>
|
||||
{{ .Date | time.Format ":date_full" }},
|
||||
{{ .Date | time.Format ":time_short" }}
|
||||
</li>
|
||||
<li class=fav><img src="/images/star-unfilled.png" width=12 height=l2> {{ .Params.tweet.tweet.favorite_count }}</li>
|
||||
<li class=rt><img src="/images/retweet.png" width=14 height=14> {{ .Params.tweet.tweet.retweet_count }}</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue