From 4a2c712b3dfac9033e84ea9d974df767c1859964 Mon Sep 17 00:00:00 2001 From: f0x Date: Wed, 6 Nov 2024 15:52:08 +0100 Subject: [PATCH] template formatting --- .vscode/settings.json | 9 +- web/template/404.tmpl | 42 +-- web/template/about.tmpl | 228 +++++++-------- web/template/authorize.tmpl | 42 +-- web/template/confirm_email.tmpl | 22 +- web/template/confirmed_email.tmpl | 16 +- web/template/domain-blocklist.tmpl | 60 ++-- web/template/email_new_report.tmpl | 2 +- web/template/email_new_signup.tmpl | 9 +- web/template/email_test.tmpl | 2 +- web/template/error.tmpl | 20 +- web/template/finalize.tmpl | 52 ++-- web/template/index.tmpl | 22 +- web/template/index_apps.tmpl | 120 ++++---- web/template/index_register.tmpl | 22 +- web/template/index_what_is_this.tmpl | 92 +++--- web/template/oob.tmpl | 12 +- web/template/page.tmpl | 74 ++--- web/template/page_footer.tmpl | 62 ++-- web/template/page_header.tmpl | 22 +- web/template/page_ogmeta.tmpl | 2 +- web/template/page_stylesheets.tmpl | 2 +- web/template/profile.tmpl | 409 +++++++++++++-------------- web/template/profile_fields.tmpl | 20 +- web/template/settings.tmpl | 4 +- web/template/sign-in.tmpl | 30 +- web/template/sign-up.tmpl | 98 +++---- web/template/signed-up.tmpl | 16 +- web/template/status.tmpl | 72 ++--- web/template/status_attachments.tmpl | 167 ++++++----- web/template/status_attributes.tmpl | 2 +- web/template/status_header.tmpl | 54 ++-- web/template/status_info.tmpl | 104 +++---- web/template/status_poll.tmpl | 92 +++--- web/template/tag.tmpl | 14 +- web/template/thread.tmpl | 60 ++-- 36 files changed, 1037 insertions(+), 1039 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index beb76548d..0c1373f3e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,9 @@ "go.lintFlags": [ "--fast" ], + "go.testEnvVars": { + "WAZERO_COMPILATION_CACHE": "~/.cache/wazero" + }, "gopls": { "analyses": { "composites": false @@ -19,5 +22,9 @@ ], "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" - } + }, + "html.format.wrapLineLength": 0, + "html.format.wrapAttributes": "preserve", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, } diff --git a/web/template/404.tmpl b/web/template/404.tmpl index cbad36091..55c817d53 100644 --- a/web/template/404.tmpl +++ b/web/template/404.tmpl @@ -19,25 +19,25 @@ {{- with . }}
-
-

404: Not Found

-

- GoToSocial only serves Public statuses via the web. -

-

- If you reached this page by clicking on a status link, - it's likely that the status is not Public. You can try - entering the status URL in your client's search bar, - to view the status from your account. If that doesn't - work, it's possible that the status has been deleted by - the author, you don't have permission to view it, or it - doesn't exist at all. -

-

- If you believe this 404 was an error, you can contact - the instance admin. Provide them with the following - request ID: {{- .requestID -}}. -

-
+
+

404: Not Found

+

+ GoToSocial only serves Public statuses via the web. +

+

+ If you reached this page by clicking on a status link, + it's likely that the status is not Public. You can try + entering the status URL in your client's search bar, + to view the status from your account. If that doesn't + work, it's possible that the status has been deleted by + the author, you don't have permission to view it, or it + doesn't exist at all. +

+

+ If you believe this 404 was an error, you can contact + the instance admin. Provide them with the following + request ID: {{- .requestID -}}. +

+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/about.tmpl b/web/template/about.tmpl index 0d45d561d..092ee6dc7 100644 --- a/web/template/about.tmpl +++ b/web/template/about.tmpl @@ -37,9 +37,9 @@ {{- if .languages }}

This instance prefers the following languages:

    - {{- range .languages }} -
  1. {{- . -}}
  2. - {{- end }} + {{- range .languages }} +
  3. {{- . -}}
  4. + {{- end }}
{{- else }}

No preferred languages have yet been set for this instance.

@@ -50,9 +50,9 @@ {{- if .instance.Rules }}

This instance has the following rules:

    - {{- range .instance.Rules }} -
  1. {{- .Text -}}
  2. - {{- end }} + {{- range .instance.Rules }} +
  3. {{- .Text -}}
  4. + {{- end }}
{{- else }}

No rules have yet been set for this instance.

@@ -61,7 +61,7 @@ {{- define "customCSSLimits" -}} Custom CSS is  + rel="noopener noreferrer">Custom CSS is  {{- if .instance.Configuration.Accounts.AllowCustomCSS -}} enabled {{- else -}} @@ -84,113 +84,113 @@ Polls can have up to {{- with . }}
-
-

About {{ .instance.Title -}}

-
- {{- with . }} - {{- include "description" . | indent 3 }} - {{- end }} -
-
-
-

Admin Contact

-
- {{- if .instance.ContactAccount }} - - {{- else }} -

This instance has not yet set a contact account.

- {{- end }} - {{- if .instance.Email }} -

Email: {{- .instance.Email -}}

- {{- else }} -

This instance has not yet set a contact email address.

- {{- end }} -
-
-
-

Instance Features

-
-
    -
  • {{- template "statusLimits" . -}}
  • -
  • {{- template "pollLimits" . -}}
  • -
  • {{- template "customCSSLimits" . -}}
  • -
-
-
-
-

Languages

