ybbond

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

webmentions-handler.html (2986B)


      1 {{ with index $.Site.Data.webmentions (replace (trim .RelPermalink "/") "/" "--") }}
      2   <hr class="wm-hr">
      3   <div class="wm-div">
      4     {{- with where . "wm-property" "in" (slice "like-of" "repost-of" "bookmark-of" "rsvp" "in-reply-to" "mention-of") }}
      5       <h3 class="wm-title">
      6         Webmentions <a
      7           href="https://indieweb.org/Webmention"
      8           rel="noopenner noreferrer"
      9           target="_blank"
     10           class="no-outline"
     11         >?</a>:
     12       </h3>
     13     {{- end }}
     14 
     15     {{ with where . "wm-property" "in" (slice "repost-of" "bookmark-of" "rsvp") -}}
     16       <p class="wm-subtitle">Reposted/Boosted by:</p>
     17       {{- range . }}
     18         {{ $like := . }}
     19         <a
     20           href="{{ $like.author.url }}"
     21           title="Photo of {{ $like.author.name }}"
     22           class="wm-avatar"
     23         >
     24           <img
     25             src="{{ $like.author.photo }}"
     26             alt="Photo of {{ $like.author.name }}"
     27             class="wm-avatar"
     28           />
     29         </a>
     30       {{- end }}
     31     {{ end -}}
     32 
     33     {{ with where . "wm-property" "in" (slice "like-of") -}}
     34       <p class="wm-subtitle">Liked by:</p>
     35       {{- range . }}
     36         {{ $like := . }}
     37         <a
     38           href="{{ $like.author.url }}"
     39           title="Photo of {{ $like.author.name }}"
     40           class="wm-avatar"
     41         >
     42           <img
     43             src="{{ $like.author.photo }}"
     44             alt="Photo of {{ $like.author.name }}"
     45             class="wm-avatar"
     46           />
     47         </a>
     48       {{- end }}
     49     {{ end -}}
     50 
     51     {{ with where . "wm-property" "in" (slice "in-reply-to" "mention-of") }}
     52       <div>
     53         <p class="wm-subtitle">Replies:</p>
     54           {{ range . }}
     55             {{ $reply := . }}
     56             <div class="wm-reply">
     57               <div class="wm-reply-head">
     58                 <a
     59                   href="{{ $reply.author.url }}"
     60                   title="Photo of {{ $reply.author.name }}"
     61                   class="wm-avatar"
     62                 >
     63                   <img
     64                     src="{{ $reply.author.photo }}"
     65                     alt="Photo of {{ $reply.author.name }}"
     66                     class="wm-avatar"
     67                   />
     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 }}