add new field to template, only show info if we supply it

This commit is contained in:
rra 2024-04-22 19:53:35 +02:00
parent ed449a8925
commit 616425d95f

View file

@ -11,12 +11,18 @@
<p> {{g.site.name}} is a <a href="https://join.piefed.social/">pyfedi</a> instance created on {{instance.created_at.strftime('%d-%m-%Y')}}. It is home to <a href="/people">{{user_amount}} users</a> (of which {{mau}} active in the last month). In the <a href="/communities/local"> {{community_amount}} communities</a> we discussed <a href="/domains">{{domains_amount}} domains</a> and made {{posts_amount}} posts.</p> <p> {{g.site.name}} is a <a href="https://join.piefed.social/">pyfedi</a> instance created on {{instance.created_at.strftime('%d-%m-%Y')}}. It is home to <a href="/people">{{user_amount}} users</a> (of which {{mau}} active in the last month). In the <a href="/communities/local"> {{community_amount}} communities</a> we discussed <a href="/domains">{{domains_amount}} domains</a> and made {{posts_amount}} posts.</p>
<h2> Team </h2> <h2> Team </h2>
<p>This instance is administerred by {% for admin in admins %}<a href="/u/{{ admin.user_name }}">{{ admin.user_name }}</a>{{ ", " if not loop.last }}{% endfor %}.</p> <p>This instance is administerred by {% for admin in admins %}<a href="/u/{{ admin.user_name }}">{{ admin.user_name }}</a>{{ ", " if not loop.last }}{% endfor %}.</p>
{% if staff %}
<p>It is moderated by {% for s in staff %}<a href="/u/{{ s.user_name }}">{{ s.user_name }}</a>{{ ", " if not loop.last }}{% endfor %}.</p> <p>It is moderated by {% for s in staff %}<a href="/u/{{ s.user_name }}">{{ s.user_name }}</a>{{ ", " if not loop.last }}{% endfor %}.</p>
{% endif %}
<h2>Contact</h2> <h2>Contact</h2>
<p>{{g.site.contact_email | safe }}</p> <p>{{g.site.contact_email | safe }}</p>
<h2> About Us </h2> <h2> About Us </h2>
<p> {{g.site.description | safe }} </p> <p> {{g.site.description | safe }} </p>
{% if g.site.about %}
<p> {{g.site.about | safe }} </p>
{% elif g.site.sidebar %}
<p> {{g.site.sidebar | safe }} </p> <p> {{g.site.sidebar | safe }} </p>
{% endif %}
{% if g.site.legal_information %} {% if g.site.legal_information %}
<h2> Legal Information </h2> <h2> Legal Information </h2>
<p> {{g.site.legal_information | safe }} </p> <p> {{g.site.legal_information | safe }} </p>