-
- {{- with . }} - {{- include "languages" . | indent 3 }} - {{- end }} -
-
- {{- include "index_register.tmpl" . | indent 1 }} -
-

Instance Rules

-
- {{- with . }} - {{- include "rules" . | indent 3 }} - {{- end }} -
-
-
-

Terms and Conditions

-
- {{- with . }} - {{- include "termsAndConditions" . | indent 3 }} - {{- end }} -
-
-
-

Moderated servers

-
-

- ActivityPub instances federate with other instances by exchanging data with them over the network. - Exchanged data includes things like accounts, statuses, likes, boosts, and media attachments. - This exchange of data can be prevented for instances on specific domains via a domain block created - by an instance admin. When an instance is domain blocked by another instance: -

-
    -
  • Any existing data from the blocked instance is deleted from the storage of the instance doing the - blocking.
  • -
  • Interaction between the two instances is cut off in both directions; neither instance can interact - with the other.
  • -
  • No new data from the blocked instance will be created on the instance that blocks it.
  • -
-

- {{- if .blocklistExposed }} - View the list of domains blocked by this instance - {{- else }} - This instance does not publically share their list of blocked domains. - {{- end }} -

-
-
+
+

About {{ .instance.Title -}}

+
+ {{- with . }} + {{- include "description" . | indent 3 }} + {{- end }} +
+
+
+

Admin Contact

+
+ {{- if .instance.ContactAccount }} + + {{- else }} +

This instance has not yet set a contact account.

+ {{- end }} + {{- if .instance.Email }} +

Email: {{- .instance.Email -}}

+ {{- else }} +

This instance has not yet set a contact email address.

+ {{- end }} +
+
+
+

Instance Features

+
+
    +
  • {{- template "statusLimits" . -}}
  • +
  • {{- template "pollLimits" . -}}
  • +
  • {{- template "customCSSLimits" . -}}
  • +
+
+
+
+

Languages

+
+ {{- with . }} + {{- include "languages" . | indent 3 }} + {{- end }} +
+
+ {{- include "index_register.tmpl" . | indent 1 }} +
+

Instance Rules

+
+ {{- with . }} + {{- include "rules" . | indent 3 }} + {{- end }} +
+
+
+

Terms and Conditions

+
+ {{- with . }} + {{- include "termsAndConditions" . | indent 3 }} + {{- end }} +
+
+
+

Moderated servers

+
+

+ ActivityPub instances federate with other instances by exchanging data with them over the network. + Exchanged data includes things like accounts, statuses, likes, boosts, and media attachments. + This exchange of data can be prevented for instances on specific domains via a domain block created + by an instance admin. When an instance is domain blocked by another instance: +

+
    +
  • Any existing data from the blocked instance is deleted from the storage of the instance doing the + blocking.
  • +
  • Interaction between the two instances is cut off in both directions; neither instance can interact + with the other.
  • +
  • No new data from the blocked instance will be created on the instance that blocks it.
  • +
+

+ {{- if .blocklistExposed }} + View the list of domains blocked by this instance + {{- else }} + This instance does not publically share their list of blocked domains. + {{- end }} +

+
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/authorize.tmpl b/web/template/authorize.tmpl index 2767c4efb..294f94674 100644 --- a/web/template/authorize.tmpl +++ b/web/template/authorize.tmpl @@ -19,25 +19,25 @@ {{- with . }}
-
-

Authorize app

-
-

Hi {{- .user -}}!

-

- Application - {{- if .appwebsite }} - {{- .appname -}} - {{- else }} - {{- .appname -}} - {{- end }} - would like to perform actions on your behalf, with scope - {{- .scope -}}. -

-

- To continue, the application will redirect to: {{- .redirect -}} -

- -
-
+
+

Authorize app

+
+

Hi {{- .user -}}!

+

+ Application + {{- if .appwebsite }} + {{- .appname -}} + {{- else }} + {{- .appname -}} + {{- end }} + would like to perform actions on your behalf, with scope + {{- .scope -}}. +

+

+ To continue, the application will redirect to: {{- .redirect -}} +

+ +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/confirm_email.tmpl b/web/template/confirm_email.tmpl index d1932acd9..d9fd7f067 100644 --- a/web/template/confirm_email.tmpl +++ b/web/template/confirm_email.tmpl @@ -19,15 +19,15 @@ {{- with . }}
-
-

Confirm email address

-
-

- Hi {{- .username -}}! - Please click the button to confirm your email address {{- .email -}}. -

- -
-
+
+

Confirm email address

+
+

+ Hi {{- .username -}}! + Please click the button to confirm your email address {{- .email -}}. +

+ +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/confirmed_email.tmpl b/web/template/confirmed_email.tmpl index 2dc605e4b..fa6b20a10 100644 --- a/web/template/confirmed_email.tmpl +++ b/web/template/confirmed_email.tmpl @@ -19,12 +19,12 @@ {{- with . }}
-
-

Email address confirmed

-

Email address {{- .email -}} is now confirmed!

- {{- if not .approved }} -

Once an admin has approved your sign-up, you will be able to log in and use your account.

- {{- end }} -
+
+

Email address confirmed

+

Email address {{- .email -}} is now confirmed!

+ {{- if not .approved }} +

Once an admin has approved your sign-up, you will be able to log in and use your account.

+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/domain-blocklist.tmpl b/web/template/domain-blocklist.tmpl index 9a21796f9..e7faace0e 100644 --- a/web/template/domain-blocklist.tmpl +++ b/web/template/domain-blocklist.tmpl @@ -19,34 +19,34 @@ {{- with . }}
-
-

Suspended Instances

-

- The following list of domains have been suspended - by the administrator(s) of this server. -

-

