-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge branch 'topical-main-menu' into next"
- Loading branch information
Showing
13 changed files
with
465 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@use "sass:color"; | ||
@use "../../vars" as *; | ||
|
||
.guides { | ||
.submenu .submenu-item-heading { | ||
font-size: var(--type-smaller-font-size); | ||
font-weight: initial; | ||
} | ||
|
||
.desktop-only { | ||
display: none; | ||
} | ||
|
||
@media (min-width: $screen-lg) { | ||
.desktop-only { | ||
display: inherit; | ||
} | ||
|
||
.mobile-only { | ||
display: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { useLocale } from "../../../hooks"; | ||
import { Menu } from "../menu"; | ||
|
||
import "./index.scss"; | ||
|
||
export const GuidesMenu = ({ visibleSubMenuId, toggleMenu }) => { | ||
const locale = useLocale(); | ||
|
||
const menu = { | ||
id: "guides", | ||
label: "Guides", | ||
to: `/${locale}/docs/Learn`, | ||
items: [ | ||
{ | ||
description: "Learn web development", | ||
hasIcon: true, | ||
extraClasses: "apis-link-container mobile-only", | ||
iconClasses: "submenu-icon learn", | ||
label: "Overview / MDN Learning Area", | ||
url: `/${locale}/docs/Learn`, | ||
}, | ||
{ | ||
description: "Learn web development", | ||
extraClasses: "apis-link-container desktop-only", | ||
hasIcon: true, | ||
iconClasses: "submenu-icon learn", | ||
label: "MDN Learning Area", | ||
url: `/${locale}/docs/Learn`, | ||
}, | ||
{ | ||
description: "Learn to structure web content with HTML", | ||
extraClasses: "html-link-container", | ||
hasIcon: true, | ||
iconClasses: "submenu-icon html", | ||
label: "HTML", | ||
url: `/${locale}/docs/Learn/HTML`, | ||
}, | ||
{ | ||
description: "Learn to style content using CSS", | ||
extraClasses: "css-link-container", | ||
hasIcon: true, | ||
iconClasses: "submenu-icon css", | ||
label: "CSS", | ||
url: `/${locale}/docs/Learn/CSS`, | ||
}, | ||
{ | ||
description: "Learn to run scripts in the browser", | ||
extraClasses: "javascript-link-container", | ||
hasIcon: true, | ||
iconClasses: "submenu-icon javascript", | ||
label: "JavaScript", | ||
url: `/${locale}/docs/Learn/JavaScript`, | ||
}, | ||
{ | ||
description: "Learn to make the web accessible to all", | ||
hasIcon: true, | ||
iconClasses: "submenu-icon", | ||
label: "Accessibility", | ||
url: `/${locale}/docs/Web/Accessibility`, | ||
}, | ||
], | ||
}; | ||
const isOpen = visibleSubMenuId === menu.id; | ||
|
||
return <Menu menu={menu} isOpen={isOpen} toggle={toggleMenu} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.