Skip to content

Commit

Permalink
🎨 feat(orga): Improve navigation tabs in mission page
Browse files Browse the repository at this point in the history
  • Loading branch information
mcampourcy committed Dec 13, 2024
1 parent f2deda5 commit d18ab3c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 34 deletions.
21 changes: 7 additions & 14 deletions orga/app/components/mission/navigation.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@ import { LinkTo } from '@ember/routing';
import { t } from 'ember-intl';

<template>
<nav class="panel navbar campaign-list-header__tabs" aria-label={{t "pages.missions.mission.tabs.aria-label"}}>
<ul>
<li>
<LinkTo @route="authenticated.missions.mission.activities" class="navbar-item">
{{t "pages.missions.mission.tabs.activities"}}
</LinkTo>
</li>

<li>
<LinkTo @route="authenticated.missions.mission.results" class="navbar-item">
{{t "pages.missions.mission.tabs.results"}}
</LinkTo>
</li>
</ul>
<nav class="campaign-list-header__tabs" aria-label={{t "pages.missions.mission.tabs.aria-label"}}>
<LinkTo @route="authenticated.missions.mission.activities" class="navbar-item">
{{t "pages.missions.mission.tabs.activities"}}
</LinkTo>
<LinkTo @route="authenticated.missions.mission.results" class="navbar-item">
{{t "pages.missions.mission.tabs.results"}}
</LinkTo>
</nav>
</template>
35 changes: 16 additions & 19 deletions orga/app/styles/components/campaign/list-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display: flex;
flex-direction: column;
align-items: center;

@include device-is('tablet') {
flex-direction: row;
margin: 1em 0 2.4em;
Expand All @@ -18,29 +18,26 @@
}

&__tabs {
display: flex;
gap: 8px;
width: fit-content;
margin-bottom: 20px;

ul {
display: flex;
width: 100%;
margin: 0;
padding: 0;
list-style: none;
}

ul li {
flex-grow: 1;
}
padding: var(--pix-spacing-2x);
background-color: var(--pix-neutral-0);
border-radius: 8px;

.navbar-item {
height: 100%;
}
padding: var(--pix-spacing-2x) var(--pix-spacing-4x);
font-weight: var(--pix-font-normal);
border-bottom: none;
border-radius: 8px;

@include device-is('tablet') {
ul li {
flex-grow: inherit;
&.active {
color: inherit;
font-weight: var(--pix-font-medium);
background: var(--pix-orga-50);
border-bottom: none;
}
}

}
}
2 changes: 1 addition & 1 deletion orga/app/styles/pages/authenticated/mission.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
@extend %pix-body-l;

display: grid;
gap: var(--pix-spacing-8x);
grid-template-columns: 2fr 1fr;
gap: var(--pix-spacing-8x);
margin-top: var(--pix-spacing-8x);

h2 {
Expand Down

0 comments on commit d18ab3c

Please sign in to comment.