From 8cbe7eecd3105bf0185971393ac6671d6bc6dd4d Mon Sep 17 00:00:00 2001 From: finn Date: Mon, 2 Sep 2024 07:22:23 +0000 Subject: [PATCH 1/2] remove tabs from html --- backend/app/templates/404.html | 4 +- backend/app/templates/500.html | 6 +- backend/app/templates/_post.html | 22 +++--- backend/app/templates/_postnav.html | 24 +++---- backend/app/templates/base.html | 68 +++++++++---------- backend/app/templates/edit_profile.html | 38 +++++------ .../app/templates/email/reset_password.html | 12 ++-- backend/app/templates/explore.html | 38 +++++------ backend/app/templates/index.html | 38 +++++------ backend/app/templates/login.html | 48 ++++++------- backend/app/templates/register.html | 66 +++++++++--------- backend/app/templates/reset_password.html | 38 +++++------ .../app/templates/reset_password_request.html | 24 +++---- backend/app/templates/user.html | 66 +++++++++--------- 14 files changed, 246 insertions(+), 246 deletions(-) diff --git a/backend/app/templates/404.html b/backend/app/templates/404.html index e5a1fd0..9546941 100644 --- a/backend/app/templates/404.html +++ b/backend/app/templates/404.html @@ -2,7 +2,7 @@ {% block content %} -

File Not Found

-

Back

+

File Not Found

+

Back

{% endblock %} diff --git a/backend/app/templates/500.html b/backend/app/templates/500.html index 8e3e544..00092d7 100644 --- a/backend/app/templates/500.html +++ b/backend/app/templates/500.html @@ -2,8 +2,8 @@ {% block content %} -

An unexpected error has occurred.

-

Administrator has been notified.

-

Back

+

An unexpected error has occurred.

+

Administrator has been notified.

+

Back

{% endblock %} diff --git a/backend/app/templates/_post.html b/backend/app/templates/_post.html index a75593a..b231341 100644 --- a/backend/app/templates/_post.html +++ b/backend/app/templates/_post.html @@ -1,11 +1,11 @@ - - - - - - - {{ post.author.username }} - says:
- {{ post.body }} - - + + + + + + + {{ post.author.username }} + says:
+ {{ post.body }} + + diff --git a/backend/app/templates/_postnav.html b/backend/app/templates/_postnav.html index 34f4cf4..ac419a7 100644 --- a/backend/app/templates/_postnav.html +++ b/backend/app/templates/_postnav.html @@ -1,14 +1,14 @@ -
- {% if prev_url %} - Newer - {% else %} - Newer - {% endif %} +
+ {% if prev_url %} + Newer + {% else %} + Newer + {% endif %} - {% if next_url %} - Older - {% else %} - Older - {% endif %} -
+ {% if next_url %} + Older + {% else %} + Older + {% endif %} +
diff --git a/backend/app/templates/base.html b/backend/app/templates/base.html index 5eb256c..d3d7ea9 100644 --- a/backend/app/templates/base.html +++ b/backend/app/templates/base.html @@ -1,46 +1,46 @@ - - - {% if title %} - {{ title }} - {% else %} - oily page - {% endif %} - - -
- +

oily.dad

+
+
+ {% with messages = get_flashed_messages() %} + {% if messages %} + + {% endif %} + {% endwith %} - {% block content %}{% endblock %} - + {% block content %}{% endblock %} + diff --git a/backend/app/templates/edit_profile.html b/backend/app/templates/edit_profile.html index 62c8488..df73fa4 100644 --- a/backend/app/templates/edit_profile.html +++ b/backend/app/templates/edit_profile.html @@ -1,24 +1,24 @@ {% extends "base.html" %} {% block content %} -

Edit Profile

-
- {{ form.hidden_tag() }} -

- {{ form.username.label }} - {{ form.username(size=32) }} - {% for error in form.username.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.about_me.label }} - {{ form.about_me(cols=50, rows=4) }} - {% for error in form.about_me.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit }}

-
+

Edit Profile

+
+ {{ form.hidden_tag() }} +

+ {{ form.username.label }} + {{ form.username(size=32) }} + {% for error in form.username.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.about_me.label }} + {{ form.about_me(cols=50, rows=4) }} + {% for error in form.about_me.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit }}

+
{% endblock %} diff --git a/backend/app/templates/email/reset_password.html b/backend/app/templates/email/reset_password.html index 3f14636..9267782 100644 --- a/backend/app/templates/email/reset_password.html +++ b/backend/app/templates/email/reset_password.html @@ -1,10 +1,10 @@ - -

User {{ user.username }} requested password reset.

-

Reset link:

-

click here -

If you did not request this, ignore this message.

- + +

User {{ user.username }} requested password reset.

+

