Probably still not perfect, but better. - don't user avatar image. use banner for profile and post img, or nothing - most twitter metadata fields were redundant; twitter will parse out opengraph ("og:"), so don't duplicate those - add regular HTML description (for google, etc) - include URI - actually include text
48 lines
1.6 KiB
HTML
48 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block head_title %}
|
|
{%- if postView -%}
|
|
@{{ postView.Author.Handle }} on Bluesky
|
|
{%- else -%}
|
|
Bluesky
|
|
{%- endif -%}
|
|
{% endblock %}
|
|
|
|
{% block html_head_extra -%}
|
|
{%- if postView -%}
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:site_name" content="Bluesky Social">
|
|
{%- if requestURI %}
|
|
<meta property="og:url" content="{{ requestURI }}">
|
|
{% endif -%}
|
|
{%- if postView.Author.DisplayName %}
|
|
<meta property="og:title" content="{{ postView.Author.DisplayName }} (@{{ postView.Author.Handle }})">
|
|
{% else %}
|
|
<meta property="og:title" content="@{{ postView.Author.Handle }}">
|
|
{% endif -%}
|
|
{%- if postView.Record.Val.Text %}
|
|
<meta name="description" content="{{ postView.Record.Val.Text }}">
|
|
<meta property="og:description" content="{{ postView.Record.Val.Text }}">
|
|
{% endif -%}
|
|
{%- if imgThumbUrl %}
|
|
<meta property="og:image" content="{{ imgThumbUrl }}">
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
{%- elif postView.Author.Avatar %}
|
|
{# Don't use avatar image in cards; usually looks bad #}
|
|
<meta name="twitter:card" content="summary">
|
|
{% endif %}
|
|
<meta name="twitter:label1" content="Posted At">
|
|
<meta name="twitter:value1" content="{{ postView.CreatedAt }}">
|
|
<meta name="twitter:site" content="@bluesky">
|
|
{% endif -%}
|
|
{%- endblock %}
|
|
|
|
{% block noscript_extra -%}
|
|
<div id="bsky_post_summary">
|
|
<h3>Post</h3>
|
|
<p id="bsky_display_name">{{ postView.Author.DisplayName }}</p>
|
|
<p id="bsky_handle">{{ postView.Author.Handle }}</p>
|
|
<p id="bsky_did">{{ postView.Author.Did }}</p>
|
|
<p id="bsky_post_text">{{ postView.Record.Text }}</p>
|
|
</div>
|
|
{%- endblock %}
|