diff --git a/.github/workflows/build-and-deploy-stg-gt-pages.yml b/.github/workflows/build-and-deploy-stg-gt-pages.yml new file mode 100644 index 000000000..4a5e9d97f --- /dev/null +++ b/.github/workflows/build-and-deploy-stg-gt-pages.yml @@ -0,0 +1,53 @@ +name: Build/Deploy to AWS S3 Staging + +on: + # Runs on pushes targeting the default branch + push: + branches: ['stage'] + paths-ignore: + - 'README.md' + - '.github/**' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow one concurrent deployment +concurrency: + group: 'aws' + cancel-in-progress: true + +env: + BASE_URL: '/' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + publish: + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check out repo + uses: actions/checkout@v3 + # Node is required for npm + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '16' + # Install and build Developer Community site + - name: Build Developer Community site + run: | + export NODE_OPTIONS="--max_old_space_size=4096" + npm ci + npm run gen-api-docs-all + npm run build + - name: Configure AWS credentials from Test account + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{secrets.SITE_AWS_ACCESS_KEY_ID}} + aws-secret-access-key: ${{secrets.SITE_AWS_SECRET_ACCESS_KEY}} + aws-region: us-east-1 + + # push these files to AWS + - name: Copy files to the test website with the AWS CLI + run: | + aws s3 sync ./build s3://spt-developer + diff --git a/.github/workflows/checkmarx-scan-on-pull.yml b/.github/workflows/checkmarx-scan-on-pull.yml index 7afddd9d6..178eb299b 100644 --- a/.github/workflows/checkmarx-scan-on-pull.yml +++ b/.github/workflows/checkmarx-scan-on-pull.yml @@ -17,7 +17,9 @@ name: CheckMarx Scan on Pull Request -on: pull_request +on: + #pull_request: + workflow_dispatch: jobs: start-runner: diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 055deadad..4755e64c4 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -11,7 +11,11 @@ jobs: NODE_ENV: 'development' steps: - uses: actions/checkout@v2 - - run: npm ci && npm run gen-api-docs-all && npm run build + - run: | + export NODE_OPTIONS="--max_old_space_size=4096" + npm ci + npm run gen-api-docs-all + npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' diff --git a/algolia/config.json b/algolia/config.json index bc4e905fb..e94ca83ce 100644 --- a/algolia/config.json +++ b/algolia/config.json @@ -26,6 +26,17 @@ "tags": ["IDN Documentation"] }, + { + "url": "https://developer.sailpoint.com/idn/tools/cli", + "tags": ["IDN Tools", "CLI"], + "selectors_key": "tools" + }, + { + "url": "https://developer.sailpoint.com/idn/tools/sdk", + "tags": ["IDN Tools", "SDKs"], + "selectors_key": "tools" + }, + { "url": "https://developer.sailpoint.com/idn/api/getting-started", "selectors_key": "api_v3", @@ -89,6 +100,26 @@ "lvl7": "article h6", "text": "article p, article li, article td:last-child" }, + "tools": { + "lvl0": { + "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[1]", + "type": "xpath", + "global": true, + "default_value": "IDN Tools" + }, + "lvl1": { + "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]", + "type": "xpath", + "global": true, + "default_value": "IDN Tools" + }, + "lvl2": "article h2", + "lvl3": "article h3", + "lvl4": "article h4", + "lvl5": "article h5, article td:first-child", + "lvl6": "article h6", + "text": "article p, article li, article td:last-child" + }, "api_v3": { "lvl0": { "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[1]", diff --git a/archive/.devdaysbak/_agenda.js b/archive/.devdaysbak/_agenda.js new file mode 100644 index 000000000..626080dc3 --- /dev/null +++ b/archive/.devdaysbak/_agenda.js @@ -0,0 +1,65 @@ +import React, {useEffect, useState} from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import {getAgenda, getSpeaker} from '../../services/StreamService'; +import {flushSync} from 'react-dom'; +import AgendaContent from '../../components/agenda/agenda'; + +export default function Agenda() { + const {siteConfig} = useDocusaurusContext(); + const [agenda, setAgenda] = useState({ + day1: [], + day2: [], + day3: [], + }); + const [speakers, setSpeakers] = useState([]); + const [filterSelection, setFilterSelection] = React.useState('IDN'); + const [loading, setLoading] = useState(true); + + const dates = { + day1: new Date('2023-03-07').toLocaleDateString([], {dateStyle: 'full'}), + day2: new Date('2023-03-08').toLocaleDateString([], {dateStyle: 'full'}), + day3: new Date('2023-03-09').toLocaleDateString([], {dateStyle: 'full'}), + }; + + function formatSpeaker(id) { + return speakers?.filter((spkr) => spkr.id === id)[0]; + } + + function diff_minutes(dt2, dt1) { + var diff = (dt2.getTime() - dt1.getTime()) / 1000; + diff /= 60; + return Math.abs(Math.round(diff)); + } + + const sessionFilter = (obj) => { + if (obj.hidden === true) return false; + return obj.stage === filterSelection; + }; + + useEffect(async () => { + const tempAgenda = await getAgenda(); + const tempSpeakers = await getSpeaker(); + setAgenda(tempAgenda); + setSpeakers(tempSpeakers); + console.log(tempAgenda); + console.log(tempSpeakers); + setLoading(false); + console.log('Done Loading'); + }, []); + + return ( + +
+
+

