From 37a39b98ce136c7ec53ce06e03b285f3fb33ccb5 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:08:32 +0100 Subject: [feature] Add "what is this" section to index template (#2680) --- web/template/about.tmpl | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'web/template/about.tmpl') diff --git a/web/template/about.tmpl b/web/template/about.tmpl index 46349a4c3..04b0b095f 100644 --- a/web/template/about.tmpl +++ b/web/template/about.tmpl @@ -33,6 +33,32 @@ {{- end }} {{- end -}} +{{- define "languages" -}} +{{- if .languages }} +

This instance prefers the following languages:

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

No preferred languages have yet been set for this instance.

+{{- end }} +{{- end -}} + +{{- define "rules" -}} +{{- if .instance.Rules }} +

This instance has the following rules:

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

No rules have yet been set for this instance.

+{{- end }} +{{- end -}} + {{- define "registrationLimits" -}} {{- if .instance.Registrations -}} Registration is enabled; new signups can be submitted to this instance.
@@ -129,30 +155,16 @@ Polls can have up to 

Languages

- {{- if .languages }} -

This instance prefers the following languages:

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

This instance does not have any preferred languages.

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

Instance Rules

-

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.

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