mirror of https://gitlab.com/brutaldon/brutaldon
Merge branch 'main' into 'main'
Reverting changes made by dorian See merge request brutaldon/brutaldon!15
This commit is contained in:
commit
a2b9d194fe
2
Pipfile
2
Pipfile
|
@ -21,7 +21,7 @@ requests = "*"
|
||||||
six = "*"
|
six = "*"
|
||||||
"urllib3" = "*"
|
"urllib3" = "*"
|
||||||
webencodings = "*"
|
webencodings = "*"
|
||||||
Django = "~=3.2"
|
Django = "~=4.2"
|
||||||
django-html_sanitizer = "*"
|
django-html_sanitizer = "*"
|
||||||
inscriptis = "*"
|
inscriptis = "*"
|
||||||
lxml = "*"
|
lxml = "*"
|
||||||
|
|
|
@ -12,6 +12,14 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
|
||||||
|
|
||||||
import os
|
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, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
img.avatar {
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,3 +235,7 @@ div.poll {
|
||||||
{
|
{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
button > a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,12 +73,16 @@ body {
|
||||||
background-color: var(--bg);
|
background-color: var(--bg);
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
/* display: flex; */
|
||||||
|
/* flex-direction: column; */
|
||||||
|
/* max-width: 50rem; */
|
||||||
|
/* justify-content: center; */
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr min(45rem, 90%) 1fr;
|
grid-template-columns: 1fr min(45rem, 90%) 1fr;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
body > * {
|
body > * {
|
||||||
grid-column: 2;
|
/* grid-column: 2; */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the header bg full width, but the content inline with body */
|
/* Make the header bg full width, but the content inline with body */
|
||||||
|
@ -87,7 +91,7 @@ body > header {
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0 0.5rem 2rem 0.5rem;
|
padding: 0 0.5rem 2rem 0.5rem;
|
||||||
grid-column: 1 / -1;
|
/* grid-column: 1 / -1; */
|
||||||
}
|
}
|
||||||
|
|
||||||
body > header > *:only-child {
|
body > header > *:only-child {
|
||||||
|
@ -130,7 +134,6 @@ h2 {
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin-top: 3rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
|
@ -262,7 +265,7 @@ header > nav ol {
|
||||||
align-content: space-around;
|
align-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<meta name="twitter:description" property="og:description"
|
<meta name="twitter:description" property="og:description"
|
||||||
content="A brutalist, web-1.0 web client for Mastodon and Pleroma. Supports text-only browsers like Lynx, older browsers, as well as the latest mainstream browsers. All JavaScript is completely optional and progressively enhances the core application.">
|
content="A brutalist, web-1.0 web client for Mastodon and Pleroma. Supports text-only browsers like Lynx, older browsers, as well as the latest mainstream browsers. All JavaScript is completely optional and progressively enhances the core application.">
|
||||||
<!-- Minified version -->
|
<!-- Minified version -->
|
||||||
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
<link rel="stylesheet" href="{% static 'css/simple.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'css/brutal-css.css' %}">
|
<link rel="stylesheet" href="{% static 'css/brutal-css.css' %}">
|
||||||
{% if not preferences %}
|
{% if not preferences %}
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
|
@ -55,13 +55,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
<body ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
|
<body ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
|
||||||
<div id="page-load-indicator"></div>
|
<div></div>
|
||||||
<div id="new-toot-modal" class="modal"></div>
|
<div>
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<nav role="navigation"
|
<nav role="navigation"
|
||||||
aria-label="main navigation">
|
aria-label="main navigation">
|
||||||
<span>
|
<ul>
|
||||||
<a href="{% url "home" %}">
|
<li>
|
||||||
|
<a href="{% url "home" %}" class="nav-link">
|
||||||
{% if own_acct %}
|
{% if own_acct %}
|
||||||
<img class="avatar" src="{{ own_acct.avatar_static }}"
|
<img class="avatar" src="{{ own_acct.avatar_static }}"
|
||||||
alt="Brutaldon ('{{ own_acct.username }}')">
|
alt="Brutaldon ('{{ own_acct.username }}')">
|
||||||
|
@ -70,14 +71,16 @@
|
||||||
alt="Brutaldon">
|
alt="Brutaldon">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</li>
|
||||||
{% if request.session.active_instance and request.session.active_username %}
|
{% if request.session.active_instance and request.session.active_username %}
|
||||||
<!-- navbar start, navbar end -->
|
<!-- navbar start, navbar end -->
|
||||||
<span>
|
<li>
|
||||||
<a href="{% url "home" %}">
|
<a href="{% url "home" %}" class="nav-link">
|
||||||
<span>Home</span>
|
<span>Home</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "note" %}">
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "note" %}" class="nav-link">
|
||||||
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
||||||
<span ic-src="{% url 'notes_count' %}"
|
<span ic-src="{% url 'notes_count' %}"
|
||||||
ic-poll="{{ preferences.poll_frequency }}s"
|
ic-poll="{{ preferences.poll_frequency }}s"
|
||||||
|
@ -98,28 +101,39 @@
|
||||||
<span >Notifications</span>
|
<span >Notifications</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "local" %}">
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "local" %}" class="nav-link">
|
||||||
<span >Local</span>
|
<span >Local</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "fed" %}">
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "fed" %}" class="nav-link">
|
||||||
<span >Federated</span>
|
<span >Federated</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "toot" %}"
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "toot" %}" class="nav-link">
|
||||||
<span >New Toot</span>
|
<span >New Toot</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "search" %}"
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "search" %}" class="nav-link">
|
||||||
<span >Search</span>
|
<span >Search</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</li>
|
||||||
<a href="{% url "settings" %}">
|
<li>
|
||||||
|
<a href="{% url "settings" %}" class="nav-link">
|
||||||
<span >Settings</span>
|
<span >Settings</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "accounts" %}">
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url "accounts" %}" class="nav-link">
|
||||||
<span >Accounts</span>
|
<span >Accounts</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</li>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -127,10 +141,10 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
Brutaldon
|
Title
|
||||||
</h1>
|
</h1>
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
Brutaldon is totally a thing.
|
Brutaldon is a brutalist minimal client for Mastodon.
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,5 +202,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form method="get" action="{% url "search_results" %}">
|
<form method="get" action="{% url "search_results" %}">
|
||||||
<div >
|
<div class="field">
|
||||||
<label >{{ form.instance.label }}</label>
|
<label >{{ form.instance.label }}</label>
|
||||||
<div >
|
<div >
|
||||||
<input type="search" name="q" id="q" >
|
<input class="input" type="search" name="q" id="q" >
|
||||||
<span >
|
<span >
|
||||||
<i ></i>
|
<i ></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div >
|
<div class="field">
|
||||||
<input type="submit" value="Search" >
|
<input type="submit" value="Search" >
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -14,16 +14,15 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime</h1>
|
|
||||||
{% if form %}
|
{% if form %}
|
||||||
<h2 >Post</h2>
|
<h1 class="title">Post</h1>
|
||||||
<div >
|
<div class="box">
|
||||||
{% include "main/post_minimal_partial.html" %}
|
{% include "main/post_minimal_partial.html" %}
|
||||||
</div>
|
</div>
|
||||||
<hr >
|
<hr class="is-hidden">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2 >Your {{ timeline_name }} timeline</h2>
|
<h1 class="title">Your {{ timeline_name }} timeline</h1>
|
||||||
<div>
|
<div id="timeline">
|
||||||
{% for toot in toots %}
|
{% for toot in toots %}
|
||||||
{% cache 600 toot_partial toot.id %}
|
{% cache 600 toot_partial toot.id %}
|
||||||
{% if toot.reblog %}
|
{% if toot.reblog %}
|
||||||
|
|
|
@ -11,29 +11,38 @@
|
||||||
<article>
|
<article>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<figure >
|
<div class="media-content">
|
||||||
<p >
|
<div class="content">
|
||||||
|
<figure class="">
|
||||||
|
<p class="image is-64x64 account-avatar">
|
||||||
<a href="{% url "user" toot.account.acct %}">
|
<a href="{% url "user" toot.account.acct %}">
|
||||||
<img class="avatar" loading="auto" src="{{ toot.account.avatar_static }}"
|
<img class="avatar" loading="auto" src="{{ toot.account.avatar_static }}"
|
||||||
alt="">
|
alt="">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</figure>
|
</figure>
|
||||||
<div >
|
|
||||||
<div >
|
|
||||||
<p>
|
<p>
|
||||||
<h3><strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</strong></h3>
|
<strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</strong>
|
||||||
<small><a href="{% url "user" toot.account.acct %}">
|
<small><a href="{% url "user" toot.account.acct %}">
|
||||||
@{{ toot.account.acct }}</a></small>
|
@{{ toot.account.acct }}</a></small>
|
||||||
<a href="{{ toot.url }}">
|
<a href="{{ toot.url }}">
|
||||||
<small>{{ toot.created_at |humane_time }}</small>
|
<small>{{ toot.created_at |humane_time }}</small>
|
||||||
</a>
|
</a>
|
||||||
{% if reblog %}
|
{% if reblog %}
|
||||||
|
<figure>
|
||||||
|
<p class="image is-32x32" >
|
||||||
|
<a href="{% url "user" reblog_by %}">
|
||||||
|
<img loading="auto" src ="{{ reblog_icon }}" alt="">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</figure>
|
||||||
<br>
|
<br>
|
||||||
Boosted by @{{ reblog_by }}
|
Boosted by @{{ reblog_by }}
|
||||||
|
<figure>
|
||||||
<a href="{% url "user" reblog_by %}">
|
<a href="{% url "user" reblog_by %}">
|
||||||
<img class="avatar" loading="auto" src ="{{ reblog_icon }}" alt="">
|
<img class="avatar" loading="auto" src ="{{ reblog_icon }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
|
</figure>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% if toot.spoiler_text %}
|
{% if toot.spoiler_text %}
|
||||||
|
@ -192,7 +201,6 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<i></i>
|
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
{% if toot.account.acct == own_acct.acct %}
|
{% if toot.account.acct == own_acct.acct %}
|
||||||
|
@ -216,7 +224,6 @@
|
||||||
|
|
||||||
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
||||||
<a href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
<a href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
||||||
<span ></span>
|
|
||||||
<strong> thread</strong>
|
<strong> thread</strong>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -228,7 +235,5 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
|
||||||
<div ></div>
|
|
||||||
</article>
|
</article>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue