my eye

Add entry metadata (published/updated/visibility/uid/url) to aside

Committed 3efb53

--- a/webint_posts/templates/entry.html
+++ b/webint_posts/templates/entry.html

 $ p = entry["published"][0]
 $if re.match("(19|20)\d\d", tx.request.uri.path):
     $var breadcrumbs = (p.format("MM"), p.format("MMMM"), p.format("DD"), p.format("D"))
-$# var body_classes = ["widescreen"]
-$var article_classes = ["h-entry"]
+$var body_classes = ["h-entry"]  # widescreen
 
 $# <link rel=alternate type=application/diamond-types href=${permalink}.dt
 $#       title="versioned history of this document"/>
 $# 
 $# $# XXX $ a = entry["author"]
 $# $# XXX <p class="p-author h-card"><a class="u-url p-name" href=$a["uid"]>$a["name"]</a></p>
-$# 
-$# $def aside():
-$#     <p><small><a class=u-url href=$entry["url"][0]><time class=dt-published
-$#     datetime="$entry['published'][0].isoformat()">\
-$#     $entry["published"][0].diff_for_humans()</time></a></small></p>
-$#     <p><small><strong>$entry["visibility"][0]</strong></small></p>
-$# 
-$#     $if tx.user.session:
-$#         <a href=$tx.user.session["uid"][0]/actions?reply=$entry["url"][0]>reply</a>
-$#     $else:
-$#         <a href=web+action://reply?url=$entry["url"][0]>reply</a>
-$# $var aside = aside
+
+$def aside():
+    <div style=font-size:.7em>
+    $if "published" in entry:
+        <p>Published <time class=dt-published
+        datetime="$entry['published'][0].isoformat()"
+        title="$entry['published'][0].isoformat()">\
+        $entry["published"][0].diff_for_humans()</time></p>
+    $if "updated" in entry:
+        <p>Updated <time class=dt-updated
+        datetime="$entry['updated'][0].isoformat()"
+        title="$entry['updated'][0].isoformat()">\
+        $entry["updated"][0].diff_for_humans()</time></p>
+
+    <p class=p-visibility
+    style=color:#2aa198;font-weight:bold;letter-spacing:.1em;text-transform:uppercase>\
+    $entry["visibility"][0]</span></p>
+
+    $ permalink = f"{tx.origin}{entry['url'][0]}"
+    <p style=font-weight:bold><a class="u-uid u-url" href=$permalink
+    onclick="navigator.clipboard.writeText('$permalink'); return false">\
+    $permalink&nbsp;📋</a></p>
+    </div>
+
+    $# $if tx.user.session:
+    $#     <a href=$tx.user.session["uid"][0]/actions?reply=$entry["url"][0]>reply</a>
+    $# $else:
+    $#     <a href=web+action://reply?url=$entry["url"][0]>reply</a>
+$var aside = aside()
 
 <footer>
 $for mention in mentions: