Skip to content

Commit

Permalink
Getting the demo map on the home page working to show the effect of d…
Browse files Browse the repository at this point in the history
…ifferent Turf functions. Fixing some footer links.
  • Loading branch information
smallsaucepan committed May 3, 2024
1 parent 706ca58 commit fc3aa58
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
12 changes: 4 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const config = {
},
{
label: "API",
to: "/docs/api",
to: "/docs/api/along",
},
],
},
Expand All @@ -121,15 +121,11 @@ const config = {
items: [
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/docusaurus",
},
{
label: "Discord",
href: "https://discordapp.com/invite/docusaurus",
href: "https://stackoverflow.com/questions/tagged/turfjs",
},
{
label: "Twitter",
href: "https://twitter.com/docusaurus",
href: "https://twitter.com/turfjs",
},
],
},
Expand All @@ -147,7 +143,7 @@ const config = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
copyright: `Copyright © 2013 Turf org. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
Expand Down
20 changes: 19 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
[data-theme="dark"] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
Expand All @@ -28,3 +28,21 @@
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

/**
* Styles for turf function radio buttons on home page. Used
* for the demo map showing the effect of different turf functions.
*/
.turf-functions sl-radio-button::part(button) {
background-color: var(--ifm-color-secondary-light);
border-color: var(--ifm-color-secondary-dark);
}

.turf-functions sl-radio-button::part(button):hover,
.turf-functions sl-radio-button::part(button--checked) {
background-color: var(--ifm-color-primary-lighter);
}

.turf-functions sl-radio-button::part(label) {
color: var(--sl-input-label-color);
}
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function HomepageHeader() {

<div className="sl-theme-dark">
<SlRadioGroup
label="Turf function"
className="turf-functions"
value={turfFunction}
onSlChange={(event) => setTurfFunction(event.target.value)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

.homepageMap {
width: 100%;
margin-bottom: 1.4rem;
margin-bottom: 2rem;
}

.homepageTurfFunctions {
Expand Down

0 comments on commit fc3aa58

Please sign in to comment.