Merge pull request #655 from mouse-reeve/privacy-policy
Adds separate privacy policy section
This commit is contained in:
commit
89b2a63ec0
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.0.7 on 2021-02-27 19:12
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('bookwyrm', '0045_auto_20210210_2114'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='sitesettings',
|
||||||
|
name='privacy_policy',
|
||||||
|
field=models.TextField(default='Add a privacy policy here.'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -20,6 +20,8 @@ class SiteSettings(models.Model):
|
||||||
default='Contact an administrator to get an invite')
|
default='Contact an administrator to get an invite')
|
||||||
code_of_conduct = models.TextField(
|
code_of_conduct = models.TextField(
|
||||||
default='Add a code of conduct here.')
|
default='Add a code of conduct here.')
|
||||||
|
privacy_policy = models.TextField(
|
||||||
|
default='Add a privacy policy here.')
|
||||||
allow_registration = models.BooleanField(default=True)
|
allow_registration = models.BooleanField(default=True)
|
||||||
logo = models.ImageField(
|
logo = models.ImageField(
|
||||||
upload_to='logos/', null=True, blank=True
|
upload_to='logos/', null=True, blank=True
|
||||||
|
|
|
@ -1,21 +1,35 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'discover/landing_layout.html' %}
|
||||||
{% block content %}
|
{% block panel %}
|
||||||
|
|
||||||
<header class="block has-text-centered">
|
<div class="block columns mt-4">
|
||||||
<h1 class="title">{{ site.name }}</h1>
|
<nav class="menu column is-one-quarter">
|
||||||
<h2 class="subtitle">{{ site.instance_tagline }}</h2>
|
<h2 class="menu-label">About {{ site.name }}</h2>
|
||||||
</header>
|
<ul class="menu-list">
|
||||||
|
<li>
|
||||||
|
<a href="#coc">Code of Conduct</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#privacy">Privacy Policy</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
{% include 'discover/icons.html' %}
|
<div class="column content">
|
||||||
|
<div class="block" id="coc">
|
||||||
|
<h2 class="title">Code of Conduct</h2>
|
||||||
|
<div class="content">
|
||||||
|
{{ site.code_of_conduct | safe }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section class="block">
|
<hr aria-hidden="true">
|
||||||
{% include 'snippets/about.html' %}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="block">
|
<div class="block" id="privacy">
|
||||||
<h2 class="title">Code of Conduct</h2>
|
<h2 class="title">Privacy Policy</h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ site.code_of_conduct | safe }}
|
{{ site.privacy_policy | safe }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,5 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'discover/landing_layout.html' %}
|
||||||
{% block content %}
|
{% block panel %}
|
||||||
|
|
||||||
<header class="block has-text-centered">
|
|
||||||
<h1 class="title">{{ site.name }}</h1>
|
|
||||||
<h2 class="subtitle">{{ site.instance_tagline }}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{% include 'discover/icons.html' %}
|
|
||||||
|
|
||||||
{% if not request.user.is_authenticated %}
|
|
||||||
<section class="tile is-ancestor">
|
|
||||||
<div class="tile is-7 is-parent">
|
|
||||||
<div class="tile is-child box">
|
|
||||||
{% include 'snippets/about.html' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tile is-5 is-parent">
|
|
||||||
<div class="tile is-child box has-background-primary-light content">
|
|
||||||
{% if site.allow_registration %}
|
|
||||||
<h2 class="title">Join {{ site.name }}</h2>
|
|
||||||
<form name="register" method="post" action="/register">
|
|
||||||
{% include 'snippets/register_form.html' %}
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<h2 class="title">This instance is closed</h2>
|
|
||||||
<p>{{ site.registration_closed_text | safe}}</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="block is-hidden-tablet">
|
<div class="block is-hidden-tablet">
|
||||||
<h2 class="title has-text-centered">Recent Books</h2>
|
<h2 class="title has-text-centered">Recent Books</h2>
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
{% extends 'layout.html' %}
|
||||||
|
{% load humanize %}
|
||||||
|
{% load bookwyrm_tags %}
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<header class="block has-text-centered">
|
||||||
|
<h1 class="title">{{ site.name }}</h1>
|
||||||
|
<h2 class="subtitle">{{ site.instance_tagline }}</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{% include 'discover/icons.html' %}
|
||||||
|
|
||||||
|
<section class="tile is-ancestor">
|
||||||
|
<div class="tile is-7 is-parent">
|
||||||
|
<div class="tile is-child box">
|
||||||
|
{% include 'snippets/about.html' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tile is-5 is-parent">
|
||||||
|
{% if not request.user.is_authenticated %}
|
||||||
|
<div class="tile is-child box has-background-primary-light content">
|
||||||
|
{% if site.allow_registration %}
|
||||||
|
<h2 class="title">Join {{ site.name }}</h2>
|
||||||
|
<form name="register" method="post" action="/register">
|
||||||
|
{% include 'snippets/register_form.html' %}
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<h2 class="title">This instance is closed</h2>
|
||||||
|
<p>{{ site.registration_closed_text | safe}}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="tile is-child box has-background-white-bis">
|
||||||
|
<h2 class="title is-4">Your Account</h2>
|
||||||
|
<div class="media block">
|
||||||
|
<div class="media-left">
|
||||||
|
<a href="{{ user.local_path }}">
|
||||||
|
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="media-content">
|
||||||
|
<p>{% if user.name %}{{ user.name }}{% else %}{{ user.localname }}{% endif %}</p>
|
||||||
|
<p><a href="{{ user.remote_id }}">{{ user.username }}</a></p>
|
||||||
|
<p>Joined {{ user.created_date | naturaltime }}</p>
|
||||||
|
<p>
|
||||||
|
<a href="{{ user.local_path }}/followers">{{ user.followers.count }} follower{{ user.followers.count | pluralize }}</a>,
|
||||||
|
<a href="{{ user.local_path }}/following">{{ user.following.count }} following</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box content">
|
||||||
|
{% if user.summary %}
|
||||||
|
{{ user.summary | to_markdown | safe }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% block panel %}{% endblock %}
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -23,6 +23,10 @@
|
||||||
<label class="label" for="id_code_of_conduct">Code of conduct:</label>
|
<label class="label" for="id_code_of_conduct">Code of conduct:</label>
|
||||||
{{ site_form.code_of_conduct }}
|
{{ site_form.code_of_conduct }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<label class="label" for="id_privacy_policy">Privacy Policy:</label>
|
||||||
|
{{ site_form.privacy_policy }}
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<hr aria-hidden="true">
|
<hr aria-hidden="true">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{# user bio #}
|
{# user bio #}
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-narrow">
|
<div class="column is-two-fifths">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="media-left">
|
<div class="media-left">
|
||||||
<a href="{{ user.local_path }}">
|
<a href="{{ user.local_path }}">
|
||||||
|
@ -29,16 +29,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column">
|
<div class="column box has-background-white-bis content">
|
||||||
{% if user.summary %}
|
{% if user.summary %}
|
||||||
<div class="columns">
|
{{ user.summary | to_markdown | safe }}
|
||||||
<div class="column is-narrow">
|
|
||||||
<span class="icon icon-quote-open"></span>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<blockquote>{{ user.summary | to_markdown | safe }}</blockquote>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue