Skip to content

Commit c797b2c

Browse files
authored
Introduction to Toolset Slides (#596)
* adding introduction to toolset slides * Added package * Added package * formatting slides
1 parent 6351542 commit c797b2c

26 files changed

+82
-0
lines changed

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"react": "^17.0.2",
3232
"react-dom": "^17.0.2",
3333
"react-github-btn": "^1.4.0",
34+
"react-image-gallery": "^1.2.11",
3435
"react-player": "^2.12.0",
3536
"sass": "^1.57.1"
3637
},

src/components/slides/slides.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from "react";
2+
import styles from "@site/src/components/slides/slides.module.css";
3+
import ImageGallery from "react-image-gallery";
4+
import "react-image-gallery/styles/css/image-gallery.css"
5+
6+
// https://github.com/xiaolin/react-image-gallery
7+
// https://stackoverflow.com/questions/3746725/how-to-create-an-array-containing-1-n
8+
const images = Array.from({length: 22}, (_, i) => {
9+
let ix = i; // starting at 0 intentionally
10+
return {
11+
original: "/img/slides/introduction-to-toolset-" + ix + ".svg",
12+
thumbnail: "/img/slides/introduction-to-toolset-" + ix + ".svg",
13+
originalAlt: "Introduction to Toolset slide " + ix,
14+
originalTitle: "Introduction to Toolset slide " + ix,
15+
thumbnailAlt: "Introduction to Toolset slide " + ix,
16+
thumbnailTitle: "Introduction to Toolset slide " + ix,
17+
loading: "lazy"
18+
}
19+
}
20+
);
21+
22+
export default function Slides() {
23+
return (
24+
<main>
25+
<section className={styles.slidesContainer}>
26+
<div className="container">
27+
<ImageGallery items={images}
28+
thumbnailPosition={"bottom"}
29+
showBullets={false}
30+
showNav={true}
31+
showIndex={true}
32+
slideInterval={4000}
33+
lazyLoad={true}
34+
/>
35+
</div>
36+
</section>
37+
</main>
38+
);
39+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* CSS files with the .module.css suffix will be treated as CSS modules
3+
* and scoped locally.
4+
*/
5+
6+
.slidesContainer {
7+
display: flex;
8+
align-items: center;
9+
padding: 0;
10+
width: 100%;
11+
}

static/img/slides/introduction-to-toolset-0.svg

Lines changed: 1 addition & 0 deletions
Loading

static/img/slides/introduction-to-toolset-1.svg

Lines changed: 1 addition & 0 deletions
Loading

static/img/slides/introduction-to-toolset-10.svg

Lines changed: 1 addition & 0 deletions
Loading

static/img/slides/introduction-to-toolset-11.svg

Lines changed: 1 addition & 0 deletions
Loading

static/img/slides/introduction-to-toolset-12.svg

Lines changed: 1 addition & 0 deletions
Loading

static/img/slides/introduction-to-toolset-13.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)