diff --git a/lemarche/static/itou_marche/sections/_siae.scss b/lemarche/static/itou_marche/sections/_siae.scss index 9c17fbd10..9b1b52dca 100644 --- a/lemarche/static/itou_marche/sections/_siae.scss +++ b/lemarche/static/itou_marche/sections/_siae.scss @@ -294,6 +294,27 @@ } } + +$super-badge-color: #ffbe18; + +.super-badge-card { + border: 1px solid $super-badge-color; +} +.super-badge-badge { + padding: 2px 6px; + background: linear-gradient(0deg, #fff7e0, #fff7e0), linear-gradient(0deg, $super-badge-color, $super-badge-color); + border: 1px solid $super-badge-color; + font-size: 12px; + font-weight: 700; + line-height: 20px; + letter-spacing: 0px; + text-align: left; +} + +.super-badge-tab { + border-color: $super-badge-color !important; +} + // TODO: integrate to the theme $purple-marche: #6C38D9; diff --git a/lemarche/static/js/utils.js b/lemarche/static/js/utils.js index e88ed38cd..f8abfffb8 100644 --- a/lemarche/static/js/utils.js +++ b/lemarche/static/js/utils.js @@ -20,7 +20,20 @@ window.addEventListener('DOMContentLoaded', function () { location.href = "mailto:?" + rot13(this.dataset['nextUrl']); }); - initModalMessages() + initModalMessages(); + + $('.s-tabs-01__nav .nav-item').on('click', function (event) { + event.preventDefault() + let tabContent = this.parentElement.parentElement.querySelector(".tab-content"); + let hasSuperBadgeTab = this.children[0].classList.contains("super-badge-tab"); + + if (hasSuperBadgeTab) { + tabContent.classList.add("super-badge-tab"); + } else { + tabContent.classList.remove("super-badge-tab"); + } + $(this).tab('show') + }) }); let toggleRequiredClasses = (toggle, element) => { diff --git a/lemarche/templates/dashboard/_siae_tab_content.html b/lemarche/templates/dashboard/_siae_tab_content.html index ab00a9939..834999d4b 100644 --- a/lemarche/templates/dashboard/_siae_tab_content.html +++ b/lemarche/templates/dashboard/_siae_tab_content.html @@ -2,15 +2,23 @@
(Dernière activité il y a {{ siae.latest_activity_at|timesince }})
{% if user.is_authenticated %} {% if siae.in_user_favorite_list_count_annotated %} diff --git a/lemarche/templates/siaes/_card_search_result.html b/lemarche/templates/siaes/_card_search_result.html index 229c83f77..c6e14abc2 100644 --- a/lemarche/templates/siaes/_card_search_result.html +++ b/lemarche/templates/siaes/_card_search_result.html @@ -1,7 +1,7 @@ {% load static siae_sectors_display %} {% load theme_inclusion %} -