From 563617155a50cf526d4901e0f0b3869403a9dbd9 Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Tue, 20 Aug 2024 08:34:53 +0300 Subject: [PATCH] docs(website): add slider demo --- demo/slider.html | 9 ++- website/docs/documentation/api.md | 2 +- website/docs/documentation/events.md | 2 +- website/docs/{guides => gallery}/scroller.md | 1 + website/docs/gallery/slider.md | 75 ++++++++++++++++++++ website/docs/gallery/slider.module.css | 28 ++++++++ website/docs/guides/slider.md | 5 -- website/docs/index.md | 4 +- website/sidebars.ts | 2 - website/src/css/custom.css | 2 +- 10 files changed, 113 insertions(+), 17 deletions(-) rename website/docs/{guides => gallery}/scroller.md (53%) create mode 100644 website/docs/gallery/slider.md create mode 100644 website/docs/gallery/slider.module.css delete mode 100644 website/docs/guides/slider.md diff --git a/demo/slider.html b/demo/slider.html index 6ebf1eb..f1d34ca 100644 --- a/demo/slider.html +++ b/demo/slider.html @@ -61,10 +61,9 @@ +``` + +Open in playground diff --git a/website/docs/gallery/slider.module.css b/website/docs/gallery/slider.module.css new file mode 100644 index 0000000..5b8d150 --- /dev/null +++ b/website/docs/gallery/slider.module.css @@ -0,0 +1,28 @@ +.slider_container { + width: 90%; + margin: 20px auto; +} +.slider { + -webkit-appearance: none; + width: 100%; + height: 15px; + border-radius: 5px; + background: #dedddd; + outline: none; +} +.slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 25px; + height: 25px; + border-radius: 50%; + background: var(--ifm-color-primary-light); + cursor: pointer; +} +.slider::-moz-range-thumb { + width: 25px; + height: 25px; + border-radius: 50%; + background: var(--ifm-color-primary-light); + cursor: pointer; +} diff --git a/website/docs/guides/slider.md b/website/docs/guides/slider.md deleted file mode 100644 index 8457754..0000000 --- a/website/docs/guides/slider.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Slider ---- - -TODO... diff --git a/website/docs/index.md b/website/docs/index.md index 77ae0ba..90f88de 100644 --- a/website/docs/index.md +++ b/website/docs/index.md @@ -5,8 +5,8 @@ hide_table_of_contents: true RacingBars - - + + ### **Bar Chart Race Made Easy 🎉** diff --git a/website/sidebars.ts b/website/sidebars.ts index c3ce965..910f4ee 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -71,8 +71,6 @@ const sidebars: SidebarsConfig = { 'guides/changing-options', 'guides/fill-date-gaps', 'guides/multiple-charts', - 'guides/slider', - 'guides/scroller', ], }, { diff --git a/website/src/css/custom.css b/website/src/css/custom.css index a8e6b61..157cb72 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -29,7 +29,7 @@ } .gallery .racing-bars { - min-height: 400px; + min-height: 300px; width: 100%; height: 80vh; }