summaryrefslogtreecommitdiff
path: root/web/template/about.tmpl
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-02-23 16:08:32 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-23 15:08:32 +0000
commit37a39b98ce136c7ec53ce06e03b285f3fb33ccb5 (patch)
tree92ca8e3db803bb0ad31cc01fcc241f68021418fd /web/template/about.tmpl
parent[chore] Rename frontend.tmpl to settings.tmpl, remove unused "lightgray" clas... (diff)
downloadgotosocial-37a39b98ce136c7ec53ce06e03b285f3fb33ccb5.tar.xz
[feature] Add "what is this" section to index template (#2680)
Diffstat (limited to 'web/template/about.tmpl')
-rw-r--r--web/template/about.tmpl48
1 files changed, 30 insertions, 18 deletions
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 }}
+<p>This instance prefers the following languages:</p>
+<ol>
+ {{- range .languages }}
+ <li>{{- . -}}</li>
+ {{- end }}
+</ol>
+{{- else }}
+<p>No preferred languages have yet been set for this instance.</p>
+{{- end }}
+{{- end -}}
+
+{{- define "rules" -}}
+{{- if .instance.Rules }}
+<p>This instance has the following rules:</p>
+<ol>
+ {{- range .instance.Rules }}
+ <li>{{- .Text -}}</li>
+ {{- end }}
+</ol>
+{{- else }}
+<p>No rules have yet been set for this instance.</p>
+{{- end }}
+{{- end -}}
+
{{- define "registrationLimits" -}}
{{- if .instance.Registrations -}}
Registration is enabled; new signups can be submitted to this instance.<br/>
@@ -129,30 +155,16 @@ Polls can have up to&nbsp;
<section class="about-section" role="region" aria-labelledby="languages">
<h3 id="languages">Languages</h3>
<div class="about-section-contents">
- {{- if .languages }}
- <p>This instance prefers the following languages:</p>
- <ol>
- {{- range .languages }}
- <li>{{- . -}}</li>
- {{- end }}
- </ol>
- {{- else }}
- <p>This instance does not have any preferred languages.</p>
+ {{- with . }}
+ {{- include "languages" . | indent 3 }}
{{- end }}
</div>
</section>
<section class="about-section" role="region" aria-labelledby="rules">
<h3 id="rules">Instance Rules</h3>
<div class="about-section-contents">
- <p>This instance has the following rules:</p>
- {{- if .instance.Rules }}
- <ol>
- {{- range .instance.Rules }}
- <li>{{- .Text -}}</li>
- {{- end }}
- </ol>
- {{- else }}
- <p>This instance has not yet set any rules.</p>
+ {{- with . }}
+ {{- include "rules" . | indent 3 }}
{{- end }}
</div>
</section>