Browse Source

some rendering of the responses page added

master
jk 5 years ago
parent
commit
cd00304341
  1. 16
      config.toml
  2. 2
      content/response/202005.md
  3. 2
      content/response/_index.md
  4. 6
      data/response/202005.yaml
  5. 27
      layouts/_default/section.html

16
config.toml

@ -108,19 +108,9 @@ weight = 500
url = "/photo/" url = "/photo/"
[[languages.en.menu.main]] [[languages.en.menu.main]]
name = "Likes"
weight = 600
url = "/like-of/"
[[languages.en.menu.main]]
name = "Replies"
weight = 700
url = "/in-reply-to/"
[[languages.en.menu.main]]
name = "Re-posts"
weight = 800
url = "/repost-of/"
name = "Responses"
weight = 500
url = "/response/"
[languages.jp] [languages.jp]
weight = 10 weight = 10

2
content/response/202005.md

@ -1,3 +1,3 @@
--- ---
type: reply
type: response
--- ---

2
content/response/_index.md

@ -1,3 +1,3 @@
--- ---
type: repost
type: response
--- ---

6
data/response/202005.yaml

@ -3,14 +3,14 @@ entries:
- -
date: '2020-05-06 13:28:38' date: '2020-05-06 13:28:38'
draft: false draft: false
in-reply-to: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
inreplyto: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
posttype: in-reply-to posttype: in-reply-to
slug: 5eb2ad76 slug: 5eb2ad76
content: 'Testing replies' content: 'Testing replies'
- -
date: '2020-05-06 13:34:32' date: '2020-05-06 13:34:32'
draft: false draft: false
like-of: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
likeof: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
posttype: like-of posttype: like-of
slug: 5eb2aed8 slug: 5eb2aed8
content: '' content: ''
@ -18,6 +18,6 @@ entries:
date: '2020-05-06 13:36:06' date: '2020-05-06 13:36:06'
draft: false draft: false
posttype: repost-of posttype: repost-of
repost-of: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
repostof: 'https://jk.nipponalba.scot/images/2020/05/1588754061638-782637-800.jpeg'
slug: 5eb2af36 slug: 5eb2af36
content: 'Testing re-post.' content: 'Testing re-post.'

27
layouts/_default/section.html

@ -3,7 +3,7 @@
<div class="contents"> <div class="contents">
<span id="pagination-top">{{ partial "pagination.html" . }}</span> <span id="pagination-top">{{ partial "pagination.html" . }}</span>
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<section data-post-type="{{ .Type }}" class="h-entry {{.Type }}">
{{ if not (eq .Type "response")}}<section data-post-type="{{ .Type }}" class="h-entry {{.Type }}">
<div class="p-author author" style="display:none;"> <div class="p-author author" style="display:none;">
<a rel="author" class="p-name u-url u-uid" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}</a> <a rel="author" class="p-name u-url u-uid" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}</a>
<img class="u-photo" src="/images/profile.jpg"/> <img class="u-photo" src="/images/profile.jpg"/>
@ -29,8 +29,33 @@
</div> </div>
</div>{{end}} </div>{{end}}
</aside> </aside>
</section><hr/>{{end}}
{{ if eq .Type "response"}}
{{range .Site.Data.response}}
{{range .entries}}
<section data-post-type="{{ .posttype }}" data-post-id="{{ .slug }}"class="h-entry">
<div class="p-author author" style="display:none;">
<a rel="author" class="p-name u-url u-uid" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}</a>
<img class="u-photo" src="/images/profile.jpg"/>
</div>
<aside>
<article class="u-{{ .posttype }} h-cite">
{{ if .likeof }}<p> Liked {{ end }}
{{ if .inreplyto }}<p> Replied to {{ end }}
{{ if .repostof }}<p>Shared {{ end }}
someone's
{{ if .likeof }}<a href="{{ .likeof }}" class="link u-url"> post</a>{{ end }}
{{ if .inreplyto }}<a href="{{ .inreplyto }}" class="link u-url"> post</a>{{ end }}
{{ if .repostof }}<a href="{{ .repostof }}" class="link u-url"> post</a>{{ end }}</p>
<div class="e-content">{{ .content }}</div><br/>
<a href="{{ .slug | relLangURL }}" class="link u-url time"><time class="dt-published" datetime="{{ .date }}">{{ .date }}</time></a>
</article>
</aside>
</section><hr/> </section><hr/>
{{end}} {{end}}
{{end}}
{{end}}
{{ end }}
<span id="pagination-bottom">{{ partial "pagination.html" . }}</span> <span id="pagination-bottom">{{ partial "pagination.html" . }}</span>
</div> </div>
</main> </main>