Reset link:

+

click here +

If you did not request this, ignore this message.

+ diff --git a/backend/app/templates/explore.html b/backend/app/templates/explore.html index 8d47563..5149b40 100644 --- a/backend/app/templates/explore.html +++ b/backend/app/templates/explore.html @@ -3,26 +3,26 @@ {% block explorecurrent %}class="current"{% endblock %} {% block content %} - {% if form %} -
- {{ form.hidden_tag() }} -

- {{ form.post.label }} - {{ form.post(cols=32, rows=4) }} - {% for error in form.post.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
- {% endif %} - - {% for post in posts %} - {% include '_post.html' %} - {% endfor %} -
+ {% if form %} +
+ {{ form.hidden_tag() }} +

+ {{ form.post.label }} + {{ form.post(cols=32, rows=4) }} + {% for error in form.post.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit() }}

+
+ {% endif %} + + {% for post in posts %} + {% include '_post.html' %} + {% endfor %} +
- {% include '_postnav.html' %} + {% include '_postnav.html' %} {% endblock %} diff --git a/backend/app/templates/index.html b/backend/app/templates/index.html index 730de59..fe0e2b8 100644 --- a/backend/app/templates/index.html +++ b/backend/app/templates/index.html @@ -3,26 +3,26 @@ {% block indexcurrent %}class="current"{% endblock %} {% block content %} - {% if form %} -
- {{ form.hidden_tag() }} -

- {{ form.post.label }} - {{ form.post(cols=32, rows=4) }} - {% for error in form.post.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
- {% endif %} - - {% for post in posts %} - {% include '_post.html' %} - {% endfor %} -
+ {% if form %} +
+ {{ form.hidden_tag() }} +

+ {{ form.post.label }} + {{ form.post(cols=32, rows=4) }} + {% for error in form.post.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit() }}

+
+ {% endif %} + + {% for post in posts %} + {% include '_post.html' %} + {% endfor %} +
- {% include '_postnav.html' %} + {% include '_postnav.html' %} {% endblock %} diff --git a/backend/app/templates/login.html b/backend/app/templates/login.html index 7f98f86..3d17302 100644 --- a/backend/app/templates/login.html +++ b/backend/app/templates/login.html @@ -3,31 +3,31 @@ {% block logincurrent %}class="current"{% endblock %} {% block content %} -

Sign In

-
- {{ form.hidden_tag() }} -

- {{ form.username.label }}
- {{ form.username(size=32) }}
- {% for error in form.username.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password.label }}
- {{ form.password(size=32) }}
- {% for error in form.password.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.remember_me() }} {{ form.remember_me.label }}

-

- {{ form.submit }} - Register -

-
+

Sign In

+
+ {{ form.hidden_tag() }} +

+ {{ form.username.label }}
+ {{ form.username(size=32) }}
+ {% for error in form.username.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.password.label }}
+ {{ form.password(size=32) }}
+ {% for error in form.password.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.remember_me() }} {{ form.remember_me.label }}

+

+ {{ form.submit }} + Register +

+
-

Reset Password

+

Reset Password

{% endblock %} diff --git a/backend/app/templates/register.html b/backend/app/templates/register.html index 8d2f8f7..6ab7912 100644 --- a/backend/app/templates/register.html +++ b/backend/app/templates/register.html @@ -2,39 +2,39 @@ {% block content %} -

Register

-
- {{ form.hidden_tag() }} -

- {{ form.username.label }}
- {{ form.username(size=32) }}
- {% for error in form.username.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.email.label }}
- {{ form.email(size=64) }}
- {% for error in form.email.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password.label }}
- {{ form.password(size=64) }}
- {% for error in form.password.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password2.label }}
- {{ form.password2(size=64) }}
- {% for error in form.password2.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit }}

-
+

Register

+
+ {{ form.hidden_tag() }} +

+ {{ form.username.label }}
+ {{ form.username(size=32) }}
+ {% for error in form.username.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.email.label }}
+ {{ form.email(size=64) }}
+ {% for error in form.email.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.password.label }}
+ {{ form.password(size=64) }}
+ {% for error in form.password.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.password2.label }}
+ {{ form.password2(size=64) }}
+ {% for error in form.password2.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit }}

+
{% endblock %} diff --git a/backend/app/templates/reset_password.html b/backend/app/templates/reset_password.html index 2d030ef..360794f 100644 --- a/backend/app/templates/reset_password.html +++ b/backend/app/templates/reset_password.html @@ -2,25 +2,25 @@ {% block content %} -

Reset Your Password

-
- {{ form.hidden_tag() }} -

