diff --git a/Pipfile b/Pipfile index 5f57881..aa8b926 100644 --- a/Pipfile +++ b/Pipfile @@ -21,7 +21,7 @@ requests = "*" six = "*" "urllib3" = "*" webencodings = "*" -Django = "~=3.2" +Django = "~=4.2" django-html_sanitizer = "*" inscriptis = "*" lxml = "*" diff --git a/brutaldon/settings.py b/brutaldon/settings.py index 93676a1..cdb4d28 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -12,6 +12,14 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ import os +# Work around issue in sanitizer +import django +try: + from django.utils.encoding import smart_text +except: + from django.utils.encoding import smart_str + django.utils.encoding.smart_text = smart_str + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/brutaldon/static/css/brutal-css.css b/brutaldon/static/css/brutal-css.css index e44a1ae..4bd64a6 100644 --- a/brutaldon/static/css/brutal-css.css +++ b/brutaldon/static/css/brutal-css.css @@ -1,3 +1,17 @@ img.avatar { - height: 90px; + height: 3rem; +} + +h3 { + margin-top: 1rem; + margin-bottom: 1rem; +} + +figure > p { + margin-top: 0rem; + margin-bottom: 0rem; +} + +nav > ul { + list-style-type: none; } diff --git a/brutaldon/static/css/brutaldon.css b/brutaldon/static/css/brutaldon.css index 75ccb35..98d4d27 100644 --- a/brutaldon/static/css/brutaldon.css +++ b/brutaldon/static/css/brutaldon.css @@ -235,3 +235,7 @@ div.poll { { margin-top: 0; } +button > a { + color: white; +} + diff --git a/brutaldon/static/css/simple.css b/brutaldon/static/css/simple.css index 984203c..23b85a7 100644 --- a/brutaldon/static/css/simple.css +++ b/brutaldon/static/css/simple.css @@ -73,12 +73,16 @@ body { background-color: var(--bg); font-size: 1.15rem; line-height: 1.5; + /* display: flex; */ + /* flex-direction: column; */ + /* max-width: 50rem; */ + /* justify-content: center; */ display: grid; grid-template-columns: 1fr min(45rem, 90%) 1fr; margin: 0; } body > * { - grid-column: 2; + /* grid-column: 2; */ } /* Make the header bg full width, but the content inline with body */ @@ -87,7 +91,7 @@ body > header { border-bottom: 1px solid var(--border); text-align: center; padding: 0 0.5rem 2rem 0.5rem; - grid-column: 1 / -1; + /* grid-column: 1 / -1; */ } body > header > *:only-child { @@ -130,7 +134,6 @@ h2 { h3 { font-size: 2rem; - margin-top: 3rem; } h4 { @@ -262,7 +265,7 @@ header > nav ol { align-content: space-around; align-items: center; display: flex; - flex-direction: row; + flex-direction: column; flex-wrap: wrap; justify-content: center; list-style-type: none; diff --git a/brutaldon/templates/base.html b/brutaldon/templates/base.html index 6b9f070..93b3953 100644 --- a/brutaldon/templates/base.html +++ b/brutaldon/templates/base.html @@ -30,7 +30,7 @@ - + {% if not preferences %} -
- +
+
{% block navbar %}
- + {% endif %} + {% endblock %} @@ -127,10 +141,10 @@
{% block content %}

- Brutaldon + Title

- Brutaldon is totally a thing. + Brutaldon is a brutalist minimal client for Mastodon.

{% endblock %}
@@ -188,5 +202,7 @@ {% endblock %} {% endif %} + +
diff --git a/brutaldon/templates/main/search.html b/brutaldon/templates/main/search.html index c83c0d8..11bb6e9 100644 --- a/brutaldon/templates/main/search.html +++ b/brutaldon/templates/main/search.html @@ -15,17 +15,17 @@
-
+
- +
-
+
diff --git a/brutaldon/templates/main/timeline.html b/brutaldon/templates/main/timeline.html index 2d97c96..535a313 100644 --- a/brutaldon/templates/main/timeline.html +++ b/brutaldon/templates/main/timeline.html @@ -14,16 +14,15 @@ {% endblock %} {% block content %} -

Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime

{% if form %} -

Post

-
+

Post

+
{% include "main/post_minimal_partial.html" %}
-
+ {% endif %} -

Your {{ timeline_name }} timeline

-
+

Your {{ timeline_name }} timeline

+
{% for toot in toots %} {% cache 600 toot_partial toot.id %} {% if toot.reblog %} diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index 38aaa77..8d01227 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -11,29 +11,38 @@
{% endif %} -
-

+

+
+
+
-
-

-

{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}

+ {{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}} @{{ toot.account.acct }} {{ toot.created_at |humane_time }} {% if reblog %} +
+

+ + + +

+

Boosted by @{{ reblog_by }} +
+
{% endif %}

{% if toot.spoiler_text %} @@ -192,7 +201,6 @@ -
{% if toot.account.acct == own_acct.acct %} @@ -216,7 +224,6 @@    {% if toot.in_reply_to_id or toot.replies_count > 0 %} - thread {% else %} @@ -228,7 +235,5 @@ {% endif %} -
-
{% endif %}