From 5ba9f1d7d5c382c06ddf9e0f88e7edb2df0c5204 Mon Sep 17 00:00:00 2001 From: Mattia Succurro Date: Sun, 16 Jun 2024 11:22:54 +0200 Subject: [PATCH] CSS changes --- app/models.py | 2 +- app/static/style.css | 1 + app/templates/base.html | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/models.py b/app/models.py index 865513b..4cdb2b5 100644 --- a/app/models.py +++ b/app/models.py @@ -156,7 +156,7 @@ class Message(BaseModel): # even if unlisted return not is_public_timeline elif privacy == MSGPRV_FRIENDS: - if cur_user.is_anonymous: + if not cur_user or cur_user.is_anonymous: return False return user.is_following(cur_user) and cur_user.is_following(user) else: diff --git a/app/static/style.css b/app/static/style.css index aaef997..87152a8 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -13,6 +13,7 @@ a:hover{text-decoration:underline} .content a svg{fill:#3399ff} .content a.plus{color:#ff3018} .metanav{float:right} +.metanav-divider{width:1px;background:white;display:inline-block} .header h1{margin:0;display:inline-block} .flash{background-color:#ff9;border:yellow 1px solid} .infobox{padding:12px;border:#ccc 1px solid} diff --git a/app/templates/base.html b/app/templates/base.html index dae5889..b2f79bc 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -12,18 +12,18 @@

{{ site_name }}

{% if current_user.is_anonymous %} - {{ inline_svg('exit_to_app') }} log in - {{ inline_svg('person_add') }} register + {{ inline_svg('exit_to_app') }} log in + {{ inline_svg('person_add') }} register {% else %} {{ inline_svg('person') }} {{ current_user.username }} {% set notification_count = current_user.unseen_notification_count() %} {% if notification_count > 0 %} ({{ notification_count }}) {% endif %} - - - {{ inline_svg('explore') }} explore - {{ inline_svg('edit') }} create - {{ inline_svg('exit_to_app') }} log out + + {{ inline_svg('explore') }} explore + {{ inline_svg('edit') }} create + {{ inline_svg('exit_to_app') }} log out {% endif %}