- {{ form.password.label }} - {{ form.password(size=32) }} - {% for error in form.password.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password2.label }} - {{ form.password2(size=32) }} - {% for error in form.password2.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
+

Reset Your Password

+
+ {{ form.hidden_tag() }} +

+ {{ form.password.label }} + {{ form.password(size=32) }} + {% for error in form.password.errors %} + [{{ error }}] + {% endfor %} +

+

+ {{ form.password2.label }} + {{ form.password2(size=32) }} + {% for error in form.password2.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit() }}

+
{% endblock %} diff --git a/backend/app/templates/reset_password_request.html b/backend/app/templates/reset_password_request.html index c71035a..948e809 100644 --- a/backend/app/templates/reset_password_request.html +++ b/backend/app/templates/reset_password_request.html @@ -1,17 +1,17 @@ {% extends "base.html" %} {% block content %} -

Reset Password

-
- {{ form.hidden_tag() }} -

- {{ form.email.label }}
- {{ form.email(size=64) }}
- {% for error in form.email.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
+

Reset Password

+
+ {{ form.hidden_tag() }} +

+ {{ form.email.label }}
+ {{ form.email(size=64) }}
+ {% for error in form.email.errors %} + [{{ error }}] + {% endfor %} +

+

{{ form.submit() }}

+
{% endblock %} diff --git a/backend/app/templates/user.html b/backend/app/templates/user.html index e2e4df1..471e916 100644 --- a/backend/app/templates/user.html +++ b/backend/app/templates/user.html @@ -3,40 +3,40 @@ {% block profilecurrent %}class="current"{% endblock %} {% block content %} -
-

- - User: {{ user.username }} -

- {% if user.about_me %}

{{ user.about_me }}

{% endif %} - {% if user.last_seen %}

Last activity: {{ user.last_seen }}

{% endif %} - {% if user == current_user %} -

Edit Profile

- {% elif not current_user.is_following(user) %} -

-

- {{ form.hidden_tag() }} - {{ form.submit(value='Follow') }} -
-

- {% else %} -

-

- {{ form.hidden_tag() }} - {{ form.submit(value='Unfollow') }} -
-

- {% endif %} -
-
+
+

+ + User: {{ user.username }} +

+ {% if user.about_me %}

{{ user.about_me }}

{% endif %} + {% if user.last_seen %}

Last activity: {{ user.last_seen }}

{% endif %} + {% if user == current_user %} +

Edit Profile

+ {% elif not current_user.is_following(user) %} +

+

+ {{ form.hidden_tag() }} + {{ form.submit(value='Follow') }} +
+

+ {% else %} +

+

+ {{ form.hidden_tag() }} + {{ form.submit(value='Unfollow') }} +
+

+ {% endif %} +
+
- - {% for post in posts %} - {% include '_post.html' %} - {% endfor %} -
- - {% include '_postnav.html' %} + + {% for post in posts %} + {% include '_post.html' %} + {% endfor %} +
+ + {% include '_postnav.html' %} {% endblock %} From 78c08954189f98fa4d428943e7a799ed6a0ff1b3 Mon Sep 17 00:00:00 2001 From: finn Date: Mon, 2 Sep 2024 07:47:47 +0000 Subject: [PATCH 2/2] disable gitea reg if link on tld --- compose.yaml | 2 +- compose.yaml.local | 2 +- compose.yaml.prod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compose.yaml b/compose.yaml index b9d26c0..3360c50 100644 --- a/compose.yaml +++ b/compose.yaml @@ -78,7 +78,7 @@ services: - GITEA__service__REGISTER_EMAIL_CONFIRM=true - GITEA__service__ENABLE_NOTIFY_MAIL=true # To disable new users after setup: - #- GITEA__service__DISABLE_REGISTRATION=false + - GITEA__service__DISABLE_REGISTRATION=true networks: - backnet - frontnet diff --git a/compose.yaml.local b/compose.yaml.local index 2a55941..b89bc07 100644 --- a/compose.yaml.local +++ b/compose.yaml.local @@ -78,7 +78,7 @@ services: - GITEA__service__REGISTER_EMAIL_CONFIRM=true - GITEA__service__ENABLE_NOTIFY_MAIL=true # To disable new users after setup: - #- GITEA__service__DISABLE_REGISTRATION=false + - GITEA__service__DISABLE_REGISTRATION=true networks: - backnet - frontnet diff --git a/compose.yaml.prod b/compose.yaml.prod index b9d26c0..3360c50 100644 --- a/compose.yaml.prod +++ b/compose.yaml.prod @@ -78,7 +78,7 @@ services: - GITEA__service__REGISTER_EMAIL_CONFIRM=true - GITEA__service__ENABLE_NOTIFY_MAIL=true # To disable new users after setup: - #- GITEA__service__DISABLE_REGISTRATION=false + - GITEA__service__DISABLE_REGISTRATION=true networks: - backnet - frontnet