diff --git a/bskyweb/cmd/bskyweb/server.go b/bskyweb/cmd/bskyweb/server.go
index 5ba1dbc8..902d1ffc 100644
--- a/bskyweb/cmd/bskyweb/server.go
+++ b/bskyweb/cmd/bskyweb/server.go
@@ -185,7 +185,13 @@ func (srv *Server) WebPost(c echo.Context) error {
if err != nil {
log.Warnf("failed to fetch post: %s\t%v", uri, err)
} else {
- data["postView"] = tpv.Thread.FeedDefs_ThreadViewPost.Post
+ req := c.Request()
+ postView := tpv.Thread.FeedDefs_ThreadViewPost.Post
+ data["postView"] = postView
+ data["requestURI"] = fmt.Sprintf("https://%s%s", req.Host, req.URL.Path)
+ if postView.Embed != nil && postView.Embed.EmbedImages_View != nil {
+ data["imgThumbUrl"] = postView.Embed.EmbedImages_View.Images[0].Thumb
+ }
}
}
@@ -203,7 +209,9 @@ func (srv *Server) WebProfile(c echo.Context) error {
if err != nil {
log.Warnf("failed to fetch handle: %s\t%v", handle, err)
} else {
+ req := c.Request()
data["profileView"] = pv
+ data["requestURI"] = fmt.Sprintf("https://%s%s", req.Host, req.URL.Path)
}
}
diff --git a/bskyweb/templates/home.html b/bskyweb/templates/home.html
index 6625a7d9..0677b915 100644
--- a/bskyweb/templates/home.html
+++ b/bskyweb/templates/home.html
@@ -3,14 +3,12 @@
{% block head_title %}Bluesky{% endblock %}
{% block html_head_extra -%}
+
+
-
-
-
-
-
-
+
+
{%- endblock %}
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html
index 866a9739..05d62a1c 100644
--- a/bskyweb/templates/post.html
+++ b/bskyweb/templates/post.html
@@ -1,23 +1,39 @@
{% extends "base.html" %}
-{# TODO: link rel=canonical #}
-{# TODO: "same as" #}
+{% block head_title %}
+{%- if postView -%}
+ @{{ postView.Author.Handle }} on Bluesky
+{%- else -%}
+ Bluesky
+{%- endif -%}
+{% endblock %}
+
{% block html_head_extra -%}
-{%- if postView %}
-
-
-
-
- {%- if postView.Author.Avatar %}
-
-
+{%- if postView -%}
+
+
+ {%- if requestURI %}
+
{% endif -%}
- {%- if postView.Record.Text %}
-
-
+ {%- if postView.Author.DisplayName %}
+
+ {% else %}
+
{% endif -%}
-
-
+ {%- if postView.Record.Val.Text %}
+
+
+ {% endif -%}
+ {%- if imgThumbUrl %}
+
+
+ {%- elif postView.Author.Avatar %}
+ {# Don't use avatar image in cards; usually looks bad #}
+
+ {% endif %}
+
+
+
{% endif -%}
{%- endblock %}
diff --git a/bskyweb/templates/profile.html b/bskyweb/templates/profile.html
index 0710d328..4d4f6794 100644
--- a/bskyweb/templates/profile.html
+++ b/bskyweb/templates/profile.html
@@ -1,24 +1,40 @@
{% extends "base.html" %}
-{# TODO: "same as" indication with DID? #}
-{# TODO: could work in profileView.DisplayName here, conditionally? #}
+{% block head_title %}
+{%- if profileView -%}
+ @{{ profileView.Handle }} on Bluesky
+{%- else -%}
+ Bluesky
+{%- endif -%}
+{% endblock %}
+
{% block html_head_extra -%}
{%- if profileView -%}
-
-
-
-
+
+
+ {%- if requestURI %}
+
+ {% endif -%}
+ {%- if profileView.DisplayName %}
+
+ {% else %}
+
+ {% endif -%}
{%- if profileView.Description %}
-
-
+
+
{% endif -%}
- {%- if profileView.Avatar %}
-
-
- {% endif -%}
-
+ {%- if profileView.Banner %}
+
+
+ {%- elif profileView.Avatar -%}
+ {# Don't use avatar image in cards; usually looks bad #}
+
+ {% endif %}
+
-{%- endif -%}
+
+{% endif -%}
{%- endblock %}
{% block noscript_extra -%}