From 60ac69e548b549f1178bd56a0cf1bf23c0091e39 Mon Sep 17 00:00:00 2001 From: m5ka Date: Mon, 25 Mar 2024 18:48:00 +0000 Subject: [PATCH] =?UTF-8?q?feature:=20=F0=9F=93=9C=20add=20important=20ter?= =?UTF-8?q?ms=20and=20privacy=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- moku/config/urls.py | 4 ++ moku/forms/user.py | 8 +++- moku/static/css/moku.css | 59 +++++++++++++++++++++++++++++ moku/templates/moku/base.jinja | 10 +++++ moku/templates/moku/changelog.jinja | 11 ++++++ moku/templates/moku/privacy.jinja | 29 ++++++++++++++ moku/templates/moku/signup.jinja | 12 ++++++ moku/templates/moku/terms.jinja | 19 ++++++++++ moku/views/static.py | 13 +++++++ 9 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 moku/templates/moku/changelog.jinja create mode 100644 moku/templates/moku/privacy.jinja create mode 100644 moku/templates/moku/terms.jinja create mode 100644 moku/views/static.py 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

+
    +
  • moku.blog launched! 🎉
  • +
+
+{% 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:

+
    +
  • access - you have the right to request a copy of all your personal data.
  • +
  • rectification - you have the right to request that we correct any personal information you believe to be incorrect. you also have the right to request that we complete any personal information you believe to be incomplete.
  • +
  • erasure - you have the right to request that we erase your personal data completely, under certain conditions.
  • +
  • restrict processing - you have the right to request that we restrict the processing of your personal data, under certain conditions.
  • +
  • object processing - you have to right to object to our processing of your personal data, under certain conditions.
  • +
  • data portability - you have the right to request that we transfer the data we have collected to another organisation, or directly to you, under certain conditions.
  • +
+

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

+
    +
  • you must be at least 13 years old to use this website.
  • +
  • racism, homophobia, biphobia, transphobia, ableism, misogyny and other oppressive attitudes are explicitly forbidden in this community. moku.blog is queer-led and we will always foster an inclusive community as our number one priority, no exceptions.
  • +
  • using moku.blog in a way that is against the law, such as promoting malware, phishing or infringing copyright, is not allowed.
  • +
  • content posted to moku.blog must be suitable for all ages. pornographic content, blood and gore are strictly forbidden and will result in immediate action taken against you.
  • +
  • spamming and advertising is not allowed. it's also very annoying.
  • +
  • harassing and bullying other uses will not be tolerated in this community.
  • +
  • revealing personal information about yourself or others (known as "doxxing") is strictly forbidden and will result in immediate consequences.
  • +
+

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"