mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-10 04:19:42 +00:00
added basic modal functionality
This commit is contained in:
12
package-lock.json
generated
12
package-lock.json
generated
@@ -17,7 +17,8 @@
|
|||||||
"docusaurus-theme-openapi-docs": "^1.4.5",
|
"docusaurus-theme-openapi-docs": "^1.4.5",
|
||||||
"prism-react-renderer": "^1.3.1",
|
"prism-react-renderer": "^1.3.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2",
|
||||||
|
"react-modal": "^3.16.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/core": "^2.2.0",
|
"@docusaurus/core": "^2.2.0",
|
||||||
@@ -11088,8 +11089,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-modal": {
|
"node_modules/react-modal": {
|
||||||
"version": "3.15.1",
|
"version": "3.16.1",
|
||||||
"license": "MIT",
|
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz",
|
||||||
|
"integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"exenv": "^1.2.0",
|
"exenv": "^1.2.0",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
@@ -21562,7 +21564,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-modal": {
|
"react-modal": {
|
||||||
"version": "3.15.1",
|
"version": "3.16.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz",
|
||||||
|
"integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"exenv": "^1.2.0",
|
"exenv": "^1.2.0",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
"docusaurus-theme-openapi-docs": "^1.4.5",
|
"docusaurus-theme-openapi-docs": "^1.4.5",
|
||||||
"prism-react-renderer": "^1.3.1",
|
"prism-react-renderer": "^1.3.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2",
|
||||||
|
"react-modal": "^3.16.1"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"mermaid": "9.1.7"
|
"mermaid": "9.1.7"
|
||||||
|
|||||||
@@ -3,8 +3,35 @@ import clsx from "clsx";
|
|||||||
import styles from "./styles.module.css";
|
import styles from "./styles.module.css";
|
||||||
import Link from "@docusaurus/Link";
|
import Link from "@docusaurus/Link";
|
||||||
import WidgetBot from '@widgetbot/react-embed'
|
import WidgetBot from '@widgetbot/react-embed'
|
||||||
|
import Modal from 'react-modal';
|
||||||
import Room from "../room";
|
import Room from "../room";
|
||||||
|
|
||||||
|
const customStyles = {
|
||||||
|
content: {
|
||||||
|
top: '50%',
|
||||||
|
left: '50%',
|
||||||
|
right: 'auto',
|
||||||
|
bottom: 'auto',
|
||||||
|
marginRight: '-50%',
|
||||||
|
transform: 'translate(-50%, -50%)',
|
||||||
|
},
|
||||||
|
};
|
||||||
export default function Main() {
|
export default function Main() {
|
||||||
|
const [modalIsOpen, setIsOpen] = React.useState(false);
|
||||||
|
let subtitle;
|
||||||
|
Modal.setAppElement('#__docusaurus');
|
||||||
|
|
||||||
|
function openModal() {
|
||||||
|
setIsOpen(true);
|
||||||
|
}
|
||||||
|
function afterOpenModal() {
|
||||||
|
subtitle.style.color = '#f00';
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
setIsOpen(false);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={styles.headerContainer}>
|
<div className={styles.headerContainer}>
|
||||||
@@ -17,13 +44,13 @@ export default function Main() {
|
|||||||
<div className={styles.headerContent}>
|
<div className={styles.headerContent}>
|
||||||
<div className={styles.buttonsContainer}>
|
<div className={styles.buttonsContainer}>
|
||||||
<div className={styles.buttonsContent}>
|
<div className={styles.buttonsContent}>
|
||||||
<div className={styles.button}>Agenda</div>
|
<div className={styles.button} onClick={openModal}>Agenda</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.buttonsContent}>
|
<div className={styles.buttonsContent}>
|
||||||
<div className={styles.button}>Speakers</div>
|
<div className={styles.button} onClick={openModal}>Speakers</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.buttonsContent}>
|
<div className={styles.buttonsContent}>
|
||||||
<div className={styles.button}>FAQ</div>
|
<div className={styles.button} onClick={openModal}>FAQ</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,6 +70,19 @@ export default function Main() {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Room></Room>
|
<Room></Room>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
isOpen={modalIsOpen}
|
||||||
|
onAfterOpen={afterOpenModal}
|
||||||
|
onRequestClose={closeModal}
|
||||||
|
style={customStyles}
|
||||||
|
contentLabel="Example Modal"
|
||||||
|
>
|
||||||
|
<h2 ref={(_subtitle) => (subtitle = _subtitle)}>Hello</h2>
|
||||||
|
<button onClick={closeModal}>close</button>
|
||||||
|
<div>I am a modal</div>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,13 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
grid-template-columns: 80px 80px 80px;
|
grid-template-columns: 80px 80px 80px;
|
||||||
place-content: center;
|
place-content: end;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@media only screen and (max-width: 628px) {
|
||||||
|
.buttonsContainer {
|
||||||
|
place-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.buttonsContent {
|
.buttonsContent {
|
||||||
position:relative;
|
position:relative;
|
||||||
@@ -49,6 +53,14 @@
|
|||||||
margin-right: 40px;
|
margin-right: 40px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@media only screen and (max-width: 628px) {
|
||||||
|
.stageButtonsContainer {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
|
||||||
|
grid-gap: 10px;
|
||||||
|
margin-left: 40px;
|
||||||
|
margin-right: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.stageButtonsContent {
|
.stageButtonsContent {
|
||||||
position:relative;
|
position:relative;
|
||||||
@@ -159,4 +171,4 @@
|
|||||||
.stageButton {
|
.stageButton {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,14 +6,13 @@ import WidgetBot from '@widgetbot/react-embed'
|
|||||||
export default function Room() {
|
export default function Room() {
|
||||||
return (
|
return (
|
||||||
<div className={styles.stageContainer}>
|
<div className={styles.stageContainer}>
|
||||||
<div className={styles.stageContent}>
|
<div className={styles.videoContent}>
|
||||||
<iframe className={styles.video} src="https://www.youtube.com/embed/dVGhO6vSCT8" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
|
<iframe className={styles.video} src="https://www.youtube.com/embed/dVGhO6vSCT8" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.stageContent}>
|
<div className={styles.discordContent}>
|
||||||
<WidgetBot className={styles.video}
|
<WidgetBot className={styles.discord}
|
||||||
server="950875158011338752"
|
server="1039765757011165194"
|
||||||
channel="950875158011338755"
|
channel="1047378402556002384"
|
||||||
shard="https://emerald.widgetbot.io"
|
|
||||||
></WidgetBot>
|
></WidgetBot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,12 +5,19 @@
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
|
||||||
place-content: center;
|
place-content: center;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stageContent {
|
.videoContent {
|
||||||
|
position:relative;
|
||||||
|
margin-top: 20px;
|
||||||
|
width: -webkit-fill-available;
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
|
.discordContent {
|
||||||
position:relative;
|
position:relative;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
width: -webkit-fill-available;
|
width: -webkit-fill-available;
|
||||||
@@ -23,4 +30,39 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
}
|
||||||
|
.discord {
|
||||||
|
border: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1150px) {
|
||||||
|
.discordContent {
|
||||||
|
padding-bottom: 600px;
|
||||||
|
}
|
||||||
|
.videoContent {
|
||||||
|
padding-bottom: 200px;
|
||||||
|
}
|
||||||
|
.video {
|
||||||
|
border: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 796px) {
|
||||||
|
.discordContent {
|
||||||
|
padding-bottom: 600px;
|
||||||
|
}
|
||||||
|
.videoContent {
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
|
.video {
|
||||||
|
border: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user