Bluesky app fork with some witchin' additions 馃挮
at main 5.2 kB view raw
1{% extends "base.html" %} 2 3{% block head_title %} 4{%- if postView -%} 5 @{{ postView.Author.Handle }} on Bluesky 6{%- elif requiresAuth and profileHandle -%} 7 @{{ profileHandle }} on Bluesky 8{%- else -%} 9 Bluesky 10{%- endif -%} 11{% endblock %} 12 13{% block html_head_extra -%} 14{%- if postView -%} 15 <meta property="og:type" content="article"> 16 <meta property="profile:username" content="{{ postView.Author.Handle }}"> 17 {%- if requestURI %} 18 <meta property="og:url" content="{{ requestURI }}"> 19 <link rel="canonical" href="{{ requestURI|canonicalize_url }}" /> 20 {% endif -%} 21 {%- if postView.Author.DisplayName %} 22 <meta property="og:title" content="{{ postView.Author.DisplayName }} (@{{ postView.Author.Handle }})"> 23 {% else %} 24 <meta property="og:title" content="@{{ postView.Author.Handle }}"> 25 {% endif -%} 26 {%- if postText %} 27 <meta name="description" content="{{ postText }}"> 28 <meta property="og:description" content="{{ postText }}"> 29 <meta property="twitter:description" content="{{ postText }}"> 30 {% endif -%} 31 {%- if imgThumbUrls %} 32 {% for imgThumbUrl in imgThumbUrls %} 33 <meta property="og:image" content="{{ imgThumbUrl }}"> 34 <meta property="twitter:image" content="{{ imgThumbUrl }}"> 35 {% endfor %} 36 <meta name="twitter:card" content="summary_large_image"> 37 {% else %} 38 <meta property="og:image" content="{{ postView.Author.Avatar }}"> 39 <meta property="twitter:image" content="{{ postView.Author.Avatar }}"> 40 <meta name="twitter:card" content="summary"> 41 {% endif %} 42 <meta name="twitter:label1" content="Posted At"> 43 <meta name="twitter:value1" content="{{ postView.IndexedAt }}"> 44 {%- if postView.LikeCount %} 45 <meta name="twitter:label2" content="Likes"> 46 <meta name="twitter:value2" content="{{ postView.LikeCount }}"> 47 {% endif -%} 48 {%- if postView.ReplyCount %} 49 <meta name="twitter:label3" content="Replies"> 50 <meta name="twitter:value3" content="{{ postView.ReplyCount }}"> 51 {% endif -%} 52 {%- if postView.RepostCount %} 53 <meta name="twitter:label4" content="Reposts"> 54 <meta name="twitter:value4" content="{{ postView.RepostCount }}"> 55 {% endif -%} 56 <meta property="article:published_time" content="{{ postView.IndexedAt }}"> 57 <link rel="alternate" type="application/json+oembed" href="https://embed.bsky.app/oembed?format=json&url={{ postView.Uri | urlencode }}" /> 58 <link rel="alternate" href="{{ postView.Uri }}" /> 59 <script type="application/ld+json"> 60 { 61 "@context": "https://schema.org", 62 "@type": "DiscussionForumPosting", 63 "author": { 64 "@type": "Person", 65 {%- if postView.Author.DisplayName %} 66 "name": "{{ postView.Author.DisplayName }}", 67 "alternateName": "@{{ postView.Author.Handle }}", 68 {% else %} 69 "name": "@{{ postView.Author.Handle }}", 70 {% endif -%} 71 "url": "https://bsky.app/profile/{{ postView.Author.Handle }}" 72 }, 73 {%- if postText %} 74 "text": "{{ postText }}", 75 {% endif %} 76 {%- if imageThumbUrls %} 77 "image": "{{ imageThumbUrls[0] }}", 78 {% endif %} 79 "datePublished": "{{ postView.IndexedAt }}", 80 "interactionStatistic": [ 81 { 82 "@type": "InteractionCounter", 83 "interactionType": "https://schema.org/LikeAction", 84 "userInteractionCount": {{ postView.LikeCount }} 85 }, 86 { 87 "@type": "InteractionCounter", 88 "interactionType": "https://schema.org/CommentAction", 89 "userInteractionCount": {{ postView.ReplyCount }} 90 }, 91 { 92 "@type": "InteractionCounter", 93 "interactionType": "https://schema.org/ShareAction", 94 "userInteractionCount": {{ postView.RepostCount + postView.QuoteCount }} 95 } 96 ] 97 } 98 </script> 99{%- elif requiresAuth and profileHandle -%} 100 <meta property="og:type" content="article"> 101 <meta property="profile:username" content="{{ profileHandle }}"> 102 {%- if requestURI %} 103 <meta property="og:url" content="{{ requestURI }}"> 104 <link rel="canonical" href="{{ requestURI|canonicalize_url }}" /> 105 {% endif -%} 106 {%- if profileDisplayName %} 107 <meta property="og:title" content="{{ profileDisplayName }} (@{{ profileHandle }})"> 108 {% else %} 109 <meta property="og:title" content="@{{ profileHandle }}"> 110 {% endif -%} 111 <meta name="description" content="This post requires authentication to view."> 112 <meta property="og:description" content="This post requires authentication to view."> 113 <meta property="twitter:description" content="This post requires authentication to view."> 114 <meta name="twitter:card" content="summary"> 115{% endif -%} 116{%- endblock %} 117 118{% block noscript_extra -%} 119{%- if postView -%} 120<div id="bsky_post_summary"> 121 <h3>Post</h3> 122 <p id="bsky_display_name">{{ postView.Author.DisplayName }}</p> 123 <p id="bsky_handle">{{ postView.Author.Handle }}</p> 124 <p id="bsky_did">{{ postView.Author.Did }}</p> 125 <p id="bsky_post_text">{{ postText }}</p> 126 <p id="bsky_post_indexedat">{{ postView.IndexedAt }}</p> 127</div> 128{%- elif requiresAuth and profileHandle -%} 129<div id="bsky_post_summary"> 130 <h3>Post</h3> 131 <p id="bsky_handle">{{ profileHandle }}</p> 132 <p id="bsky_post_text">This post requires authentication to view.</p> 133</div> 134{% endif -%} 135{%- endblock %}