From d5e3996a18ee37fc4bdf5718632d3d19ac7a8c1b Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:39:31 +0100 Subject: [feature] Parse instance descriptors as markdown, show T&C on /about (#2481) * [feature] Parse instance descriptors as markdown, show T&C on /about * lint * remove unnecessary nullzero tags --- web/template/about.tmpl | 178 ++++++++++++++++++++++++++---------------- web/template/index.tmpl | 8 +- web/template/index_apps.tmpl | 182 ++++++++++++++++++++++--------------------- 3 files changed, 207 insertions(+), 161 deletions(-) (limited to 'web/template') diff --git a/web/template/about.tmpl b/web/template/about.tmpl index a23dfa953..46349a4c3 100644 --- a/web/template/about.tmpl +++ b/web/template/about.tmpl @@ -21,7 +21,15 @@ {{- if .instance.Description }} {{ .instance.Description | noescape }} {{- else }} -

No description has yet been set for this instance.

+

No description has yet been set for this instance.

+{{- end }} +{{- end -}} + +{{- define "termsAndConditions" -}} +{{- if .instance.Terms }} +{{ .instance.Terms | noescape }} +{{- else }} +

No terms and conditions have yet been set for this instance.

{{- end }} {{- end -}} @@ -60,90 +68,124 @@ Polls can have up to  {{- with . }}
+

About {{ .instance.Title -}}

- {{- with . }} - {{- include "description" . | indent 2 }} - {{- end }} +
+ {{- 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 }} +
+ {{- 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 "registrationLimits" . -}}
  • +
  • {{- template "customCSSLimits" . -}}
  • +
  • {{- template "statusLimits" . -}}
  • +
  • {{- template "pollLimits" . -}}
  • +
+

Languages

- {{- if .languages }} -

This instance prefers the following languages:

-
    - {{- range .languages }} -
  1. {{- . -}}
  2. +
    + {{- if .languages }} +

    This instance prefers the following languages:

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

    This instance does not have any preferred languages.

    {{- end }} -
- {{- else }} -

This instance does not have any preferred languages.

- {{- end }} +

Instance Rules

-

This instance has the following rules:

- {{- if .instance.Rules }} -
    - {{- range .instance.Rules }} -
  1. {{- .Text -}}
  2. +
    +

    This instance has the following rules:

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

    This instance has not yet set any rules.

    {{- end }} -
- {{- else }} -

This instance has not yet set any rules.

- {{- end }} +
-
-

Instance Features

- +
+

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 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 }} -

+
+

+ 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 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 diff --git a/web/template/index.tmpl b/web/template/index.tmpl index f27cf8570..7e7b7118e 100644 --- a/web/template/index.tmpl +++ b/web/template/index.tmpl @@ -21,7 +21,7 @@ {{- if .instance.ShortDescription }} {{ .instance.ShortDescription | noescape }} {{- else }} -

No short description has yet been set for this instance.

+

No short description has yet been set for this instance.

{{- end }} {{- end -}} @@ -29,8 +29,10 @@

About this instance

- {{- include "shortDescription" . | indent 2 }} - See more details +
+ {{- include "shortDescription" . | indent 3 }} + See more details +
{{- include "index_apps.tmpl" . | indent 1 }}
diff --git a/web/template/index_apps.tmpl b/web/template/index_apps.tmpl index 05a4a9517..bb835c4da 100644 --- a/web/template/index_apps.tmpl +++ b/web/template/index_apps.tmpl @@ -20,96 +20,98 @@ {{- with . }}

Client applications

-

- GoToSocial does not provide its own webclient, but implements the Mastodon client API. - You can use this server through a variety of other clients: -

- + The Semaphore logo + A waving flag + + + +
  • +
    +

    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 -- cgit v1.3