mirror of
https://gitlab.com/brutaldon/brutaldon.git
synced 2024-12-04 14:46:24 -05:00
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 = "*"
|
||||
"urllib3" = "*"
|
||||
webencodings = "*"
|
||||
Django = "~=3.2"
|
||||
Django = "~=4.2"
|
||||
django-html_sanitizer = "*"
|
||||
inscriptis = "*"
|
||||
lxml = "*"
|
||||
|
@ -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__)))
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -235,3 +235,7 @@ div.poll {
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
button > a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -30,7 +30,7 @@
|
||||
<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.">
|
||||
<!-- 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' %}">
|
||||
{% if not preferences %}
|
||||
<link rel="stylesheet"
|
||||
@ -55,13 +55,14 @@
|
||||
{% endif %}
|
||||
</head>
|
||||
<body ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
|
||||
<div id="page-load-indicator"></div>
|
||||
<div id="new-toot-modal" class="modal"></div>
|
||||
<div></div>
|
||||
<div>
|
||||
{% block navbar %}
|
||||
<nav role="navigation"
|
||||
aria-label="main navigation">
|
||||
<span>
|
||||
<a href="{% url "home" %}">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{% url "home" %}" class="nav-link">
|
||||
{% if own_acct %}
|
||||
<img class="avatar" src="{{ own_acct.avatar_static }}"
|
||||
alt="Brutaldon ('{{ own_acct.username }}')">
|
||||
@ -70,14 +71,16 @@
|
||||
alt="Brutaldon">
|
||||
{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
{% if request.session.active_instance and request.session.active_username %}
|
||||
<!-- navbar start, navbar end -->
|
||||
<span>
|
||||
<a href="{% url "home" %}">
|
||||
<li>
|
||||
<a href="{% url "home" %}" class="nav-link">
|
||||
<span>Home</span>
|
||||
</a>
|
||||
<a href="{% url "note" %}">
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "note" %}" class="nav-link">
|
||||
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
||||
<span ic-src="{% url 'notes_count' %}"
|
||||
ic-poll="{{ preferences.poll_frequency }}s"
|
||||
@ -98,28 +101,39 @@
|
||||
<span >Notifications</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
<a href="{% url "local" %}">
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "local" %}" class="nav-link">
|
||||
<span >Local</span>
|
||||
</a>
|
||||
<a href="{% url "fed" %}">
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "fed" %}" class="nav-link">
|
||||
<span >Federated</span>
|
||||
</a>
|
||||
<a href="{% url "toot" %}"
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "toot" %}" class="nav-link">
|
||||
<span >New Toot</span>
|
||||
</a>
|
||||
<a href="{% url "search" %}"
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "search" %}" class="nav-link">
|
||||
<span >Search</span>
|
||||
</a>
|
||||
</span>
|
||||
<a href="{% url "settings" %}">
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "settings" %}" class="nav-link">
|
||||
<span >Settings</span>
|
||||
</a>
|
||||
<a href="{% url "accounts" %}">
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "accounts" %}" class="nav-link">
|
||||
<span >Accounts</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
@ -127,10 +141,10 @@
|
||||
<div class="container">
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
Brutaldon
|
||||
Title
|
||||
</h1>
|
||||
<p class="subtitle">
|
||||
Brutaldon is totally a thing.
|
||||
Brutaldon is a brutalist minimal client for Mastodon.
|
||||
</p>
|
||||
{% endblock %}
|
||||
</div>
|
||||
@ -188,5 +202,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -15,17 +15,17 @@
|
||||
</div>
|
||||
|
||||
<form method="get" action="{% url "search_results" %}">
|
||||
<div >
|
||||
<div class="field">
|
||||
<label >{{ form.instance.label }}</label>
|
||||
<div >
|
||||
<input type="search" name="q" id="q" >
|
||||
<input class="input" type="search" name="q" id="q" >
|
||||
<span >
|
||||
<i ></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<div class="field">
|
||||
<input type="submit" value="Search" >
|
||||
</div>
|
||||
</form>
|
||||
|
@ -14,16 +14,15 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime</h1>
|
||||
{% if form %}
|
||||
<h2 >Post</h2>
|
||||
<div >
|
||||
<h1 class="title">Post</h1>
|
||||
<div class="box">
|
||||
{% include "main/post_minimal_partial.html" %}
|
||||
</div>
|
||||
<hr >
|
||||
<hr class="is-hidden">
|
||||
{% endif %}
|
||||
<h2 >Your {{ timeline_name }} timeline</h2>
|
||||
<div>
|
||||
<h1 class="title">Your {{ timeline_name }} timeline</h1>
|
||||
<div id="timeline">
|
||||
{% for toot in toots %}
|
||||
{% cache 600 toot_partial toot.id %}
|
||||
{% if toot.reblog %}
|
||||
|
@ -11,29 +11,38 @@
|
||||
<article>
|
||||
{% endif %}
|
||||
|
||||
<figure >
|
||||
<p >
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<figure class="">
|
||||
<p class="image is-64x64 account-avatar">
|
||||
<a href="{% url "user" toot.account.acct %}">
|
||||
<img class="avatar" loading="auto" src="{{ toot.account.avatar_static }}"
|
||||
alt="">
|
||||
</a>
|
||||
</p>
|
||||
</figure>
|
||||
<div >
|
||||
<div >
|
||||
<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 %}">
|
||||
@{{ toot.account.acct }}</a></small>
|
||||
<a href="{{ toot.url }}">
|
||||
<small>{{ toot.created_at |humane_time }}</small>
|
||||
</a>
|
||||
{% 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>
|
||||
Boosted by @{{ reblog_by }}
|
||||
<figure>
|
||||
<a href="{% url "user" reblog_by %}">
|
||||
<img class="avatar" loading="auto" src ="{{ reblog_icon }}" alt="">
|
||||
</a>
|
||||
</figure>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if toot.spoiler_text %}
|
||||
@ -192,7 +201,6 @@
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<i></i>
|
||||
</div>
|
||||
<div >
|
||||
{% if toot.account.acct == own_acct.acct %}
|
||||
@ -216,7 +224,6 @@
|
||||
|
||||
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
||||
<a href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
||||
<span ></span>
|
||||
<strong> thread</strong>
|
||||
</a>
|
||||
{% else %}
|
||||
@ -228,7 +235,5 @@
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div ></div>
|
||||
</article>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user