Skip to content

Commit

Permalink
fix(header): Correct ribbon in default mode
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Nov 14, 2024
1 parent 2e8345c commit d2b508e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions client/src/components/ribbon/index.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
.ribbon {
left: -60px;
left: -85px;
position: absolute;
top: 10px;
top: 2px;
z-index: calc(var(--ground) + 600);

.badge {
background: #e1000f;
box-shadow: inset 0px 0px 0px 4px rgba(255, 255, 255, 0.34);
color: #FFF;
font-family: sans-serif;
font-size: 20px;
height: 50px;
line-height: 50px;
font-size: 10px;
height: 25px;
line-height: 25px;
text-align: center;
transform: rotate(-45deg);
width: 200px;
}
}

.sticky {
.expanded {
.ribbon {
left: -80px;
top: 3px;
left: -60px;
top: 10px;

.badge {
font-size: 14px;
height: 30px;
line-height: 30px;
font-size: 20px;
height: 50px;
line-height: 50px;
}
}
}
}
4 changes: 2 additions & 2 deletions client/src/layout/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {
// TODO : all, Link from dsfr-plus
export default function Header({ isExpanded }) {
return isExpanded ? (
<header role="banner" className="fr-header">
<header role="banner" className="fr-header expanded">
<Ribbon />
<div className="fr-header__body">
<div className="fr-container">
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function Header({ isExpanded }) {
</div>
</header>
) : (
<Container as="section" className="filters sticky" fluid>
<Container as="section" className="filters" fluid>
<Row className="fr-p-1w" verticalAlign="top">
<Ribbon />
<Col offsetXs="1" xs="2">
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/openalex-ror/results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ export default function Affiliations() {
<Row>
<Col md={2}>
<TagGroup className="cursor-pointer" onClick={() => navigate(`/${pathname.split('/')[1]}/search${search}`)}>
<Tag color="blue-ecume" key="tag-sticky-years" size="sm">
<Tag color="blue-ecume" key="tag-years" size="sm">
{`${body.startYear} - ${body.endYear}`}
</Tag>
<br />
{body?.affiliationStrings?.map((tag) => (
<Tag
className={tag.length < VITE_APP_TAG_LIMIT ? 'scratched' : ''}
color="blue-ecume"
key={`tag-sticky-${tag}`}
key={`tag-${tag}`}
size="sm"
>
{tag}
Expand All @@ -208,7 +208,7 @@ export default function Affiliations() {
{body?.rors?.map((tag) => (
<Tag
color="blue-ecume"
key={`tag-sticky-${tag}`}
key={`tag-${tag}`}
size="sm"
>
{tag}
Expand Down

0 comments on commit d2b508e

Please sign in to comment.