- All current and future accounts on these instances are - blocked, and no more data is federated to the remote servers. - This extends to subdomains, so an entry for 'example.com' - includes 'social.example.com' as well. -

-
-
-
Domain
-
Public comment
-
- {{- range .blocklist }} -
- -
-

{{- .PublicComment -}}

-
-
- {{- end }} -
-
+
+

Suspended Instances

+

+ The following list of domains have been suspended + by the administrator(s) of this server. +

+

+ All current and future accounts on these instances are + blocked, and no more data is federated to the remote servers. + This extends to subdomains, so an entry for 'example.com' + includes 'social.example.com' as well. +

+
+
+
Domain
+
Public comment
+
+ {{- range .blocklist }} +
+ +
+

{{- .PublicComment -}}

+
+
+ {{- end }} +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/email_new_report.tmpl b/web/template/email_new_report.tmpl index 538d019a6..af98579c4 100644 --- a/web/template/email_new_report.tmpl +++ b/web/template/email_new_report.tmpl @@ -23,4 +23,4 @@ Hello moderator of {{ .InstanceName }} ({{ .InstanceURL }})! {{- else if .ReportTargetDomain }}Someone from your instance has reported a user from {{ .ReportTargetDomain }}. {{- else }}Someone from your instance has reported another user from your instance.{{ end }} -To view the report, paste the following link into your browser: {{ .ReportURL }} \ No newline at end of file +To view the report, paste the following link into your browser: {{ .ReportURL }} diff --git a/web/template/email_new_signup.tmpl b/web/template/email_new_signup.tmpl index b01d577d6..40d93eef4 100644 --- a/web/template/email_new_signup.tmpl +++ b/web/template/email_new_signup.tmpl @@ -23,10 +23,13 @@ Someone has submitted a new account sign-up to your instance. They provided the following details: -Email address: {{ .SignupEmail }} -Username: {{ .SignupUsername }} +Email address: +{{ .SignupEmail }} +Username: +{{ .SignupUsername }} {{- if .SignupReason }} -Reason: {{ .SignupReason }} +Reason: +{{ .SignupReason }} {{- end }} To view the sign-up, paste the following link into your browser: {{ .SignupURL }} diff --git a/web/template/email_test.tmpl b/web/template/email_test.tmpl index 92e075e46..a6eec6503 100644 --- a/web/template/email_test.tmpl +++ b/web/template/email_test.tmpl @@ -28,4 +28,4 @@ The following message was included by the admin user: {{ .Message }} {{- else }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/error.tmpl b/web/template/error.tmpl index 816062e27..383ddbd4f 100644 --- a/web/template/error.tmpl +++ b/web/template/error.tmpl @@ -19,14 +19,14 @@ {{- with . }}
-
-

An error occured:

-
{{- .error -}}
- {{- if .requestID }} -
- Request ID: {{- .requestID -}} -
- {{- end }} -
+
+

An error occured:

+
{{- .error -}}
+ {{- if .requestID }} +
+ Request ID: {{- .requestID -}} +
+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/finalize.tmpl b/web/template/finalize.tmpl index 383eb72d4..0d7ce7eb7 100644 --- a/web/template/finalize.tmpl +++ b/web/template/finalize.tmpl @@ -19,30 +19,30 @@ {{- with . }}
-
-

Finalize sign-in to {{ .instance.Title -}}

-
-

- Hi {{- .name -}}! -

-

- You are about to create an account on {{- .instance.Title -}}. - To finish the process, you must select your username. -

-
- - -
- - -
-
+
+

Finalize sign-in to {{ .instance.Title -}}

+
+

+ Hi {{- .name -}}! +

+

+ You are about to create an account on {{- .instance.Title -}}. + To finish the process, you must select your username. +

+
+ + +
+ + +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/index.tmpl b/web/template/index.tmpl index 420ad4a8e..95bd0b53a 100644 --- a/web/template/index.tmpl +++ b/web/template/index.tmpl @@ -27,15 +27,15 @@ {{- with . }}
-
-

About this instance

-
- {{- include "shortDescription" . | indent 3 }} - See more details -
-
- {{- include "index_what_is_this.tmpl" . | indent 1 }} - {{- include "index_register.tmpl" . | indent 1 }} - {{- include "index_apps.tmpl" . | indent 1 }} +
+

About this instance

+
+ {{- include "shortDescription" . | indent 3 }} + See more details +
+
+ {{- include "index_what_is_this.tmpl" . | indent 1 }} + {{- include "index_register.tmpl" . | indent 1 }} + {{- include "index_apps.tmpl" . | indent 1 }}
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/index_apps.tmpl b/web/template/index_apps.tmpl index 8580b3983..8d1113d48 100644 --- a/web/template/index_apps.tmpl +++ b/web/template/index_apps.tmpl @@ -19,64 +19,64 @@ {{- with . }}
-

Client applications

-
-

- Have an account on this instance and want to log in? - GoToSocial does not provide its own webclient, but implements the Mastodon client API. - You can use a variety of clients to log in to your account here: -

-
    -
  • -
    -

    Semaphore is a web client designed for speed and simplicity.

    - - Use Semaphore - -
    - -
  • -
  • -
    -

    Tusky is a lightweight mobile client for Android.

    - - Get Tusky - -
    - -
  • -
  • -
    -

    Feditext (beta) is a beautiful client for iOS, iPadOS and macOS.

    - - Get Feditext - -
    - -
  • -
  • -
    -

    Or try one of the Mastodon clients listed on the official Mastodon page.

    - - Get Mastodon apps - -
    - -
  • -
-
+

Client applications

+
+

+ Have an account on this instance and want to log in? + GoToSocial does not provide its own webclient, but implements the Mastodon client API. + You can use a variety of clients to log in to your account here: +

+
    +
  • +
    +

    Semaphore is a web client designed for speed and simplicity.

    + + Use Semaphore + +
    + +
  • +
  • +
    +

    Tusky is a lightweight mobile client for Android.

    + + Get Tusky + +
    + +
  • +
  • +
    +

    Feditext (beta) is a beautiful client for iOS, iPadOS and macOS.

    + + Get Feditext + +
    + +
  • +
  • +
    +

    Or try one of the Mastodon clients listed on the official Mastodon page.

    + + Get Mastodon apps + +
    + +
  • +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/index_register.tmpl b/web/template/index_register.tmpl index e51da948d..e83738f42 100644 --- a/web/template/index_register.tmpl +++ b/web/template/index_register.tmpl @@ -28,15 +28,15 @@ New account registration is currently  {{- with . }}
-

Register an Account on {{ .instance.Title -}}

-
-

{{- template "registrationLimits" . -}}

- {{- if .instance.Registrations }} -

To register a new account, please first read the rules and terms.

-

Then, use the sign-up page to register an account.

-

Manual admin approval is required for new accounts.

- {{- end }} -
+

Register an Account on {{ .instance.Title -}}

+
+

{{- template "registrationLimits" . -}}

+ {{- if .instance.Registrations }} +

To register a new account, please first read the rules and terms.

+

Then, use the sign-up page to register an account.

+

Manual admin approval is required for new accounts.

+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/index_what_is_this.tmpl b/web/template/index_what_is_this.tmpl index 15a17aab2..40f810959 100644 --- a/web/template/index_what_is_this.tmpl +++ b/web/template/index_what_is_this.tmpl @@ -19,50 +19,50 @@ {{- with . }}
-

What is this?

-
-

- The web page you're reading right now is served by an instance of GoToSocial, - a federated, distributed, open-source microblogging software which connects - to other instances across a network known as the "fediverse". -

-

What is an "instance"?

-

- "Instance" is a term commonly used for one node in the fediverse. Each instance - has its own web address, user(s), culture, rules, and settings. Instances exchange - data by "talking" to each other over the internet using a protocol called ActivityPub. -

- - - Learn more about ActivityPub (opens in a new tab). - -

- Each instance can, in theory, talk to each other instance, allowing people to talk - to one another across a decentralized network that has no single authority in charge. -

-

- There are thousands of fediverse instances, connecting millions of people together. -

-

How do I join the fediverse?

-

- You can join the fediverse by running your own instance of an ActivityPub software, - or by finding an existing instance that aligns with your values and expectations, - and registering an account. -

-

- To help you find an instance that suits you, you can try one of the following tools: -

- - {{- if .instance.Registrations }} -

Or, just register for an account on this instance!

- {{- end }} -
+

What is this?

+
+

+ The web page you're reading right now is served by an instance of GoToSocial, + a federated, distributed, open-source microblogging software which connects + to other instances across a network known as the "fediverse". +

+

What is an "instance"?

+

+ "Instance" is a term commonly used for one node in the fediverse. Each instance + has its own web address, user(s), culture, rules, and settings. Instances exchange + data by "talking" to each other over the internet using a protocol called ActivityPub. +

+ + + Learn more about ActivityPub (opens in a new tab). + +

+ Each instance can, in theory, talk to each other instance, allowing people to talk + to one another across a decentralized network that has no single authority in charge. +

+

+ There are thousands of fediverse instances, connecting millions of people together. +

+

How do I join the fediverse?

+

+ You can join the fediverse by running your own instance of an ActivityPub software, + or by finding an existing instance that aligns with your values and expectations, + and registering an account. +

+

+ To help you find an instance that suits you, you can try one of the following tools: +

+ + {{- if .instance.Registrations }} +

Or, just register for an account on this instance!

+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/oob.tmpl b/web/template/oob.tmpl index 05a639ec0..a8aae4102 100644 --- a/web/template/oob.tmpl +++ b/web/template/oob.tmpl @@ -19,10 +19,10 @@ {{- with . }}
-
-

Hi {{- .user -}}!

-

Here's your out-of-band token with scope "{{- .scope -}}", use it wisely:

- {{- .oobToken -}} -
+
+

Hi {{- .user -}}!

+

Here's your out-of-band token with scope "{{- .scope -}}", use it wisely:

+ {{- .oobToken -}} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/page.tmpl b/web/template/page.tmpl index 0bf33addd..ec35965a1 100644 --- a/web/template/page.tmpl +++ b/web/template/page.tmpl @@ -45,45 +45,45 @@ image/webp - - - - - {{- if .ogMeta }} - {{- include "page_ogmeta.tmpl" . | indent 2 }} - {{- else }} - {{- end }} - {{- if .rssFeed }} - - {{- else }} - {{- end }} - {{- if .account }} - - {{- else if .status }} - - {{- else }} - {{- end }} - - - - {{- include "page_stylesheets.tmpl" . | indent 2 }} - {{- range .javascript }} - - {{- end }} - {{- template "instanceTitle" . -}} + + + + + {{- if .ogMeta }} + {{- include "page_ogmeta.tmpl" . | indent 2 }} + {{- else }} + {{- end }} + {{- if .rssFeed }} + + {{- else }} + {{- end }} + {{- if .account }} + + {{- else if .status }} + + {{- else }} + {{- end }} + + + + {{- include "page_stylesheets.tmpl" . | indent 2 }} + {{- range .javascript }} + + {{- end }} + {{- template "instanceTitle" . -}} -
- {{- include "page_header.tmpl" . | indent 3 }} -
-
- {{- include .pageContent . | indent 3 | outdentPre }} -
- +
+ {{- include "page_header.tmpl" . | indent 3 }} +
+
+ {{- include .pageContent . | indent 3 | outdentPre }} +
+ - \ No newline at end of file + diff --git a/web/template/page_footer.tmpl b/web/template/page_footer.tmpl index c4ef8a99d..e7ce308bb 100644 --- a/web/template/page_footer.tmpl +++ b/web/template/page_footer.tmpl @@ -19,35 +19,35 @@ {{- with . }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/page_header.tmpl b/web/template/page_header.tmpl index 1cc036212..b46f30f4f 100644 --- a/web/template/page_header.tmpl +++ b/web/template/page_header.tmpl @@ -57,18 +57,18 @@ Instance Logo {{- with . }} - - {{- if .instance.ThumbnailStatic }} - - {{- end }} - {{- template - -

{{- .instance.Title -}}

+ + {{- if .instance.ThumbnailStatic }} + + {{- end }} + {{- template + +

{{- .instance.Title -}}

{{- if .showStrap }} + {{ template "strapInstances" . }} +{{- end }} {{- end }} -{{- end }} \ No newline at end of file diff --git a/web/template/page_ogmeta.tmpl b/web/template/page_ogmeta.tmpl index 82bb4bbfb..64bd6f979 100644 --- a/web/template/page_ogmeta.tmpl +++ b/web/template/page_ogmeta.tmpl @@ -54,4 +54,4 @@ {{- else }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/page_stylesheets.tmpl b/web/template/page_stylesheets.tmpl index 969462a20..910cbce81 100644 --- a/web/template/page_stylesheets.tmpl +++ b/web/template/page_stylesheets.tmpl @@ -36,4 +36,4 @@ {{- range .stylesheets }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index bf58d660b..70eee1228 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -20,17 +20,16 @@ {{- define "profileMovedTo" -}} {{- with .account.Moved }}
- - ℹ️ This account has permanently moved to - - @{{ .Username }} - - + + ℹ️ This account has permanently moved to + + @{{ .Username }} + +
{{- end }} {{- end -}} @@ -42,226 +41,216 @@ {{- define "avatarWidth" -}} {{- with .account }} - {{- if isNil .AvatarAttachment -}} - {{- template "defaultAvatarDimension" . -}} - {{- else -}} - {{- /* Use the avatar's proper dimensions. */ -}} - {{- .AvatarAttachment.Meta.Original.Width -}} - {{- end -}} +{{- if isNil .AvatarAttachment -}} +{{- template "defaultAvatarDimension" . -}} +{{- else -}} +{{- /* Use the avatar's proper dimensions. */ -}} +{{- .AvatarAttachment.Meta.Original.Width -}} +{{- end -}} {{- end }} {{- end -}} {{- define "avatarHeight" -}} {{- with .account }} - {{- if isNil .AvatarAttachment -}} - {{- template "defaultAvatarDimension" . -}} - {{- else -}} - {{- /* Use the avatar's proper dimensions. */ -}} - {{- .AvatarAttachment.Meta.Original.Height -}} - {{- end -}} +{{- if isNil .AvatarAttachment -}} +{{- template "defaultAvatarDimension" . -}} +{{- else -}} +{{- /* Use the avatar's proper dimensions. */ -}} +{{- .AvatarAttachment.Meta.Original.Height -}} +{{- end -}} {{- end }} {{- end -}} {{- define "avatarAlt" -}} - Avatar for {{ .account.Username -}} - {{- if .account.AvatarDescription }} - {{- /* Add the avatar's image description. */ -}} - : {{ .account.AvatarDescription -}} - {{- end -}} +Avatar for {{ .account.Username -}} +{{- if .account.AvatarDescription }} +{{- /* Add the avatar's image description. */ -}} +: {{ .account.AvatarDescription -}} +{{- end -}} {{- end -}} {{- define "headerAlt" -}} - Header for {{ .account.Username -}} - {{- if .account.HeaderDescription }} - {{- /* Add the header's image description. */ -}} - : {{ .account.HeaderDescription -}} - {{- end -}} +Header for {{ .account.Username -}} +{{- if .account.HeaderDescription }} +{{- /* Add the header's image description. */ -}} +: {{ .account.HeaderDescription -}} +{{- end -}} {{- end -}} {{- define "avatar" -}} {{- with . }} {{- end }} {{- end -}} {{- with . }}
-

Profile for {{ .account.Username -}}

-
- {{- if .account.Moved }} - {{- include "profileMovedTo" . | indent 2 }} - {{- end }} -
- - {{- if .account.HeaderAttachment }} - - {{- end }} - {{- template - -
-
- {{- with . }} - {{- include "avatar" . | indent 3 }} - {{- end }} -
-
Display name
-
- {{- if .account.DisplayName -}} - {{- emojify .account.Emojis (escape .account.DisplayName) -}} - {{- else -}} - {{- .account.Username -}} - {{- end -}} -
-
- {{- if .account.Bot }} -
Bot account
-
- true - -
- {{- end }} -
Username
-
@{{- .account.Username -}}@{{- .instance.AccountDomain -}}
-
- {{- if .account.Roles }} -
Role
- {{- range .account.Roles }} -
{{- .Name -}}
- {{- end }} - {{- end }} -
-
-
-
-
-
-

About {{- .account.Username -}}

-
- {{- if .account.Fields }} - {{- include "profile_fields.tmpl" . | indent 3 }} - {{- end }} -

Bio

-
- {{- if .account.Note }} - {{ emojify .account.Emojis (noescape .account.Note) }} - {{- else }} -

This GoToSocial user hasn't written a bio yet!

- {{- end }} -
-

Stats

-
-
Joined
-
-
Posts
-
{{- .account.StatusesCount -}}
-
Followed by
-
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowersCount -}}{{- end -}}
-
Following
-
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowingCount -}}{{- end -}}
-
-
-
- {{- if .pinned_statuses }} -
-
-

Pinned posts

- jump to recent -
-
- {{- range .pinned_statuses }} -
- {{- include "status.tmpl" . | indent 6 }} -
- {{- end }} -
-
- {{- end }} -
-
-

Recent posts

- {{- if .rssFeed }} - - - - {{- end }} -
-
- {{- if not .statuses }} -
Nothing here!
- {{- else }} - {{- range .statuses }} -
- {{- include "status.tmpl" . | indent 6 }} -
- {{- end }} - {{- end }} -
- -
-
-
+

Profile for {{ .account.Username -}}

+
+ {{- if .account.Moved }} + {{- include "profileMovedTo" . | indent 2 }} + {{- end }} +
+ + {{- if .account.HeaderAttachment }} + + {{- end }} + {{- template + +
+
+ {{- with . }} + {{- include "avatar" . | indent 3 }} + {{- end }} +
+
Display name
+
+ {{- if .account.DisplayName -}} + {{- emojify .account.Emojis (escape .account.DisplayName) -}} + {{- else -}} + {{- .account.Username -}} + {{- end -}} +
+
+ {{- if .account.Bot }} +
Bot account
+
+ true + +
+ {{- end }} +
Username
+
@{{- .account.Username -}}@{{- .instance.AccountDomain -}}
+
+ {{- if .account.Roles }} +
Role
+ {{- range .account.Roles }} +
{{- .Name -}}
+ {{- end }} + {{- end }} +
+
+
+
+
+
+

About {{- .account.Username -}}

+
+ {{- if .account.Fields }} + {{- include "profile_fields.tmpl" . | indent 3 }} + {{- end }} +

Bio

+
+ {{- if .account.Note }} + {{ emojify .account.Emojis (noescape .account.Note) }} + {{- else }} +

This GoToSocial user hasn't written a bio yet!

+ {{- end }} +
+

Stats

+
+
Joined
+
+
Posts
+
{{- .account.StatusesCount -}}
+
Followed by
+
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowersCount -}}{{- end -}}
+
Following
+
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowingCount -}}{{- end -}}
+
+
+
+ {{- if .pinned_statuses }} +
+
+

Pinned posts

+ jump to recent +
+
+ {{- range .pinned_statuses }} +
+ {{- include "status.tmpl" . | indent 6 }} +
+ {{- end }} +
+
+ {{- end }} +
+
+

Recent posts

+ {{- if .rssFeed }} + + + + {{- end }} +
+
+ {{- if not .statuses }} +
Nothing here!
+ {{- else }} + {{- range .statuses }} +
+ {{- include "status.tmpl" . | indent 6 }} +
+ {{- end }} + {{- end }} +
+ +
+
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/profile_fields.tmpl b/web/template/profile_fields.tmpl index e9005d4c9..1fca0efcd 100644 --- a/web/template/profile_fields.tmpl +++ b/web/template/profile_fields.tmpl @@ -19,14 +19,14 @@ {{- with . }}
-

Fields

-
- {{- range .account.Fields }} -
-
{{- emojify $.account.Emojis (noescape .Name) -}}
-
{{- emojify $.account.Emojis (noescape .Value) -}}
-
- {{- end }} -
+

Fields

+
+ {{- range .account.Fields }} +
+
{{- emojify $.account.Emojis (noescape .Name) -}}
+
{{- emojify $.account.Emojis (noescape .Value) -}}
+
+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/settings.tmpl b/web/template/settings.tmpl index 4d03ccc9d..d4131fcdc 100644 --- a/web/template/settings.tmpl +++ b/web/template/settings.tmpl @@ -19,6 +19,6 @@ {{- with . }}
-
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/sign-in.tmpl b/web/template/sign-in.tmpl index 6362359cb..2712f3c64 100644 --- a/web/template/sign-in.tmpl +++ b/web/template/sign-in.tmpl @@ -19,19 +19,19 @@ {{- with . }}
-
-

Sign in

-
-
- - -
-
- - -
- -
-
+
+

Sign in

+
+
+ + +
+
+ + +
+ +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/sign-up.tmpl b/web/template/sign-up.tmpl index d1158953b..aaf11dc05 100644 --- a/web/template/sign-up.tmpl +++ b/web/template/sign-up.tmpl @@ -19,53 +19,53 @@ {{- with . }}
-
-

Sign up for an account on {{ .instance.Title -}}

- {{- if not .registrationOpen }} -

This instance is not currently open to new sign-ups.

- {{- else }} -
-
- - -
-
- - -
-
- - -
- {{- if .reasonRequired }} -
- - -
- {{- end }} -
- - -
- - -
- {{- end }} -
+
+

Sign up for an account on {{ .instance.Title -}}

+ {{- if not .registrationOpen }} +

This instance is not currently open to new sign-ups.

+ {{- else }} +
+
+ + +
+
+ + +
+
+ + +
+ {{- if .reasonRequired }} +
+ + +
+ {{- end }} +
+ + +
+ + +
+ {{- end }} +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/signed-up.tmpl b/web/template/signed-up.tmpl index df82e0a77..d35707b8e 100644 --- a/web/template/signed-up.tmpl +++ b/web/template/signed-up.tmpl @@ -19,12 +19,12 @@ {{- with . }}
-
-

Thanks for signing up to {{ .instance.Title -}}!

-

Hi {{- .username -}}!

-

Your sign-up has been registered, and a confirmation email has been sent to {{- .email -}}.

-

Please check your email inbox and click the link to confirm your email.

-

Once an admin has approved your sign-up, you will be able to log in and use your account.

-
+
+

Thanks for signing up to {{ .instance.Title -}}!

+

Hi {{- .username -}}!

+

Your sign-up has been registered, and a confirmation email has been sent to {{- .email -}}.

+

Please check your email inbox and click the link to confirm your email.

+

Once an admin has approved your sign-up, you will be able to log in and use your account.

+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status.tmpl b/web/template/status.tmpl index deae730af..c82d9f8ed 100644 --- a/web/template/status.tmpl +++ b/web/template/status.tmpl @@ -20,7 +20,7 @@ {{- define "statusContent" -}} {{- with .Content }}
- {{ noescape . | emojify $.Emojis }} + {{ noescape . | emojify $.Emojis }}
{{- end }} {{- end -}} @@ -32,50 +32,50 @@ {{- with . }}
- {{- include "status_header.tmpl" . | indent 1 }} + {{- include "status_header.tmpl" . | indent 1 }}
- {{- if .SpoilerText }} -
- - {{- emojify .Emojis (escape .SpoilerText) -}} - Toggle visibility - -
- {{- with . }} - {{- include "statusContent" . | indent 3 }} - {{- end }} - {{- if .Poll }} - {{- include "status_poll.tmpl" . | indent 3 }} - {{- end }} -
-
- {{- else }} -
- {{- with . }} - {{- include "statusContent" . | indent 2 }} - {{- end }} - {{- if .Poll }} - {{- include "status_poll.tmpl" . | indent 2 }} - {{- end }} -
- {{- end }} - {{- if .MediaAttachments }} - {{- include "status_attachments.tmpl" . | indent 1 }} - {{- end }} + {{- if .SpoilerText }} +
+ + {{- emojify .Emojis (escape .SpoilerText) -}} + Toggle visibility + +
+ {{- with . }} + {{- include "statusContent" . | indent 3 }} + {{- end }} + {{- if .Poll }} + {{- include "status_poll.tmpl" . | indent 3 }} + {{- end }} +
+
+ {{- else }} +
+ {{- with . }} + {{- include "statusContent" . | indent 2 }} + {{- end }} + {{- if .Poll }} + {{- include "status_poll.tmpl" . | indent 2 }} + {{- end }} +
+ {{- end }} + {{- if .MediaAttachments }} + {{- include "status_attachments.tmpl" . | indent 1 }} + {{- end }}
{{- if .Local }} - Open thread at this post + Open thread at this post {{- else }} - Open remote post (opens in a new window) + title="Open remote post (opens in a new window)"> + Open remote post (opens in a new window) {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status_attachments.tmpl b/web/template/status_attachments.tmpl index 46c1d4350..a602e692e 100644 --- a/web/template/status_attachments.tmpl +++ b/web/template/status_attachments.tmpl @@ -24,22 +24,22 @@ {{- define "imagePreview" }} {{- .Description -}} + title="{{- .Description -}}" {{- end }} width="{{- .Meta.Original.Width -}}" + height="{{- .Meta.Original.Height -}}" /> {{- end }} {{- define "videoPreview" }} {{- .Description -}} + title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" /> {{- end }} {{- define "audioPreview" }} {{- if and .PreviewURL .Meta.Small.Width }} {{- .Description -}} + title="{{- .Description -}}" {{- end }} width="{{- .Meta.Small.Width -}}" height="{{- .Meta.Small.Height -}}" /> {{- else }} {{- .Description -}} + title="{{- .Description -}}" {{- end }} width="518" height="460" /> {{- end }} {{- end }} @@ -55,83 +55,82 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{ {{- with .MediaAttachments }}
- {{- range $index, $media := . }} -
-
- - - - - - - {{- if or (eq .Type "video") (eq .Type "gifv") }} - {{- include "videoPreview" $media | indent 4 }} - {{- else if eq .Type "image" }} - {{- include "imagePreview" $media | indent 4 }} - {{- else if eq .Type "audio" }} - {{- include "audioPreview" $media | indent 4 }} - {{- end }} - - {{- if or (eq .Type "video") (eq .Type "gifv") }} - - {{- else if eq .Type "audio" }} - - {{- else if eq .Type "image" }} - - {{- with $media }} - {{- include "imagePreview" . | indent 4 }} - {{- end }} - - {{- else }} - - - - {{- end }} -
-
- {{- end }} + {{- range $index, $media := . }} +
+
+ + + + + + + {{- if or (eq .Type "video") (eq .Type "gifv") }} + {{- include "videoPreview" $media | indent 4 }} + {{- else if eq .Type "image" }} + {{- include "imagePreview" $media | indent 4 }} + {{- else if eq .Type "audio" }} + {{- include "audioPreview" $media | indent 4 }} + {{- end }} + + {{- if or (eq .Type "video") (eq .Type "gifv") }} + + {{- else if eq .Type "audio" }} + + {{- else if eq .Type "image" }} + + {{- with $media }} + {{- include "imagePreview" . | indent 4 }} + {{- end }} + + {{- else }} + + + + {{- end }} +
+
+ {{- end }}
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status_attributes.tmpl b/web/template/status_attributes.tmpl index afa8ed740..703185119 100644 --- a/web/template/status_attributes.tmpl +++ b/web/template/status_attributes.tmpl @@ -52,4 +52,4 @@ id="{{- .ID -}}{{- if .Pinned -}}-pinned{{- end -}}" role="region" aria-label="{{- template "ariaLabel" . -}}" -{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status_header.tmpl b/web/template/status_header.tmpl index 5857f0281..fe99c7250 100644 --- a/web/template/status_header.tmpl +++ b/web/template/status_header.tmpl @@ -19,31 +19,31 @@ {{- with .Account }}
- {{- if $.Local }} - - {{- end }} - -
- - {{- if .DisplayName -}} - {{- emojify .Emojis (escape .DisplayName) -}} - {{- else -}} - {{- .Username -}} - {{- end -}} - - , - @{{- .Acct -}} -
- (open profile) -
+ {{- if $.Local }} + + {{- end }} + +
+ + {{- if .DisplayName -}} + {{- emojify .Emojis (escape .DisplayName) -}} + {{- else -}} + {{- .Username -}} + {{- end -}} + + , + @{{- .Acct -}} +
+ (open profile) +
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status_info.tmpl b/web/template/status_info.tmpl index c5ba3ef35..1073ec7cf 100644 --- a/web/template/status_info.tmpl +++ b/web/template/status_info.tmpl @@ -19,56 +19,56 @@ {{- with . }}
-
-
-
Published
-
- -
-
-
-
-
- Replies - -
-
{{- .RepliesCount -}}
-
-
-
- Favourites - -
-
{{- .FavouritesCount -}}
-
-
-
- Reblogs - -
-
{{- .ReblogsCount -}}
-
- {{- if .Pinned }} -
-
- Pinned - -
-
{{- .Pinned -}}
-
- {{- else }} - {{- end }} -
-
- {{- if .LanguageTag.DisplayStr }} -
-
Language
-
- {{ .LanguageTag.DisplayStr }} - -
-
- {{- else }} - {{- end }} +
+
+
Published
+
+ +
+
+
+
+
+ Replies + +
+
{{- .RepliesCount -}}
+
+
+
+ Favourites + +
+
{{- .FavouritesCount -}}
+
+
+
+ Reblogs + +
+
{{- .ReblogsCount -}}
+
+ {{- if .Pinned }} +
+
+ Pinned + +
+
{{- .Pinned -}}
+
+ {{- else }} + {{- end }} +
+
+ {{- if .LanguageTag.DisplayStr }} +
+
Language
+
+ {{ .LanguageTag.DisplayStr }} + +
+
+ {{- else }} + {{- end }}
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/status_poll.tmpl b/web/template/status_poll.tmpl index c3d6a8ea4..2a7296c5b 100644 --- a/web/template/status_poll.tmpl +++ b/web/template/status_poll.tmpl @@ -32,50 +32,50 @@ {{- with . }}
-
- - {{- if .Poll.Multiple -}} - Multiple-choice poll  - {{- else -}} - Poll  - {{- end -}} - {{- if .Poll.Expired -}} - closed - {{- else if .Poll.ExpiresAt -}} - open until - {{- else -}} - open forever - {{- end -}} - - , - - {{- template "votes" .Poll.VotesCount -}}  - {{- if .Poll.Expired -}} - total - {{- else -}} - so far - {{- end -}} - -
- +
+ + {{- if .Poll.Multiple -}} + Multiple-choice poll  + {{- else -}} + Poll  + {{- end -}} + {{- if .Poll.Expired -}} + closed + {{- else if .Poll.ExpiresAt -}} + open until + {{- else -}} + open forever + {{- end -}} + + , + + {{- template "votes" .Poll.VotesCount -}}  + {{- if .Poll.Expired -}} + total + {{- else -}} + so far + {{- end -}} + +
+
-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/tag.tmpl b/web/template/tag.tmpl index ec5285614..df0247169 100644 --- a/web/template/tag.tmpl +++ b/web/template/tag.tmpl @@ -19,11 +19,11 @@ {{- with . }}
-

#{{- .tagName -}}

-

There's nothing here!

-

- For privacy reasons, GoToSocial doesn't (yet) implement public web views of tag timelines. - To soften the blow, here's a tongue twister: "I squeeze the soft sloth often in the mothy loft" 🦥 -

+

#{{- .tagName -}}

+

There's nothing here!

+

+ For privacy reasons, GoToSocial doesn't (yet) implement public web views of tag timelines. + To soften the blow, here's a tongue twister: "I squeeze the soft sloth often in the mothy loft" 🦥 +

-{{- end }} \ No newline at end of file +{{- end }} diff --git a/web/template/thread.tmpl b/web/template/thread.tmpl index 361efe3cc..0e67d5726 100644 --- a/web/template/thread.tmpl +++ b/web/template/thread.tmpl @@ -64,36 +64,36 @@ Thread of {{ .context.ThreadLength }} posts {{- with . }}
-
-

{{- template "repliesSummary" . -}}

- back to top -
- {{- end }} - {{- end -}} +
+

{{- template "repliesSummary" . -}}

+ back to top +
+ {{- end }} + {{- end -}} - {{- with . }} -
-
-
-

{{- template "threadSummary" . -}}

- {{- if .context.ThreadRepliesShown }} - jump to replies - {{- end }} -
+ {{- with . }} +
+
+
+

{{- template "threadSummary" . -}}

+ {{- if .context.ThreadRepliesShown }} + jump to replies + {{- end }} +
- {{- range $status := .context.Statuses }} -
- {{- include "status.tmpl" $status | indent 3 }} -
- {{- if and $status.ThreadLastMain $.context.ThreadReplies }} - {{- include "repliesStart" $ | indent 1 }} - {{- end }} - {{- end }} + {{- range $status := .context.Statuses }} +
+ {{- include "status.tmpl" $status | indent 3 }} +
+ {{- if and $status.ThreadLastMain $.context.ThreadReplies }} + {{- include "repliesStart" $ | indent 1 }} + {{- end }} + {{- end }} - {{- if .context.ThreadReplies }} -
- {{- end }} -
- {{- end }} \ No newline at end of file + {{- if .context.ThreadReplies }} +
+ {{- end }} +
+ {{- end }}