Skip to content

Commit

Permalink
Display tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dcwatson committed May 4, 2024
1 parent 8dea5d9 commit d2d20fc
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 57 deletions.
54 changes: 20 additions & 34 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,9 @@ section.shell {
padding: 0;
}

#main-content>h1 {
max-width: 700px;
margin: 25px auto 5px auto;
font-weight: bold;
font-size: 120%;
main>h1 {
margin: 25px 0;
font-size: 150%;
text-transform: uppercase;
color: var(--color-text-main);
}
Expand Down Expand Up @@ -1204,27 +1202,32 @@ section.identity .bio {
.identity-metadata {
margin-bottom: 10px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
justify-content: space-between;
gap: 4px;
}

.identity-metadata .metadata-pair {
display: inline-block;
width: 300px;
margin: 0px 0 5px 0;
display: flex;
color: inherit;
text-decoration: none;
border: 2px solid rgba(255, 255, 255, 0);
border-radius: 10px;
overflow: hidden;
}

.identity-metadata .metadata-pair .metadata-name {
display: inline-block;
min-width: 90px;
width: 100px;
margin-right: 15px;
text-align: right;
color: var(--color-text-dull);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-shrink: 0;
}

.identity-metadata .metadata-pair .metadata-value a {
color: var(--color-text-link);
}

.system-note {
Expand Down Expand Up @@ -1285,21 +1288,6 @@ table.metadata td .emoji {

/* Timelines */

.left-column .timeline-name {
margin: 0 0 10px 0;
color: var(--color-text-main);
font-size: 130%;
display: flow-root;
}

.left-column .timeline-name .hashtag {
margin-top: 5px;
}

.left-column .timeline-name i {
margin-right: 10px
}

.view-options {
margin-bottom: 10px;
padding: 0;
Expand Down Expand Up @@ -1341,11 +1329,12 @@ table.metadata td .emoji {

.announcement,
.message {
display: flex;
justify-content: space-between;
background-color: var(--color-highlight);
border-radius: 5px;
margin: 10px 0 0 0;
padding: 5px 30px 5px 8px;
position: relative;
margin: 10px 15px 0 0;
padding: 10px 20px;
}

.message {
Expand All @@ -1354,9 +1343,6 @@ table.metadata td .emoji {

.announcement .dismiss,
.message .dismiss {
position: absolute;
top: 5px;
right: 10px;
cursor: pointer;
}

Expand Down
8 changes: 4 additions & 4 deletions templates/_announcements.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% for announcement in announcements %}
<div class="announcement">
<div>{{ announcement.html }}</div>
<a hx-post="{{ announcement.urls.dismiss }}" hx-target="closest .announcement" hx-swap="delete" class="dismiss" title="Dismiss announcement"><i class="fa-solid fa-xmark"></i></a>
{{ announcement.html }}
</div>
{% endfor %}
{% if messages %}
<ul class="messages">
<div class="messages">
{% for message in messages %}
<div class="message {{ message.tags }}">
<div>{{ message }}</div>
<a class="dismiss" title="Dismiss" _="on click remove closest <div/>"><i class="fa-solid fa-xmark"></i></a>
{{ message }}
</div>
{% endfor %}
</ul>
</div>
{% endif %}
6 changes: 1 addition & 5 deletions templates/activities/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
{% block title %}#{{ hashtag.display_name }} Timeline{% endblock %}

{% block content %}
<h1><i class="fa-solid fa-hashtag"></i>{{ hashtag.display_name }}</h1>
<section class="invisible">
<div class="timeline-name">
<div class="hashtag">
<i class="fa-solid fa-hashtag"></i>{{ hashtag.display_name }}
</div>
</div>
{% for post in page_obj %}
{% include "activities/_post.html" %}
{% empty %}
Expand Down
6 changes: 2 additions & 4 deletions templates/admin/announcement_delete.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{% extends "base_plain.html" %}
{% extends "admin/base_main.html" %}

{% block title %}Delete Announcement - Admin{% endblock %}
{% block subtitle %}Delete Announcement - Admin{% endblock %}

{% block settings_content %}
<h1>Confirm Delete</h1>
<section>
<form action="." method="POST">
{% csrf_token %}

Expand All @@ -17,6 +16,5 @@ <h1>Confirm Delete</h1>
<button class="delete">Delete</button>
</div>
</form>
</section>

{% endblock %}
20 changes: 10 additions & 10 deletions templates/identity/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ <h1>{{ identity.html_name_or_handle }}</h1>
{% endif %}
</section>

<section class="invisible identity-metadata">
{% if identity.metadata %}
{% for entry in identity.safe_metadata %}
<div class="metadata-pair">
<span class="metadata-name">{{ entry.name }}</span>
<span class="metadata-value">{{ entry.value }}</span>
</div>
{% endfor %}
{% endif %}
</section>
{% if identity.metadata %}
<section class="identity-metadata">
{% for entry in identity.safe_metadata %}
<div class="metadata-pair">
<span class="metadata-name">{{ entry.name }}</span>
<span class="metadata-value">{{ entry.value }}</span>
</div>
{% endfor %}
</section>
{% endif %}

{% if not identity.local %}
<section class="system-note">
Expand Down
1 change: 1 addition & 0 deletions users/views/admin/announcements.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class AnnouncementDelete(DeleteView):
model = Announcement
template_name = "admin/announcement_delete.html"
success_url = Announcement.urls.admin_root
extra_context = {"section": "announcements"}


class AnnouncementPublish(HTMXActionView):
Expand Down

0 comments on commit d2d20fc

Please sign in to comment.