minor style changes

This commit is contained in:
Yusur 2025-06-14 12:09:47 +02:00
parent 1ad2aad08d
commit 382d06961b
6 changed files with 30 additions and 21 deletions

View file

@ -5,10 +5,11 @@
box-sizing: border-box
\:root
--accent: #ff7300
--light-text-primary: #181818
--light-text-alt: #444
--light-border: #999
--light-accent: #ff7300
--light-success: #73af00
--light-error: #e04433
--light-canvas: #eaecee
@ -18,17 +19,19 @@
--dark-text-primary: #e8e8e8
--dark-text-alt: #c0cad3
--dark-border: #777
--dark-accent: #ff7300
--dark-success: #93cf00
--dark-error: #e04433
--dark-canvas: #0a0a0e
--dark-background: #181a21
--dark-bg-sharp: #080808
// the following are DEPRECATED //
--light-accent: var(--accent)
--dark-accent: var(--accent)
--text-primary: var(--light-text-primary)
--text-alt: var(--light-text-alt)
--border: var(--light-border)
--accent: var(--light-accent)
--success: var(--light-success)
--error: var(--light-error)
--canvas: var(--light-canvas)
@ -40,7 +43,6 @@
--text-primary: var(--dark-text-primary)
--text-alt: var(--dark-text-alt)
--border: var(--dark-border)
--accent: var(--dark-accent)
--success: var(--dark-success)
--error: var(--dark-error)
--canvas: var(--dark-canvas)
@ -51,7 +53,6 @@ body.color-scheme-light
--text-primary: var(--light-text-primary)
--text-alt: var(--light-text-alt)
--border: var(--light-border)
--accent: var(--light-accent)
--success: var(--light-success)
--error: var(--light-error)
--canvas: var(--light-canvas)
@ -62,7 +63,6 @@ body.color-scheme-dark
--text-primary: var(--dark-text-primary)
--text-alt: var(--dark-text-alt)
--border: var(--dark-border)
--accent: var(--dark-accent)
--success: var(--dark-success)
--error: var(--dark-error)
--canvas: var(--dark-canvas)

View file

@ -103,6 +103,9 @@ aside.card
padding: 12px
margin: -12px -12px 0 -12px
position: relative
a
color: inherit
text-decoration: underline
> ul
list-style: none
margin: 0
@ -157,6 +160,9 @@ ul.message-options
margin-left: 0
margin-right: 3em
.message-options
margin-bottom: 1em
.message-stats
position: absolute
left: -3em

View file

@ -20,8 +20,8 @@
{{ nav_top_communities(top_communities) }}
{% endif %}
{% if feed_type == 'topic' %}
{% from "macros/nav.html" import nav_topic with context %}
{% if feed_type == 'guild' %}
{% from "macros/nav.html" import nav_guild with context %}
{{ nav_topic(topic) }}
{% endif %}

View file

@ -1,9 +1,9 @@
{% macro nav_topic(topic) %}
{% macro nav_guild(gu) %}
<aside class="card">
<h3>About {{ topic.handle() }}</h3>
<h3>About <a href="{{ gu.url() }}">{{ gu.handle() }}</a></h3>
<ul>
<li><i class="icon icon-info" style="font-size:inherit"></i> {{ topic.description }}</li>
<li><i class="icon icon-info" style="font-size:inherit"></i> {{ gu.description }}</li>
<li>
<strong>{{ topic.posts | count }}</strong> posts -
<strong>-</strong> subscribers
@ -14,7 +14,7 @@
{% macro nav_user(user) %}
<aside class="card">
<h3>About {{ user.handle() }}</h3>
<h3>About <a href="{{ user.url() }}">{{ user.handle() }}</a></h3>
<ul>
<li>{# user.biography #}</li>
</ul>

View file

@ -45,7 +45,6 @@
{{ feed_upvote(p.id, p.upvotes(), p.upvoted_by(current_user)) }}
{{ comment_count(p.comments | count) }}
</div>
</div>
<ul class="message-options inline">
{% if p.author == current_user %}
<li><a href="/edit/post/{{ p.id|to_b32l }}"><i class="icon icon-edit"></i> Edit</a></li>
@ -53,6 +52,8 @@
<li><a href="{{ p.report_url() }}"><i class="icon icon-report"></i> Report</a></li>
{% endif %}
</ul>
</div>
{{ comment_area(p.url()) }}
<div class="comment-section">
<ul>

View file

@ -1,5 +1,7 @@
from flask import Blueprint, render_template, redirect, abort, request
from flask_login import current_user
from sqlalchemy import select
from ..search import SearchQuery
from ..models import Post, db, Topic
@ -31,7 +33,7 @@ def explore():
@bp.route('/+<name>/')
def topic_feed(name):
topic: Topic = db.session.execute(db.select(Topic).where(Topic.name == name)).scalar()
topic: Topic | None = db.session.execute(select(Topic).where(Topic.name == name)).scalar()
if topic is None:
abort(404)
@ -39,7 +41,7 @@ def topic_feed(name):
posts = db.paginate(topic_timeline(name))
return render_template(
'feed.html', feed_type='topic', feed_title=f'{topic.display_name} (+{topic.name})', l=posts, topic=topic)
'feed.html', feed_type='guild', feed_title=f'{topic.display_name} (+{topic.name})', l=posts, topic=topic)
@bp.route('/r/<name>/')
def topic_feed_r(name):