Browse Source

reformatting the webmentions section

master
jk 4 years ago
parent
commit
e727fc51bb
  1. 2
      themes/nipponalba/layouts/_default/single.html
  2. 8
      themes/nipponalba/layouts/partials/webmention.html
  3. 16
      themes/nipponalba/static/css/style.css

2
themes/nipponalba/layouts/_default/single.html

@ -96,7 +96,7 @@
{{ if .Params.xContent }}<section class="p-name p-content"><span class="remotePhoto"><a href="{{ .Params.xAuthorUrl }}" target="_blank"><img src="{{ .Params.xPhoto }}" title="{{ .Params.xAuthor }}" alt="{{ .Params.xAuthor }}'s avatar"/></a></span><span class="response-date">{{ dateFormat "Mon, 02 Jan 2006 15:04:05 GMT" .Params.xPublished }}</span><br/><span class="response-text">{{ plainify .Params.xContent }}</span></section>{{end}} {{ if .Params.xContent }}<section class="p-name p-content"><span class="remotePhoto"><a href="{{ .Params.xAuthorUrl }}" target="_blank"><img src="{{ .Params.xPhoto }}" title="{{ .Params.xAuthor }}" alt="{{ .Params.xAuthor }}'s avatar"/></a></span><span class="response-date">{{ dateFormat "Mon, 02 Jan 2006 15:04:05 GMT" .Params.xPublished }}</span><br/><span class="response-text">{{ plainify .Params.xContent }}</span></section>{{end}}
{{ if .Params.Content }}{{ .Params.Content }}{{ end }} {{ if .Params.Content }}{{ .Params.Content }}{{ end }}
{{ if not (eq .Type "article") }}<section class="info"> {{ if not (eq .Type "article") }}<section class="info">
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a></span><br/>
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></a></span><br/>
</section>{{ end }} </section>{{ end }}
</article> </article>
</section> </section>

8
themes/nipponalba/layouts/partials/webmention.html

@ -3,20 +3,20 @@
{{ if eq (index . "wm-property") "mention" }} {{ if eq (index . "wm-property") "mention" }}
<section class="mention interaction"><span class="remote_profile"><a href="{{ .author.url }}"><img src="{{ .author.photo }}" /></a></span><section class="intcontent"><span class="intactivity"><a href="{{ .author.url }}">{{ .author.name }}</a> mentioned this post in <a href="{{ .url }}">the post {{ .title }}</a></span> <section class="mention interaction"><span class="remote_profile"><a href="{{ .author.url }}"><img src="{{ .author.photo }}" /></a></span><section class="intcontent"><span class="intactivity"><a href="{{ .author.url }}">{{ .author.name }}</a> mentioned this post in <a href="{{ .url }}">the post {{ .title }}</a></span>
{{ if .content.html }} {{ if .content.html }}
{{ .content.html | safeHTML }}
<p>{{ .content.html | safeHTML }}</p>
{{ else }} {{ else }}
<p>{{ .content.text | safeHTML }}</p> <p>{{ .content.text | safeHTML }}</p>
{{ end }} {{ end }}
<time>{{ dateFormat "02/01/2006 15:04 GMT" ( time .published ) }}</time></section></section>
<time>{{ dateFormat "Mon, 02 Jan 2006 15:04:05 GMT" ( time .published ) }}</time></section></section>
{{ end }} {{ end }}
{{ if eq (index . "wm-property") "in-reply-to" }} {{ if eq (index . "wm-property") "in-reply-to" }}
<section class="reply interaction"><span class="remote_profile"><a href="{{ .author.url }}"><img src="{{ .author.photo }}" /></a></span><section class="intcontent"><span class="intactivity"><a href="{{ .author.url }}">{{ .author.name }}</a> replied to this post <a href="{{ .url }}">here</a><br/></span> <section class="reply interaction"><span class="remote_profile"><a href="{{ .author.url }}"><img src="{{ .author.photo }}" /></a></span><section class="intcontent"><span class="intactivity"><a href="{{ .author.url }}">{{ .author.name }}</a> replied to this post <a href="{{ .url }}">here</a><br/></span>
{{ if .content.html }} {{ if .content.html }}
{{ .content.html | safeHTML }}
<p>{{ .content.html | safeHTML }}</p>
{{ else }} {{ else }}
<p>{{ .content.text | safeHTML }}</p> <p>{{ .content.text | safeHTML }}</p>
{{ end }} {{ end }}
<time>{{ dateFormat "02/01/2006 15:04 GMT" ( time .published ) }}</time></section></section>
<time>{{ dateFormat "Mon, 02 Jan 2006 15:04:05 GMT" ( time .published ) }}</time></section></section>
{{ end }} {{ end }}
{{ if eq (index . "wm-property") "bookmark" }} {{ if eq (index . "wm-property") "bookmark" }}
<section class="bookmark interaction"><a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" /></a><a href="{{ .author.url }}">{{ .author.name }}</a> bookmarked this post</section> <section class="bookmark interaction"><a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" /></a><a href="{{ .author.url }}">{{ .author.name }}</a> bookmarked this post</section>

16
themes/nipponalba/static/css/style.css

@ -372,7 +372,7 @@ margin-bottom: 200px;
display:grid; display:grid;
grid-template-rows: repeat (20px, 40px, auto); grid-template-rows: repeat (20px, 40px, auto);
width:100%; width:100%;
border-top:1px dotted var(--text-colour);
border-top:1px solid var(--text-colour);
padding-bottom:150px; padding-bottom:150px;
} }
#webmention-form{ #webmention-form{
@ -388,6 +388,7 @@ line-height: 2;
} }
#webmentions{ #webmentions{
grid-row: 4; grid-row: 4;
margin-top: 0 20px 0 0 ; margin-top: 0 20px 0 0 ;
padding: 0 0 200px 0; padding: 0 0 200px 0;
} }
@ -421,23 +422,30 @@ line-height: 2;
} }
.interaction.mention, .interaction.reply{ .interaction.mention, .interaction.reply{
border:1px dotted var(--text-colour);
border:1px solid var(--text-colour);
display:flex; display:flex;
min-height: 60px; min-height: 60px;
padding: 10px; padding: 10px;
background-color: var(--border-colour);
box-shadow: 0 2px 3px var(--shadow-colour);
border-radius: 15px;
} }
.interaction.mention .remote_profile, .interaction.reply .remote_profile{ .interaction.mention .remote_profile, .interaction.reply .remote_profile{
width: 90px; width: 90px;
}
min-width: 90px;
}
.interaction.mention .remote_profile img, .interaction.reply .remote_profile img, .remotePhoto img{ .interaction.mention .remote_profile img, .interaction.reply .remote_profile img, .remotePhoto img{
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 50%; border-radius: 50%;
object-fit:cover; object-fit:cover;
margin: 0 auto; margin: 0 auto;
}
.remotePhoto{
} }
.intactivity{ .intactivity{
font-size:13px;
font-size:15px;
font-style: italic; font-style: italic;
line-height:18px; line-height:18px;
text-align:left; text-align:left;