ybbond

My site. The main domain
Log | Files | Refs | README | LICENSE | CC-LICENSE

webmentions-handler.html (3047B)


      1 {{ with index $.Site.Data.webmentions (replace (trim .RelPermalink "/") "/" "--") }}
      2   <div class="wm-div">
      3     {{ with where . "wm-property" "in" (slice "repost-of" "bookmark-of" "rsvp") -}}
      4       <p class="wm-subtitle">Reposted/Boosted by:</p>
      5       {{- range . }}
      6         {{ $like := . }}
      7         <a
      8           href="{{ $like.author.url }}"
      9           title="Photo of {{ $like.author.name }}"
     10           class="wm-avatar"
     11         >
     12           {{- if $like.author.photo }}
     13             <img
     14               src="{{ $like.author.photo }}"
     15               alt="Photo of {{ $like.author.name }}"
     16               class="wm-avatar"
     17             />
     18           {{- else }}
     19             <div class="wm-avatar">?</div>
     20           {{- end }}
     21         </a>
     22       {{- end }}
     23     {{ end -}}
     24 
     25     {{ with where . "wm-property" "in" (slice "like-of") -}}
     26       <p class="wm-subtitle">Liked by:</p>
     27       {{- range . }}
     28         {{ $like := . }}
     29         <a
     30           href="{{ $like.author.url }}"
     31           title="Photo of {{ $like.author.name }}"
     32           class="wm-avatar"
     33         >
     34           {{- if $like.author.photo }}
     35             <img
     36               src="{{ $like.author.photo }}"
     37               alt="Photo of {{ $like.author.name }}"
     38               class="wm-avatar"
     39             />
     40           {{- else }}
     41             <div class="wm-avatar">?</div>
     42           {{- end }}
     43         </a>
     44       {{- end }}
     45     {{ end -}}
     46 
     47     {{ with where . "wm-property" "in" (slice "in-reply-to" "mention-of") }}
     48       <div>
     49         <p class="wm-subtitle">Replies:</p>
     50           {{ range . }}
     51             {{ $reply := . }}
     52             <div class="wm-reply">
     53               <div class="wm-reply-head">
     54                 <a
     55                   href="{{ $reply.author.url }}"
     56                   title="Photo of {{ $reply.author.name }}"
     57                   class="wm-avatar"
     58                 >
     59                   {{- if $reply.author.photo }}
     60                     <img
     61                       src="{{ $reply.author.photo }}"
     62                       alt="Photo of {{ $reply.author.name }}"
     63                       class="wm-avatar"
     64                     />
     65                   {{- else }}
     66                     <div class="wm-avatar">?</div>
     67                   {{- end }}
     68                 </a>
     69                 <a
     70                   href="{{ $reply.author.url }}"
     71                   title="Profile of {{ $reply.author.name }}"
     72                   class="wm-author no-outline"
     73                 >
     74                   <span class="">{{ $reply.author.name }}</span>
     75                 </a>
     76                   &nbsp;on&nbsp;
     77                 <a href="{{ $reply.url }}" class="no-outline">
     78                   {{ substr (index $reply "wm-received") 0 10 }}
     79                 </a>
     80               </div>
     81               <div class="wm-reply-content">
     82                 {{ if $reply.content.html }}
     83                   {{ safeHTML $reply.content.html }}
     84                 {{ else }}
     85                   {{ $reply.content.text }}
     86                 {{ end }}
     87               </div>
     88             </div>
     89           {{ end }}
     90       </div>
     91     {{ end }}
     92   </div>
     93 {{ end }}