From 29a71cf828e90f89385d9b6bd2e68a1490a187c9 Mon Sep 17 00:00:00 2001 From: Mia Heidenstedt Date: Wed, 2 Nov 2022 09:04:23 +0100 Subject: [PATCH] [frontend] Fix #923 and markdown css (#925) * fix url in CONTRIBUTING.md * prevent img from overflow and allow to center the img * fix #923 and guide browser to select entire username --- CONTRIBUTING.md | 2 +- web/source/css/profile.css | 1 + web/source/css/status.css | 8 ++++++++ web/template/profile.tmpl | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d53c670be..0633f58d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,7 +146,7 @@ yarn run dev The Pinafore instance will start running on `localhost:4002`. -To connect to the testrig, navigate to `https://localhost:4002` and enter your instance name as `localhost:8080`. +To connect to the testrig, navigate to `http://localhost:4002` and enter your instance name as `localhost:8080`. At the login screen, enter the email address `zork@example.org` and password `password`. You will get a confirmation prompt. Accept, and you are logged in as Zork. diff --git a/web/source/css/profile.css b/web/source/css/profile.css index e4763f303..1f76d5d03 100644 --- a/web/source/css/profile.css +++ b/web/source/css/profile.css @@ -126,6 +126,7 @@ main { word-break: break-all; text-overflow: ellipsis; overflow: hidden; + user-select: all; } } diff --git a/web/source/css/status.css b/web/source/css/status.css index ff5cc2836..5b9900472 100644 --- a/web/source/css/status.css +++ b/web/source/css/status.css @@ -178,6 +178,14 @@ main { -webkit-overflow-scrolling: touch; } } + + img { + max-width: 100%; + margin: 5px auto; + } + img[alt~="!center"] { + display: block; + } } .emoji { diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index 98197f7cf..136496cdb 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -13,7 +13,7 @@
{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}'s avatar
{{if .account.DisplayName}}{{emojify .account.Emojis (escape .account.DisplayName)}}{{else}}{{.account.Username}}{{end}}
-
@{{.account.Username}}@{{.instance.AccountDomain}}
+
@{{.account.Username}}@{{.instance.AccountDomain}}