Agenda

+ +
+
+
+ ); +} diff --git a/archive/StreamService.js b/archive/StreamService.js new file mode 100644 index 000000000..b8f6b0af1 --- /dev/null +++ b/archive/StreamService.js @@ -0,0 +1,111 @@ +import md5 from 'crypto-js/md5'; + +export const URL = 'https://developerdays.sailpoint.com'; + + +export async function getFAQ() { + try { + const response = await fetch(URL + '/faq'); + return await response.json(); + } catch (error) { + return []; + } +} + +export async function getAgenda() { + try { + const response = await fetch(URL + '/agenda'); + return await response.json(); + } catch (error) { + return []; + } +} + +export async function getSpeaker() { + try { + const response = await fetch(URL + '/speakers'); + return await response.json(); + } catch (error) { + return []; + } +} + +export async function getRegistration() { + try { + const response = await fetch(URL + '/registration'); + return await response.json(); + } catch (error) { + return false; + } +} + +export async function submitSurvey(session, rating, feedback) { + if (rating < 1) return false; + var myHeaders = new Headers(); + myHeaders.append('Content-Type', 'application/json'); + + var requestOptions = { + method: 'POST', + headers: myHeaders, + body: JSON.stringify({ + session, + rating, + feedback, + }), + redirect: 'follow', + }; + + const response = await fetch(URL + '/survey', requestOptions).catch( + (error) => { + console.log('error', error); + return false; + }, + ); + + const validated = await response.text(); + + if (validated) { + return true; + } else { + return false; + } +} + +export async function submitAttendance(email, name, title, company) { + if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) { + var myHeaders = new Headers(); + myHeaders.append('Content-Type', 'application/json'); + + var requestOptions = { + method: 'POST', + headers: myHeaders, + body: JSON.stringify({ + email, + name, + title, + company, + }), + redirect: 'follow', + }; + + const response = await fetch(URL + '/attend', requestOptions).catch( + (error) => { + console.log('error', error); + return false; + }, + ); + + const validated = await response.text(); + + if (validated) { + console.log('setting login status'); + const uuid = md5(email); + localStorage.setItem('entry-status', uuid); + return uuid; + } else { + return false; + } + } else { + return false; + } +} diff --git a/archive/_devdaysbak.js b/archive/_devdaysbak.js new file mode 100644 index 000000000..0668a0cf3 --- /dev/null +++ b/archive/_devdaysbak.js @@ -0,0 +1,15 @@ +import React from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import Main from '../components/stream/main'; + +export default function Stream() { + const {siteConfig} = useDocusaurusContext(); + return ( + +
+
+
+
+ ); +} diff --git a/archive/agenda/agenda.js b/archive/agenda/agenda.js new file mode 100644 index 000000000..92ac4313e --- /dev/null +++ b/archive/agenda/agenda.js @@ -0,0 +1,203 @@ +import React, {useEffect, useState} from 'react'; +import styles from './styles.module.css'; + +export default function AgendaContent({ + agenda = { + day1: [], + day2: [], + day3: [], + }, + speakers = [], + loading = true, +}) { + const [filterSelection, setFilterSelection] = React.useState('IDN'); + + const dates = { + day1: new Date('03/07/2023').toLocaleDateString([], { + dateStyle: 'full', + }), + day2: new Date('03/08/2023').toLocaleDateString([], { + dateStyle: 'full', + }), + day3: new Date('03/09/2023').toLocaleDateString([], { + dateStyle: 'full', + }), + }; + + function formatSpeaker(id) { + return speakers?.filter((spkr) => spkr?.id === id)[0]; + } + + function diff_minutes(dt2, dt1) { + var diff = (dt2.getTime() - dt1.getTime()) / 1000; + diff /= 60; + return Math.abs(Math.round(diff)); + } + + const sessionFilter = (obj) => { + if (obj?.hidden === true) return false; + return obj?.stage === filterSelection; + }; + + const iiqSelectedClass = + filterSelection === 'IIQ' ? styles.stageButtonActive : ''; + const idnSelectedClass = + filterSelection === 'IDN' ? styles.stageButtonActive : ''; + + return ( + <> +
+ + +
+ + {loading && ( + <> +
+

Loading...

+
+ + )} + {!loading && ( + <> + {['Day 1', 'Day 2', 'Day 3'].map((label) => { + const day = label?.replace(' ', '')?.toLowerCase(); + const sessions = agenda[day]?.filter(sessionFilter); + + if (sessions?.length > 0) + return ( +
+
+
+

+ {label} - {dates[day]} +

+
+
+ {sessions.map((session) => { + return ( + <> +
+
+

+ {new Date( + session?.startTime, + ).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + timeZoneName: 'short', + })} +

+
+
+
+
+

+ {new Date( + session?.startTime, + ).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + timeZoneName: 'short', + })} +

+
+
+
+
+

+ {session?.topic} +

+
+
+ {session?.speakers?.map((spkr) => { + const speaker = formatSpeaker(spkr); + return ( +
+

+ {speaker?.name} + {speaker?.title && + ` - ${speaker.title}`} +

+
+ ); + })} +
+
+ +
+ {session?.topicLink && ( + + + + )} +
+

+ {diff_minutes( + new Date(session?.endTime), + new Date(session?.startTime), + )} +

+

min

+
+
+
+
+

+ {diff_minutes( + new Date(session?.endTime), + new Date(session?.startTime), + )}{' '} + min +

+
+
+
+
+ + ); + })} +
+
+ ); + })} + + )} + + ); +} diff --git a/archive/agenda/styles.module.css b/archive/agenda/styles.module.css new file mode 100644 index 000000000..53f8b231f --- /dev/null +++ b/archive/agenda/styles.module.css @@ -0,0 +1,210 @@ +/* positioning of content */ +.headerContainer { + display: grid; + margin-left: 50px; + margin-bottom: 50px; + grid-gap: 20px; + grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); + place-content: center; + margin-right: 40px; +} + +.headerContent { + position: relative; + margin-top: 20px; + height: 100px; +} + +/* agenda speakers faq buttons containers */ +.buttonsContainer { + display: grid; + grid-gap: 20px; + grid-template-columns: 80px 80px 80px; + place-content: end; +} +@media only screen and (max-width: 628px) { + .buttonsContainer { + place-content: center; + } +} + +.buttonsContent { + position: relative; + margin-top: 0px; + height: 40px; +} + +/* stage buttons containers */ + +.center { + max-width: 480px; +} + +.stageButtonsContainer { + /* display: grid; + + grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); + grid-gap: 10px; */ + margin-left: 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 { + position: relative; + margin-top: 20px; + height: 30px; +} + +/* initial header */ +.headerText { + color: var(--dev-text-color-cobalt); + font-size: 30px; + font-weight: bold; + line-height: 100%; +} + +.timeText { + margin: 8px 0px; + color: var(--dev-text-color-secondary); + font-size: 14px; + font-weight: bold; + letter-spacing: 2px; +} + +/* agenda speakers and faq buttons */ + +.button { + text-decoration: none; + text-align: center; + font-size: 16px; + font-weight: bold; + line-height: 100%; + /* Layout Properties */ + width: 80px; + height: 35px; + line-height: 35px; + /* UI Properties */ + background: transparent 0% 0% no-repeat padding-box; + opacity: 1; + background-color: #c552ae10; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2); + /* border: 2px solid #df61ca; */ + border-radius: 5px; + color: #cc27b0; +} + +.button:hover { + cursor: pointer; + top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #c552ae31; + color: #cc27b0; +} + +/* stage buttons */ + +.stageButton { + text-decoration: none; + /* text-align: center; */ + /* font-size: 16px; */ + font-weight: bold; + /* line-height: 100%; */ + /* Layout Properties */ + width: 130px; + /* height: 40px; */ + line-height: 40px; + /* UI Properties */ + /* background: transparent 0% 0% no-repeat padding-box; */ + /* background-color: #0071ce; */ + /* border: 1px solid #dae1e9; */ + /* box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2); */ + border-radius: 20.3736px; + /* color: #dae1e9; */ +} + +.stageButton:hover { + cursor: pointer; + transform: scale(1.03); + /* top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #c552ae31; + color: #cc27b0; */ +} + +.stageButtonActive { + top: -4px; + box-shadow: 0 7px 7px rgba(0, 0, 0, 0.4); + background-color: #0033a1 !important; + color: #dae1e9 !important; + border: 1px solid #dae1e9; +} + +.stageButton:disabled { + background: #ffffff; + box-shadow: inset -5.0934px -5.0934px 15.2802px rgba(255, 255, 255, 0.5), + inset 5.0934px 5.0934px 15.2802px rgba(136, 160, 183, 0.25); + border-radius: 20.3736px; +} + +@media only screen and (max-width: 628px) { + .stageButton { + width: auto; + } +} + +.modal { + position: absolute; + margin-top: 50px; + top: 50%; + left: 50%; + right: auto; + bottom: auto; + margin-right: -50%; + transform: translate(-50%, -50%); + box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.25); + border-radius: 20px; + background-color: var(--dev-card-background); + max-height: 100%; +} + +.modalButton { + border: 1px solid var(--ifm-color-primary); + box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.12); + border-radius: 24px; + color: var(--ifm-color-primary); + margin: 10px; + padding: 10px; + text-align: center; + width: 120px; + + background-color: #ffffff31; +} + +.modalButton:hover { + cursor: pointer; + top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #dae1e9; + color: #005fc4; +} + +.agendaDiv { + background: linear-gradient( + 145deg, + rgba(0, 51, 161, 1) 40%, + rgba(0, 79, 181, 1) 65%, + rgba(0, 113, 206, 1) 100% + ); +} + +.agendaDiv:hover { + transform: scaleX(1.04) scaleY(1.04); +} diff --git a/src/components/conference/FAQ/index.js b/archive/conference/FAQ/index.js similarity index 100% rename from src/components/conference/FAQ/index.js rename to archive/conference/FAQ/index.js diff --git a/src/components/conference/FAQ/styles.module.css b/archive/conference/FAQ/styles.module.css similarity index 100% rename from src/components/conference/FAQ/styles.module.css rename to archive/conference/FAQ/styles.module.css diff --git a/src/components/conference/Hero/index.js b/archive/conference/Hero/index.js similarity index 88% rename from src/components/conference/Hero/index.js rename to archive/conference/Hero/index.js index fceb4717d..cde54f41f 100644 --- a/src/components/conference/Hero/index.js +++ b/archive/conference/Hero/index.js @@ -12,12 +12,12 @@ export default function ConferenceHero() {
Developer Days
-
COMING SOON | Q1 2023
+
March 7th-9th, 2023
The conference for developers on SailPoint platforms.
- Join the Waitlist! + Register today!
diff --git a/src/components/conference/Hero/styles.module.css b/archive/conference/Hero/styles.module.css similarity index 100% rename from src/components/conference/Hero/styles.module.css rename to archive/conference/Hero/styles.module.css diff --git a/src/components/conference/SpeakerCard/index.js b/archive/conference/SpeakerCard/index.js similarity index 100% rename from src/components/conference/SpeakerCard/index.js rename to archive/conference/SpeakerCard/index.js diff --git a/src/components/conference/SpeakerCard/styles.module.css b/archive/conference/SpeakerCard/styles.module.css similarity index 100% rename from src/components/conference/SpeakerCard/styles.module.css rename to archive/conference/SpeakerCard/styles.module.css diff --git a/src/components/conference/Speakers/index.js b/archive/conference/Speakers/index.js similarity index 100% rename from src/components/conference/Speakers/index.js rename to archive/conference/Speakers/index.js diff --git a/src/components/conference/Speakers/styles.module.css b/archive/conference/Speakers/styles.module.css similarity index 100% rename from src/components/conference/Speakers/styles.module.css rename to archive/conference/Speakers/styles.module.css diff --git a/src/components/conference/Sponsors/index.js b/archive/conference/Sponsors/index.js similarity index 100% rename from src/components/conference/Sponsors/index.js rename to archive/conference/Sponsors/index.js diff --git a/src/components/conference/Sponsors/styles.module.css b/archive/conference/Sponsors/styles.module.css similarity index 100% rename from src/components/conference/Sponsors/styles.module.css rename to archive/conference/Sponsors/styles.module.css diff --git a/src/components/conference/Theme/index.js b/archive/conference/Theme/index.js similarity index 100% rename from src/components/conference/Theme/index.js rename to archive/conference/Theme/index.js diff --git a/archive/conference/Theme/styles.module.css b/archive/conference/Theme/styles.module.css new file mode 100644 index 000000000..5251945ee --- /dev/null +++ b/archive/conference/Theme/styles.module.css @@ -0,0 +1,19 @@ +.gridContainer { + display: grid; + place-content: center; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + grid-gap: 40px; + margin-left: 20px; + margin-right: 40px; + text-align: center; + } + + +.center { + margin: 20px auto; + max-width: 1000px; +} + +.main { + margin-bottom: 100px; +} diff --git a/src/components/conference/ThemeCard/index.js b/archive/conference/ThemeCard/index.js similarity index 100% rename from src/components/conference/ThemeCard/index.js rename to archive/conference/ThemeCard/index.js diff --git a/src/components/conference/ThemeCard/styles.module.css b/archive/conference/ThemeCard/styles.module.css similarity index 100% rename from src/components/conference/ThemeCard/styles.module.css rename to archive/conference/ThemeCard/styles.module.css diff --git a/src/components/conference/Title/index.js b/archive/conference/Title/index.js similarity index 100% rename from src/components/conference/Title/index.js rename to archive/conference/Title/index.js diff --git a/src/components/conference/Title/styles.module.css b/archive/conference/Title/styles.module.css similarity index 100% rename from src/components/conference/Title/styles.module.css rename to archive/conference/Title/styles.module.css diff --git a/src/components/conference/Waitlist/index.js b/archive/conference/Waitlist/index.js similarity index 83% rename from src/components/conference/Waitlist/index.js rename to archive/conference/Waitlist/index.js index 8a4354423..772692a05 100644 --- a/src/components/conference/Waitlist/index.js +++ b/archive/conference/Waitlist/index.js @@ -4,17 +4,11 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; import ThemedImage from '@theme/ThemedImage'; import {addDarkToFileName} from '../../../util/util'; import {SliderButton} from '@typeform/embed-react'; -export default function ConferenceWaitlist() { -<<<<<<< HEAD - const background = "/conf/WaveBackground.png"; - const learnBuildDeploy = "/conf/LearnBuildDeploy-Light.png"; - const sailpointImage = "/img/SailPoint-Logo-RGB-Color.png"; -======= +export default function RegisterForConference() { const background = '/conf/Shipyard-WaveBackground.png'; const learnBuildDeploy = '/conf/LearnBuildDeploy-Light.png'; const shipyardImage = '/conf/SailPoint-Shipyard-DeveloperConference-Logo.png'; const sailpointImage = '/img/SailPoint-Logo-RGB-Color.png'; ->>>>>>> main return (
@@ -42,7 +36,7 @@ export default function ConferenceWaitlist() { dark: useBaseUrl(addDarkToFileName(sailpointImage)), }}>
-
Coming Soon | Q1 2023
+
March 7th-9th, 2023
The conference for developers on SailPoint platforms.
@@ -51,7 +45,7 @@ export default function ConferenceWaitlist() { */} - Join the Waitlist + Register today! diff --git a/src/components/conference/Waitlist/styles.module.css b/archive/conference/Waitlist/styles.module.css similarity index 100% rename from src/components/conference/Waitlist/styles.module.css rename to archive/conference/Waitlist/styles.module.css diff --git a/archive/faq/faq.js b/archive/faq/faq.js new file mode 100644 index 000000000..1c03b7c4c --- /dev/null +++ b/archive/faq/faq.js @@ -0,0 +1,25 @@ +import React, {useEffect} from 'react'; +import styles from './styles.module.css'; +import {getFAQ} from '../../services/StreamService'; +import Accordion from '../Accordion/Accordion'; +export default function FAQContent() { + const [faqs, setFaqs] = React.useState([]); + + React.useEffect(async () => { + let data = await getFAQ(); + if (!Array.isArray(data)) data = []; + setFaqs(data); + }, []); + + let itemsList = faqs?.map((item, index) => { + return ( + + ); + }); + + return
{itemsList}
; +} diff --git a/archive/faq/styles.module.css b/archive/faq/styles.module.css new file mode 100644 index 000000000..2a2ebb3f8 --- /dev/null +++ b/archive/faq/styles.module.css @@ -0,0 +1,80 @@ +.faq { + margin: 20px; +} + +.gettingStartedText { + text-align: center; + margin: 50px auto 50px auto; + width: calc(100% - 100px); + max-width: 600px; +} + +.gettingStartedCardIcon { + margin-bottom: 20px; + width: 50px; + height: 50px; +} + +.gettingStartedOne { + color: var(--ifm-color-primary); + font-size: 30px; + font-weight: bold; + line-height: 100%; +} + +.gettingStartedThree { + margin-top: 20px; + font-size: 16px; + font-weight: 500; +} + +.faqContent { + height: calc(100vh - 530px); + + overflow-y: auto; +} + +.faqQuestion { + font-weight: bold; +} + +.faqAnswer { + margin-left: 20px; + margin-bottom: 5px; +} + +.modal { + position: absolute; + margin-top: 10px; + top: 50%; + left: 50%; + right: auto; + bottom: auto; + margin-right: -50%; + transform: translate(-50%, -50%); + box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.25); + border-radius: 20px; + background-color: var(--dev-card-background); + max-height: 100%; +} + +.modalButton { + border: 1px solid var(--ifm-color-primary); + box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.12); + border-radius: 24px; + color: var(--ifm-color-primary); + margin: 10px; + padding: 10px; + text-align: center; + width: 120px; + + background-color: #ffffff31; +} + +.modalButton:hover { + cursor: pointer; + top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #dae1e9; + color: #005fc4; +} diff --git a/archive/stream/agenda/index.js b/archive/stream/agenda/index.js new file mode 100644 index 000000000..78331ec48 --- /dev/null +++ b/archive/stream/agenda/index.js @@ -0,0 +1,71 @@ +import React, {useState, useEffect} from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; +import Link from '@docusaurus/Link'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Modal from 'react-modal'; +import {addDarkToFileName} from '../../../util/util'; +import ThemedImage from '@theme/ThemedImage'; +import {getAgenda} from '../../../services/StreamService'; +import AgendaContent from '../../agenda/agenda'; +export default function Agenda({title, image, description, speakers}) { + const [agendaModalIsOpen, setAgendaIsOpen] = React.useState(false); + const [agenda, setAgenda] = useState({ + day1: [], + day2: [], + day3: [], + }); + const [loading, setLoading] = useState(true); + + useEffect(async () => { + const tempAgenda = await getAgenda(); + setAgenda(tempAgenda); + console.log(tempAgenda); + setLoading(false); + console.log('Done Loading'); + }, []); + + return ( +
+ + setAgendaIsOpen(false)} + className={styles.modal} + contentLabel="Agenda"> +
+
+ +
{title}
+
+
+
+ +
+
+
+ +
+
+
+ ); +} diff --git a/archive/stream/agenda/styles.module.css b/archive/stream/agenda/styles.module.css new file mode 100644 index 000000000..0dc53c7c2 --- /dev/null +++ b/archive/stream/agenda/styles.module.css @@ -0,0 +1,93 @@ +.agenda { + margin: 20px; +} + +.gettingStartedText { + text-align: center; + margin: 50px auto 50px auto; + width: calc(100% - 100px); + max-width: 600px; +} + +.gettingStartedCardIcon { + margin-bottom: 20px; + width: 50px; + height: 50px; +} + +.gettingStartedOne { + color: var(--ifm-color-primary); + font-size: 30px; + font-weight: bold; + line-height: 100%; +} + +.gettingStartedThree { + margin-top: 20px; + font-size: 16px; + font-weight: 500; +} + +.agendaContent { + height: 100%; + + overflow-y: auto; +} + +.agendaQuestion { + font-weight: bold; +} + +.agendaAnswer { + margin-left: 20px; + margin-bottom: 5px; +} + +.dayHeader { + text-align: center; + font-size: 20px; + font-weight: bold; +} + +.dayContent { + border: 1px solid rgba(0, 0, 0, 0.05); + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2); + border-radius: 20.3736px; + padding: 20px; + list-style-position: inside; +} + +.modal { + position: absolute; + top: 50%; + left: 50%; + right: auto; + bottom: auto; + margin-right: -50%; + transform: translate(-50%, -50%); + box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.25); + border-radius: 20px; + background-color: var(--dev-card-background); + max-height: 100%; +} + +.modalButton { + border: 1px solid var(--ifm-color-primary); + box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.12); + border-radius: 24px; + color: var(--ifm-color-primary); + margin: 10px; + padding: 10px; + text-align: center; + width: 120px; + + background-color: #ffffff31; +} + +.modalButton:hover { + cursor: pointer; + top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #dae1e9; + color: #005fc4; +} diff --git a/archive/stream/faq/index.js b/archive/stream/faq/index.js new file mode 100644 index 000000000..99372c830 --- /dev/null +++ b/archive/stream/faq/index.js @@ -0,0 +1,80 @@ +import React from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; +import Link from '@docusaurus/Link'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Modal from 'react-modal'; +import {addDarkToFileName} from '../../../util/util'; +import ThemedImage from '@theme/ThemedImage'; +import {getFAQ} from '../../../services/StreamService'; +import FAQContent from '../../faq/faq'; +export default function FAQ({title, image, description}) { + const [faqModalIsOpen, setFaqIsOpen] = React.useState(false); + const [faqs, setFaqs] = React.useState([]); + + function openFaqModal() { + setFaqIsOpen(true); + } + + function closeFaqModal() { + setFaqIsOpen(false); + } + + const getFaqs = async () => { + const data = await getFAQ(); + if (!Array.isArray(data)) data = []; + setFaqs(data); + }; + React.useEffect(() => { + getFaqs(); + }, []); + + let itemsList = faqs?.map((item, index) => { + return ( +
+
+ {item?.question} +
+
+ {item?.answer} +
+
+ ); + }); + + return ( +
+ + +
+ +
{title}
+
+
+
+ +
+
+ +
+
+
+ ); +} diff --git a/archive/stream/faq/styles.module.css b/archive/stream/faq/styles.module.css new file mode 100644 index 000000000..2a2ebb3f8 --- /dev/null +++ b/archive/stream/faq/styles.module.css @@ -0,0 +1,80 @@ +.faq { + margin: 20px; +} + +.gettingStartedText { + text-align: center; + margin: 50px auto 50px auto; + width: calc(100% - 100px); + max-width: 600px; +} + +.gettingStartedCardIcon { + margin-bottom: 20px; + width: 50px; + height: 50px; +} + +.gettingStartedOne { + color: var(--ifm-color-primary); + font-size: 30px; + font-weight: bold; + line-height: 100%; +} + +.gettingStartedThree { + margin-top: 20px; + font-size: 16px; + font-weight: 500; +} + +.faqContent { + height: calc(100vh - 530px); + + overflow-y: auto; +} + +.faqQuestion { + font-weight: bold; +} + +.faqAnswer { + margin-left: 20px; + margin-bottom: 5px; +} + +.modal { + position: absolute; + margin-top: 10px; + top: 50%; + left: 50%; + right: auto; + bottom: auto; + margin-right: -50%; + transform: translate(-50%, -50%); + box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.25); + border-radius: 20px; + background-color: var(--dev-card-background); + max-height: 100%; +} + +.modalButton { + border: 1px solid var(--ifm-color-primary); + box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.12); + border-radius: 24px; + color: var(--ifm-color-primary); + margin: 10px; + padding: 10px; + text-align: center; + width: 120px; + + background-color: #ffffff31; +} + +.modalButton:hover { + cursor: pointer; + top: -4px; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.4); + background-color: #dae1e9; + color: #005fc4; +} diff --git a/archive/stream/main/index.js b/archive/stream/main/index.js new file mode 100644 index 000000000..e218d8259 --- /dev/null +++ b/archive/stream/main/index.js @@ -0,0 +1,486 @@ +import React from 'react'; +import styles from './styles.module.css'; + +import Modal from 'react-modal'; +import Agenda from '../agenda'; +import FAQ from '../faq'; +import Room from '../room'; +import Speakers from '../speakers'; + +import useBaseUrl from '@docusaurus/useBaseUrl'; +import {addDarkToFileName} from '../../../util/util'; +import ThemedImage from '@theme/ThemedImage'; +import BrowserOnly from '@docusaurus/BrowserOnly'; +import {useEffect, useState} from 'react'; +import io from 'socket.io-client'; +import { + getRegistration, + getSpeaker, + submitAttendance, + submitSurvey, + URL, +} from '../../../services/StreamService'; + +const socket = io(URL); + +export default function Main() { + const [isConnected, setIsConnected] = useState(false); + + const BackupStageData = { + IDN: { + day: '1', + topic: 'Conference Starting 03.07.23', + startTime: '2023-03-07T14:00:00.000Z', + endTime: '2023-03-07T15:00:00.000Z', + stage: 'IDN', + active: true, + speakers: [], + id: 'reciq5lGqHOyl1Zzy', + muxPlaybackId: 'placeholdervideo', + muxEnvironmentKey: 'j4iije0sv1ih8shgurfp3ldkq', + typeformId: 'RlYAvjZo', + surveyDisplayed: false, + allStages: false, + hidden: true, + }, + IIQ: { + day: '1', + topic: 'Conference Starting 03.07.23', + startTime: '2023-03-07T14:00:00.000Z', + endTime: '2023-03-07T15:00:00.000Z', + stage: 'IIQ', + active: true, + speakers: [], + id: 'reciq5lGqHOyl1Zzy', + muxPlaybackId: 'placeholdervideo', + muxEnvironmentKey: 'j4iije0sv1ih8shgurfp3ldkq', + typeformId: 'RlYAvjZo', + surveyDisplayed: false, + allStages: false, + hidden: true, + }, + }; + + const [stages, setStages] = useState(BackupStageData); + const [stage, setStage] = useState('IDN'); + const [speakers, setSpeakers] = useState([]); + const [surveyOpen, setSurveyOpen] = useState(false); + const [loginOpen, setLoginOpen] = useState(false); + + const [rating, setRating] = useState(0); + const [hover, setHover] = useState(0); + const [feedback, setFeedback] = useState(''); + + const [emailValidationError, setEmailValidationError] = useState(false); + const [starValidationError, setStarValidationError] = useState(false); + const [email, setEmail] = useState(''); + const [name, setName] = useState(''); + const [title, setTitle] = useState(''); + const [company, setCompany] = useState(''); + const [userID, setUserID] = useState('Unregistered User'); + + const getSpeakers = async () => { + const data = await getSpeaker(); + console.log('Speaker Data'); + console.log(data); + setSpeakers(data); + }; + + React.useEffect(() => { + getSpeakers(); + }, []); + + React.useEffect(async () => { + console.log('Starting Registration'); + const reg = await getRegistration(); + console.log(reg); + openLoginPage(reg); + }, []); + + //setting socket here + useEffect(() => { + console.log('Creating effect'); + socket.on('connect', () => { + console.log('Socket Connect'); + socket.emit('register'); + setIsConnected(true); + }); + + socket.on('disconnect', () => { + setIsConnected(false); + }); + + socket.on('stream', (data) => { + console.log('incoming Data'); + console.log(data); + + if (data?.stages?.IDN) { + if (Object.keys(data.stages?.IDN).length <= 0) { + data.stages.IDN = BackupStageData.IDN; + } + } + + if (data?.stages?.IIQ) { + if (Object.keys(data.stages?.IIQ).length <= 0) { + data.stages.IIQ = BackupStageData.IIQ; + } + } + + setStages(data.stages); + }); + + return () => { + socket.off('connect'); + socket.off('disconnect'); + socket.off('stream'); + socket.off('survey'); + }; + }, []); + + function openSurvey() { + setFeedback(''); + setRating(0); + setHover(0); + setStarValidationError(false); + setSurveyOpen(true); + } + + useEffect(() => { + socket.on('survey', (data) => { + if (stage === data) { + openSurvey(); + } + }); + return () => { + socket.off('survey'); + }; + }, [stage]); + + function changeToIDNStage() { + setStage('IDN'); + console.log('Changing Stage'); + } + function changeToIIQStage() { + setStage('IIQ'); + console.log('Changing Stage'); + } + + function openLoginPage(reg) { + setTimeout(() => { + console.log('opening login page'); + let pop_status = localStorage.getItem('entry-status'); + console.log(pop_status); + console.log(reg); + setUserID(pop_status); + if (!pop_status && reg) { + console.log('open'); + setLoginOpen(true); + } + }, 1000); + } + + Modal.setAppElement('#__docusaurus'); + + const eventSpeakers = stages[stage]?.speakers?.map((speakerId, index) => { + return speakers.filter((obj) => obj.id === speakerId)[0]; + }); + + const iiqSelectedClass = stage === 'IIQ' ? styles.stageButtonActive : ''; + const idnSelectedClass = stage === 'IDN' ? styles.stageButtonActive : ''; + + return ( +
+
+
+
+ {stages[stage]?.topic} +
+ +
+ {stages[stage]?.startTime && + new Date(stages[stage]?.startTime).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + })} + {(stages[stage]?.endTime && + `-` + + new Date(stages[stage]?.endTime).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + })) || + null} +
+ {stages[stage]?.topicLink && ( +
+ + Discuss this topic in the Developer Community + +
+ )} + +
+ {eventSpeakers?.map((spkr) => { + return ( +
+ +
+
+ {spkr?.name} +
+
+ {spkr?.title} +
+
+
+ ); + })} +
+ +
+ + + +
+
+ +
+
+ + + + +
+ + setSurveyOpen(false)} + className={styles.modal} + contentLabel="Survey"> +
+
+ +
+
+
Survey
+
+
+
    +
  1. +

    + How valuable was the session "{stages[stage]?.topic}" to + you? + {starValidationError === true && ( +

    + Rating is required +

    + )} +

    + +
    + {[...Array(5)].map((star, index) => { + index += 1; + return ( + + ); + })} +
    +
  2. +
  3. +

    + Is there anything else you'd like the presenter(s) of + this session to know? +

    +