Add instance settings.
Addresses: #58 Currently implemented: * Instance name * Instance description * Code of conduct * Allow registration I decided to store this in the database so that settings can be easily changed at runtime through the web interface. (This web interface does not exist.)
This commit is contained in:
21
fedireads/templates/about.html
Normal file
21
fedireads/templates/about.html
Normal file
@ -0,0 +1,21 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div class="content-container">
|
||||
<h2>About {{ site_settings.name }}</h2>
|
||||
<p>
|
||||
{{ site_settings.instance_description }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<small>
|
||||
<a href="/login/">Login or Create an Account</a>
|
||||
</small>
|
||||
</p>
|
||||
|
||||
<h2>Code of Conduct</h2>
|
||||
<p>
|
||||
{{ site_settings.code_of_conduct }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,7 +1,20 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
|
||||
<div class="content-container">
|
||||
<h2>About {{ site_settings.name }}</h2>
|
||||
<p>
|
||||
{{ site_settings.instance_description }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<small>
|
||||
<a href="/about/">More about this site</a>
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="content-container login">
|
||||
<h2>Create an Account</h2>
|
||||
<p><small>
|
||||
@ -9,6 +22,7 @@
|
||||
friends here and on any other federated server, like Mastodon and PixelFed.
|
||||
</small></p>
|
||||
|
||||
{% if site_settings.allow_registration %}
|
||||
<div>
|
||||
<form name="register" method="post" action="/register">
|
||||
{% csrf_token %}
|
||||
@ -16,6 +30,12 @@
|
||||
<button type="submit">Create account</button>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
<small>
|
||||
This instance is not open for registration.
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="content-container login">
|
||||
|
Reference in New Issue
Block a user