Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav sidebar enhancements #1374

Merged
merged 14 commits into from
Sep 17, 2024
13 changes: 4 additions & 9 deletions src/components/nav-sidebar/nav-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function NavSidebar({
</button>
<div className="navbar-collapsable" id={id} ref={navCollRef}>
<div className="overlay" />
<div className="menu-wrapper">
<div className="sidebar-wrapper">
<button
className="it-back-button btn w-100 text-start rounded-0"
type="button"
Expand All @@ -213,25 +213,20 @@ function NavSidebar({
<span>{backLabel}</span>
</button>

<div className="nav-sidebar-header mx-4 mb-4 mt-0 mt-lg-3">
<div className="nav-sidebar-header mx-4 mb-3 mt-0 mt-lg-2">
<img src={img} className="header-image" alt={alt} />
<h2 className="h3 px-0 my-1">{title}</h2>
<p className="fw-normal w-75">{subTitle}</p>
<p className="fw-normal w-75 mb-0">{subTitle}</p>
</div>

<div className="link-list-wrapper">
<ul className="link-list">{links}</ul>
</div>

{tag && (
<div className="nav-sidebar-tag mx-4 mt-5">
<Tag {...tag} />
</div>
)}

{secondaryLinks && (
<div className="sidebar-linklist-wrapper linklist-secondary">
<div className="link-list-wrapper">
<div className="pt-3">{tag && <Tag {...tag} />}</div>
<ul className="link-list">{secondaryLinks}</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/nav-sidebar/nav-sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

&.text-uppercase {
font-weight: 700;
padding-top: calc(var(--spacer) * 4);
padding-bottom: calc(var(--spacer) * 4);
padding-top: calc(var(--spacer) * 2);
padding-bottom: calc(var(--spacer) * 2);

&.active {
span {
Expand Down
4 changes: 2 additions & 2 deletions src/data/dsnav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ backLabel: Chiudi
buttonCloseAriaLabel: Chiudi Menu design system
tag:
screenReaderText: "Versione corrente: "
label: 1.0.0-beta.5
addonClasses: mb-4 bg-dark text-white
label: v1.0.0-beta.5
addonClasses: px-4 pb-2 text-secondary bg-transparent text-lowercase
list:
- label: Come iniziare
subList:
Expand Down
Loading