forked from Doenet/DoenetTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93369f0
commit 08e277b
Showing
6 changed files
with
169 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,70 @@ | ||
import React, { useRef, useState } from 'react'; | ||
import { useOutletContext } from 'react-router'; | ||
import { useLoaderData, useOutletContext } from 'react-router'; | ||
import styled from 'styled-components'; | ||
import { Carousel } from '../../../_reactComponents/PanelHeaderComponents/Carousel'; | ||
|
||
function Heading(props) { | ||
return <div style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
height: '100px', | ||
}}> | ||
<h1 style={{ | ||
lineHeight: '0.1em', | ||
}}>{props.heading}</h1> | ||
<h4 style={{ | ||
lineHeight: '0.1em', | ||
}}> {props.subheading} </h4> | ||
</div> | ||
} | ||
|
||
const SearchBarContainer = styled.div` | ||
max-width: 400px; | ||
min-width: 200px; | ||
` | ||
const SearchBarSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px 10px 10px 10px; | ||
margin: 0px; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background: var(--lightBlue); | ||
height: 60px; | ||
` | ||
const CarouselSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 60px 10px 200px 10px; | ||
margin: 0px; | ||
row-gap: 45px; | ||
align-items: center; | ||
text-align: center; | ||
background: var(--mainGray); | ||
` | ||
|
||
export default function Community(props){ | ||
let context = useOutletContext(); | ||
|
||
const loaderData = useLoaderData(); | ||
const carouselData = loaderData?.carouselData; | ||
|
||
if (context.signedIn == null){ return null;} | ||
|
||
return <div>Community</div> | ||
} | ||
return <> | ||
<SearchBarSection> | ||
<SearchBarContainer> | ||
<input type='text' width="400px" /> | ||
</SearchBarContainer> | ||
</SearchBarSection> | ||
<Heading heading="Community Public Content" /> | ||
<CarouselSection> | ||
<Carousel title="College Math" data={carouselData[0]} /> | ||
<Carousel title="Science & Engineering" data={carouselData[1]} /> | ||
<Carousel title="K-12 Math" data={carouselData[2]} /> | ||
|
||
</CarouselSection> | ||
</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,103 @@ | ||
import React, { useRef, useState } from 'react'; | ||
import { useOutletContext } from 'react-router'; | ||
import styled from 'styled-components'; | ||
import Button from '../../../_reactComponents/PanelHeaderComponents/Button'; | ||
|
||
const SecondHeader = styled.header` | ||
background-color: #fff; | ||
/* background-color: lightskyblue; */ | ||
color: #000; | ||
height: 80px; | ||
position: fixed; | ||
top: 44; | ||
width: 100%; | ||
margin: 0; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
display: relative; | ||
`; | ||
|
||
const TopSpace = styled.div` | ||
margin-top: 80px; | ||
` | ||
|
||
const PublicActivitiesSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px 10px 10px 10px; | ||
margin: 0px; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background: var(--lightBlue); | ||
` | ||
const PublicActivityCardsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px 10px 10px 10px; | ||
margin: 0px; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
` | ||
|
||
const PrivateActivitiesSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px 10px 10px 10px; | ||
margin: 0px; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background: grey; | ||
min-height: 100vh; | ||
/* background: var(--mainGrey); */ | ||
` | ||
const PrivateActivityCardsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: 10px 10px 10px 10px; | ||
margin: 0px; | ||
/* justify-content: center; */ | ||
align-items: center; | ||
text-align: center; | ||
` | ||
|
||
export default function Portfolio(){ | ||
let context = useOutletContext(); | ||
|
||
if (context.signedIn == null){ return null;} | ||
|
||
return <div>Portfolio</div> | ||
return <> | ||
<SecondHeader> | ||
<h1 style={{ | ||
lineHeight: '0.1em' | ||
}}>Name Here</h1> | ||
<h4 style={{ | ||
lineHeight: '0.1em' | ||
}}>Portfolio</h4> | ||
<div style={{position:"absolute", top:'48px',right:"10px"}}><Button value="Add Activity"/></div> | ||
|
||
</SecondHeader> | ||
<TopSpace /> | ||
<PublicActivitiesSection> | ||
<h2>Public</h2> | ||
<PublicActivityCardsContainer> | ||
<div>No Public Activities</div> | ||
</PublicActivityCardsContainer> | ||
</PublicActivitiesSection> | ||
|
||
<PrivateActivitiesSection> | ||
<h2>Private</h2> | ||
<PrivateActivityCardsContainer> | ||
|
||
<div>No Private Activities</div> | ||
</PrivateActivityCardsContainer> | ||
</PrivateActivitiesSection> | ||
|
||
</> | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.