diff --git a/moku/config/urls.py b/moku/config/urls.py index fbdbcd6..eff90d4 100644 --- a/moku/config/urls.py +++ b/moku/config/urls.py @@ -21,6 +21,7 @@ from django.urls import include, path from moku.views.auth import LoginView, LogoutView from moku.views.post import FeedView +from moku.views.static import ChangelogView, PrivacyView, TermsView from moku.views.user import EditProfileView, EditSettingsView, ProfileView, SignupView urlpatterns = [ @@ -31,6 +32,9 @@ urlpatterns = [ path("signup", SignupView.as_view(), name="signup"), path("profile", EditProfileView.as_view(), name="profile.edit"), path("settings", EditSettingsView.as_view(), name="settings"), + path("changelog", ChangelogView.as_view(), name="changelog"), + path("privacy", PrivacyView.as_view(), name="privacy"), + path("terms", TermsView.as_view(), name="terms"), path("user/", ProfileView.as_view(), name="profile"), ] diff --git a/moku/forms/user.py b/moku/forms/user.py index 508b580..4a3f0f8 100644 --- a/moku/forms/user.py +++ b/moku/forms/user.py @@ -9,6 +9,7 @@ from moku.models.user import User, UserSettings class UserForm(UserCreationForm): captcha = ReCaptchaField(required=True) + check = forms.BooleanField(required=True) class Meta(UserCreationForm.Meta): model = User @@ -24,7 +25,12 @@ class UserForm(UserCreationForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.fields["captcha"].error_messages = {"required": _("make sure you've ticked the captcha.")} + self.fields["captcha"].error_messages = { + "required": _("make sure you've ticked the captcha."), + } + self.fields["check"].error_messages = { + "required": _("you must agree to the terms of use and privacy policy."), + } class UserSettingsForm(forms.ModelForm): diff --git a/moku/static/css/moku.css b/moku/static/css/moku.css index 7b2d817..0379cee 100644 --- a/moku/static/css/moku.css +++ b/moku/static/css/moku.css @@ -150,6 +150,13 @@ form .field { row-gap: .4rem; } +form .checkbox { + display: grid; + grid-template-columns: auto 1fr; + align-items: flex-start; + column-gap: .8rem; +} + form .field .help { color: var(--charcoal); font-size: 1.4rem; @@ -317,6 +324,58 @@ header nav ul { border-left: 2px solid var(--tangerine); } +.block { + max-width: 528px; + display: grid; + row-gap: .8rem; +} + +.block h2 { + font-size: 2rem; + font-weight: bold; +} + +.block h3 { + font-size: 1.8rem; + font-weight: bold; + margin-block-start: 1.2rem; +} + +.block ul { + padding-inline-start: 3.2rem; + list-style: disc; + display: grid; + row-gap: .4rem; +} + +.block strong { + font-weight: bold; +} + +.block em { + font-style: italic; +} + +footer { + margin-block-start: 1.8rem; +} + +footer nav ul { + display: flex; + align-items: center; + justify-content: center; + column-gap: 1.2rem; +} + +footer nav ul li a { + font-size: 1.4rem; + color: var(--charcoal); +} + +footer nav ul li a:hover { + color: var(--orange); +} + @media(min-width: 768px) { body { padding: 4rem 1.2rem 2.4rem 1.2rem; diff --git a/moku/templates/moku/base.jinja b/moku/templates/moku/base.jinja index 9762015..4549a8f 100644 --- a/moku/templates/moku/base.jinja +++ b/moku/templates/moku/base.jinja @@ -40,5 +40,15 @@ {% endif %} {% block content %}{% endblock content %} + \ No newline at end of file diff --git a/moku/templates/moku/changelog.jinja b/moku/templates/moku/changelog.jinja new file mode 100644 index 0000000..8141d90 --- /dev/null +++ b/moku/templates/moku/changelog.jinja @@ -0,0 +1,11 @@ +{% extends "moku/base.jinja" %} + +{% block content %} +
+

changelog 📜

+

2024-03-25

+ +
+{% endblock content %} \ No newline at end of file diff --git a/moku/templates/moku/privacy.jinja b/moku/templates/moku/privacy.jinja new file mode 100644 index 0000000..99f865f --- /dev/null +++ b/moku/templates/moku/privacy.jinja @@ -0,0 +1,29 @@ +{% extends "moku/base.jinja" %} + +{% block content %} +
+

privacy 🕵️

+

privacy is a big concern to us, so we wanted to keep this page as simple as possible.

+

by using moku.blog in any form, you hereby consent to this policy.

+

what data do we hold?

+

when you sign up, you provide a username, email address and password. this is the only required data. further optional data can be voluntarily given, such as an 'about me', location and pronouns. additionally, you can provide settings such as your preferred language.

+

we also store the data given when you decide to make a post, including emoji, food, verb and image. these are stored in our database, linked to your user profile.

+

data privacy

+

the data you share with us is stored only for the purpose of using the website. we do not ask for anything that does not provide value in the website itself, and we do not pass any user data to any third parties.

+

the only exception is that we may generate anonymized usage statistics. this means, we might count how many users are visiting our pages without recording which user visited where. this data is completely anonymous and, once again, is not shared to third parties.

+

your rights

+

you should feel in control of your data. everyone who uses the site is entitled to the following:

+ +

to exercise any of these rights, please get in touch by email at m5ka@posteo.de

+

children's information

+

protection of children online is a massive priority for us and we encourage parents to be aware of and guide their children's online activity.

+

moku.blog does not knowingly collect any personal identifiable information from children under the age of 13. if you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best to prompty remove such information from our records.

+
+{% endblock content %} \ No newline at end of file diff --git a/moku/templates/moku/signup.jinja b/moku/templates/moku/signup.jinja index 1b132cd..308f3dd 100644 --- a/moku/templates/moku/signup.jinja +++ b/moku/templates/moku/signup.jinja @@ -30,6 +30,18 @@ {{ form.captcha }} {% trans %}please let us know you're not a robot. i'm scared of robots!{% endtrans %} +
+
+ {{ form.check }} + +
+
diff --git a/moku/templates/moku/terms.jinja b/moku/templates/moku/terms.jinja new file mode 100644 index 0000000..bd87f7c --- /dev/null +++ b/moku/templates/moku/terms.jinja @@ -0,0 +1,19 @@ +{% extends "moku/base.jinja" %} + +{% block content %} +
+

terms of use ✅

+

in order to use moku.blog, you need to agree to the following rules. if you don't follow these, your account may be removed.

+

the rules

+ +

thanks for reading to the bottom of these! they help us to keep our community feeling safe. 🥰

+
+{% endblock content %} \ No newline at end of file diff --git a/moku/views/static.py b/moku/views/static.py new file mode 100644 index 0000000..cd3c430 --- /dev/null +++ b/moku/views/static.py @@ -0,0 +1,13 @@ +from django.views.generic import TemplateView + + +class ChangelogView(TemplateView): + template_name = "moku/changelog.jinja" + + +class PrivacyView(TemplateView): + template_name = "moku/privacy.jinja" + + +class TermsView(TemplateView): + template_name = "moku/terms.jinja"