From a202a8351ec1a56ef07f6ba638b37e4d3319fc52 Mon Sep 17 00:00:00 2001 From: raydeveloppeur-admin Date: Sat, 25 Jul 2026 13:16:15 +0200 Subject: [PATCH 1/5] =?UTF-8?q?Button=20primary=20secondary=20fix=20:=20Bu?= =?UTF-8?q?tton=20hierarchy=20and=20responsive=20layout=20tightened,=20pri?= =?UTF-8?q?mary=20styling=20added=20to=20the=20Manage=20Users=20button,=20?= =?UTF-8?q?Sign=20In=20and=20Create=20Account=20now=20use=20the=20`.btn`?= =?UTF-8?q?=20class,=20padding=20unified=20in=20`.profile-actions`,=20avat?= =?UTF-8?q?ar=20buttons=20wrapped=20in=20`.avatar-actions`=20for=20consist?= =?UTF-8?q?ent=20width,=20mobile=20breakpoint=20raised=20to=2037em,=20and?= =?UTF-8?q?=20mobile=20stacking=20switched=20to=20a=20fit=E2=80=91content?= =?UTF-8?q?=20column=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/static/css/profile.css | 29 ++++++++++++++-------------- frontend/templates/login.html | 2 +- frontend/templates/profile.html | 20 ++++++++++--------- frontend/templates/registration.html | 2 +- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/frontend/static/css/profile.css b/frontend/static/css/profile.css index ed4f2f7..d97df0e 100644 --- a/frontend/static/css/profile.css +++ b/frontend/static/css/profile.css @@ -30,18 +30,15 @@ border-radius: var(--radius-full); } -#upload-avatar-btn { - margin-bottom: var(--spacing-sm); -} - -.remove-avatar-form { - display: inline-block; +.avatar-actions { + display: flex; + justify-content: center; + gap: var(--spacing-sm); margin-bottom: var(--spacing-sm); } - #upload-avatar-btn, .remove-avatar-form .btn-sm { - min-width: 8rem; + min-width: 12rem; } .role-badge { @@ -95,6 +92,7 @@ margin-top: var(--spacing-lg); } +.profile-actions .btn, .profile-actions .btn-secondary, .profile-actions .btn-danger { padding: var(--spacing-xs) var(--spacing-md); @@ -127,7 +125,7 @@ filter: brightness(1.1); } -@media (max-width: 22.5em) { +@media (max-width: 37em) { .profile-card { padding: var(--spacing-md); } @@ -153,15 +151,18 @@ flex-shrink: 0; } - .profile-actions { + .avatar-actions { flex-direction: column; align-items: stretch; width: fit-content; - margin-left: auto; - margin-right: auto; + margin: 0 auto var(--spacing-sm); } - .profile-actions .btn { - width: 100%; + + .profile-actions { + flex-direction: column; + align-items: stretch; + width: fit-content; + margin: 0 auto; } } diff --git a/frontend/templates/login.html b/frontend/templates/login.html index 7ba1145..0a4324e 100644 --- a/frontend/templates/login.html +++ b/frontend/templates/login.html @@ -27,7 +27,7 @@

{{ _('Welcome Back') }}

- +
diff --git a/frontend/templates/profile.html b/frontend/templates/profile.html index 7b5a304..951ed28 100644 --- a/frontend/templates/profile.html +++ b/frontend/templates/profile.html @@ -18,14 +18,16 @@ {% endif %} {% if is_own_profile %} - - - {% if user.avatar_file_id %} -
- - -
- {% endif %} +
+ + + {% if user.avatar_file_id %} +
+ + +
+ {% endif %} +
{% endif %}

{{ user.account_username }}

@@ -121,7 +123,7 @@ {% if is_own_profile %}
{% if current_user.account_role == 'admin' %} - {{ _('Manage Users') }} + {{ _('Manage Users') }} {% endif %}
diff --git a/frontend/templates/registration.html b/frontend/templates/registration.html index 104cfb1..b294a6c 100644 --- a/frontend/templates/registration.html +++ b/frontend/templates/registration.html @@ -38,7 +38,7 @@

{{ _('Join DevJournal') }}

- +
From ecfc11959bbe0b2ba81761f3f7a5fb79bd739c86 Mon Sep 17 00:00:00 2001 From: raydeveloppeur-admin Date: Sat, 25 Jul 2026 13:25:55 +0200 Subject: [PATCH 2/5] Button primary secondary fix : Primary button hover fixed and action hierarchy clarified: a `.btn:hover` rule now overrides the default `a:hover` color so primary buttons keep their proper styling, the Edit button on the article detail page is promoted to primary, and Delete drops its redundant `.btn-secondary` since `.btn-danger` already defines its role --- frontend/static/css/base.css | 4 ++++ frontend/templates/article_detail.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/static/css/base.css b/frontend/static/css/base.css index 342c381..5ded387 100644 --- a/frontend/static/css/base.css +++ b/frontend/static/css/base.css @@ -509,6 +509,10 @@ button:hover, z-index: var(--z-base); } +.btn:hover { + color: var(--on-primary); +} + .btn-secondary { background: transparent; border: 1px solid var(--outline); diff --git a/frontend/templates/article_detail.html b/frontend/templates/article_detail.html index ac0d0b6..4f0ef16 100644 --- a/frontend/templates/article_detail.html +++ b/frontend/templates/article_detail.html @@ -75,8 +75,8 @@

{{ article.article_title }}

{% if current_user and (current_user.account_id == article.article_author_id or current_user.account_role == 'admin') %} - {{ _('Edit') }} - {{ _('Delete') }} + {{ _('Edit') }} + {{ _('Delete') }}