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

feat: add code explorer in the navbar #682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/_data/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"blog": "/blog",
"docs": "/docs/latest/",
"playground": "/play",
"codeExplorer": "https://explorer.eslint.org/",
"getStarted": "/docs/latest/use/getting-started",
"sponsors": "/sponsors",
"branding": "/branding",
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ navigation:
- text: Demo
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ navigation:
- text: Playground
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ navigation:
- text: Prueba ESLint
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ navigation:
- text: Démo
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/hi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ navigation:
- text: Playground
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ navigation:
- text: Playground
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/pt-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ navigation:
- text: Playground
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
3 changes: 3 additions & 0 deletions src/_data/sites/zh-hans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ navigation:
- text: 演练场
link: playground
target: _blank
- text: Code Explorer
link: codeExplorer
target: _blank

#------------------------------------------------------------------------------
# Footer
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
open = false;

if (matchMedia) {
const mq = window.matchMedia("(max-width: 680px)");
const mq = window.matchMedia("(max-width: 810px)");
mq.addEventListener("change", WidthChange);
WidthChange(mq);
}
Expand Down
11 changes: 1 addition & 10 deletions src/assets/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,8 @@
.no-js button {
display: none !important;
}
@media all and (min-width: 681px) {
@media all and (min-width: 811px) {
.enhanced #nav-toggle {
display: none;
}
}
@media all and (max-width: 679px) {
.no-js #nav-list {
display: block !important;
}

.enhanced #nav-list {
display: none;
}
}
8 changes: 4 additions & 4 deletions src/assets/scss/components/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
margin-top: 1rem;
margin-block-start: 1rem;

@media all and (min-width: 681px) {
@media all and (min-width: 811px) {
font-size: var(--step-0);
margin-top: 0;
margin-block-start: 0;
Expand All @@ -24,7 +24,7 @@
}

&[data-open="true"] {
@media all and (min-width: 681px) {
@media all and (min-width: 811px) {
display: flex;
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@
}
}

@media all and (min-width: 681px) {
@media all and (min-width: 811px) {
.site-nav {
flex-direction: row;
grid-column: auto;
Expand All @@ -126,7 +126,7 @@
}
}

@media (max-width: 680px) {
@media (max-width: 810px) {
#nav-list[data-open="true"] {
display: block !important;
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
padding-block-start: 0;
padding-block-end: 0;

@media all and (min-width: 681px) {
@media all and (min-width: 811px) {
justify-content: space-between;
}
}
Expand Down
Loading