From 9cf1258f9870941fd7fcea2302fdf7cd0f072900 Mon Sep 17 00:00:00 2001 From: anishTP <119032387+anishTP@users.noreply.github.com> Date: Fri, 31 May 2024 14:07:08 +0530 Subject: [PATCH] Improve follow button's appearance (#2052) * Style fixes and fix for follow button on homepage * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Improved styling on the follow button in profile and on project cards and header * Fix styling on spotlight card follow button * Use macro for profile in header * Use title_inline for consistent appearance --------- Co-authored-by: Vidya Ramakrishnan Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kiran Jonnalagadda --- funnel/assets/sass/components/_button.scss | 7 +++++++ funnel/assets/sass/components/_card.scss | 2 ++ funnel/assets/sass/pages/index.scss | 5 +++++ funnel/assets/sass/pages/project.scss | 14 ++++++++++++++ funnel/templates/macros.html.jinja2 | 3 +-- funnel/templates/profile.html.jinja2 | 9 +-------- funnel/templates/profile_layout.html.jinja2 | 6 +++--- 7 files changed, 33 insertions(+), 13 deletions(-) diff --git a/funnel/assets/sass/components/_button.scss b/funnel/assets/sass/components/_button.scss index 6de076d7d..ed82afbf9 100644 --- a/funnel/assets/sass/components/_button.scss +++ b/funnel/assets/sass/components/_button.scss @@ -100,6 +100,13 @@ border: 1px solid $mui-text-danger; } +.mui-btn__icon { + display: flex; + flex-direction: row; + gap: $mui-grid-padding/2; + align-items: center; +} + .mui-btn--accent.mui--is-disabled, .mui-btn--accent.mui--is-disabled:hover, .mui-btn--accent.mui--is-disabled:active, diff --git a/funnel/assets/sass/components/_card.scss b/funnel/assets/sass/components/_card.scss index 879bf8f80..af13926af 100644 --- a/funnel/assets/sass/components/_card.scss +++ b/funnel/assets/sass/components/_card.scss @@ -43,6 +43,8 @@ .mui-btn + .mui-btn { margin-left: 0; + padding: 2px 10px; + border-radius: 4px; } } diff --git a/funnel/assets/sass/pages/index.scss b/funnel/assets/sass/pages/index.scss index 522672d30..f7cae2891 100644 --- a/funnel/assets/sass/pages/index.scss +++ b/funnel/assets/sass/pages/index.scss @@ -48,6 +48,11 @@ .spotlight-container__details { margin-top: 40px; } + .mui-btn + .mui-btn { + margin-left: 0; + padding: 2px 10px; + border-radius: 4px; + } } } diff --git a/funnel/assets/sass/pages/project.scss b/funnel/assets/sass/pages/project.scss index ed55ef20c..f563c189c 100644 --- a/funnel/assets/sass/pages/project.scss +++ b/funnel/assets/sass/pages/project.scss @@ -223,6 +223,14 @@ } } +.follow-form { + .mui-btn--accent { + margin-left: 0; + padding: 2px 10px; + border-radius: 4px; + } +} + @media (min-width: 768px) { .project-header { position: relative; @@ -283,6 +291,12 @@ .project-banner__profile-details__badge { margin-left: auto; } + .mui-btn + .mui-btn, + .mui-btn--accent { + margin-left: 0; + padding: 2px 10px; + border-radius: 4px; + } } .project-banner__profile-details--center { diff --git a/funnel/templates/macros.html.jinja2 b/funnel/templates/macros.html.jinja2 index db7b08f0d..f9b19abce 100644 --- a/funnel/templates/macros.html.jinja2 +++ b/funnel/templates/macros.html.jinja2 @@ -180,8 +180,7 @@

{{ project.title_inline }} {{ project.tagline }}

{% endif %} {% elif include_details %} -

{{ project.title }}

-

{{ project.tagline }}

+

{{ project.title_inline }} {{ project.tagline }}

{% if project.cfp_state.OPEN and project.cfp_end_at_localized %}

{% trans date=project.cfp_end_at_localized|datetime(format='dd MMM YYYY, hh:mm a') %}Accepting submissions till {{ date }}{% endtrans %}

diff --git a/funnel/templates/profile.html.jinja2 b/funnel/templates/profile.html.jinja2 index 203a916a8..3da95d924 100644 --- a/funnel/templates/profile.html.jinja2 +++ b/funnel/templates/profile.html.jinja2 @@ -101,14 +101,7 @@
- - {%- if profile.logo_url.url %} - {{ profile.title }} - {% else %} - {{ profile.title }} - {% endif %} - - {{ profile.title }} + {{ profileavatar(profile, add_profile_link=false, css_class='flex-item-align-end margin-right') }}
diff --git a/funnel/templates/profile_layout.html.jinja2 b/funnel/templates/profile_layout.html.jinja2 index a189068dd..db70b3ce1 100644 --- a/funnel/templates/profile_layout.html.jinja2 +++ b/funnel/templates/profile_layout.html.jinja2 @@ -373,13 +373,13 @@ {% endif %}