Skip to content

Commit

Permalink
More progress
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincharles committed Mar 10, 2023
1 parent 93369f0 commit 08e277b
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 181 deletions.
66 changes: 62 additions & 4 deletions src/Tools/_framework/Paths/Community.jsx
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>
</>
}
6 changes: 0 additions & 6 deletions src/Tools/_framework/Paths/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ const CarouselSection = styled.div`
text-align: center;
background: var(--mainGray);
height: 300px;
/* @media (max-width: 800px) {
height: 500px;
}
@media (max-width: 500px) {
height: 1000px;
} */
`

const CreateContentSection = styled.div`
Expand Down
93 changes: 92 additions & 1 deletion src/Tools/_framework/Paths/Portfolio.jsx
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>

</>
}

120 changes: 9 additions & 111 deletions src/Tools/_framework/Paths/SiteHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,82 +8,6 @@ import RouterLogo from '../RouterLogo';




// const PublicSection = styled.div`
// display: flex;
// flex-direction: column;
// padding: 0px 10px 60px 10px;
// margin: 0px;
// row-gap: 30px;
// justify-content: center;
// align-items: center;
// text-align: center;
// background: var(--lightBlue);
// `

// const PrivateSection = styled.div`
// display: flex;
// flex-direction: column;
// padding: 0px 10px 60px 10px;
// margin: 0px;
// row-gap: 30px;
// justify-content: center;
// align-items: center;
// text-align: center;
// background: var(--mainGray);
// `

// const SignInSection = styled.div`
// display: flex;
// flex-direction: column;
// row-gap: 10px;
// margin: 0px;
// justify-content: center;
// align-items: center;
// text-align: center;
// background: var(--mainGray);
// height: calc(100% - 40px);
// `

// const SectionHeading = styled.div`
// display: flex;
// margin: 0px;
// justify-content: center;
// align-items: center;
// text-align: center;
// height: 100px;
// font-size: 18pt;
// `

// export default function SiteHeader(){
// return <div>Site Header<Outlet /></div>
// }

// function Heading(props) {
// let navigate = useNavigate();

// return <div style={{
// display: 'flex',
// flexDirection: 'column',
// justifyContent: 'center',
// alignItems: 'center',
// height: '100px',
// position: 'relative'
// }}>
// <h1 style={{
// lineHeight: '0.1em',
// }}>{props.heading}</h1>
// <h4 style={{
// lineHeight: '0.1em',
// }}> {props.subheading} </h4>
// <div style={{
// position: "absolute",
// bottom: "16px",
// right: "10px"
// }}><Button value="Add Activity" onClick={() => navigate('addActivity')}/></div>
// </div>
// }

const SignInButtonContainer = styled.div`
margin: auto 10px auto 0px;
`
Expand All @@ -98,14 +22,16 @@ const Header = styled.header`
margin: 0;
display: flex;
justify-content: space-between;
border-bottom: 1px solid var(--mainGray);
`;
const HeaderLine = styled.header`
background-color: var(--mainGray);
height: 1px;
width: 100%;
margin: 0;
`;

const Main = styled.main`
margin-top: 40px;
/* padding: 20px; */
overflow-y: scroll;
height: 100vh;
margin: 0;
`;

Expand All @@ -119,15 +45,6 @@ const Branding = styled.span`
font-size: 16px;
`

// const MenuItem = styled.NavLink`
// padding: 8px;
// color: "var(--mainBlue)";
// border-bottom: "2px solid var(--mainBlue)";
// cursor: pointer;
// `

/* border-bottom: 2px solid var(--mainBlue); */

const MenuItem = styled(NavLink)`
padding: 8px;
color: black;
Expand All @@ -139,27 +56,6 @@ const MenuItem = styled(NavLink)`
}
`;

// const activeClassName = 'nav-item-active';

// const MenuItem = styled(NavLink)`
// padding: 8px;
// color: black;
// cursor: pointer;

// &.${activeClassName} {
// color: var(--mainBlue);
// border-bottom: 2px solid var(--mainBlue);
// }
// `;


// const MenuItem = styled.div`
// padding: 8px;
// color: ${props => props.active ? "var(--mainBlue)" : "black"};
// border-bottom: ${props => props.active ? "2px solid var(--mainBlue)" : null};
// cursor: pointer;
// `

const BarMenu = styled.div`
margin: 0px;
display: flex;
Expand Down Expand Up @@ -225,6 +121,7 @@ export default function SiteHeader(props) {
</Header>
<Main>
<TopSpace />
{/* <HeaderLine /> */}
<Outlet context={{signedIn}}/>
</Main>
</>
Expand Down Expand Up @@ -276,6 +173,7 @@ export default function SiteHeader(props) {
</Header>
<Main>
<TopSpace />
{/* <HeaderLine /> */}
<Outlet context={{signedIn}}/>
</Main>
</>
Expand Down
1 change: 1 addition & 0 deletions src/Tools/singlepage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
--lightBlue: hsl(209,54%,82%);
--solidLightBlue: #1a5a99;
--mainGray: #a9a9a9;
--mediumGray: #949494;
--donutBody: #eea177;
--donutTopping: #6d4445;
--mainBorder: 2px solid white;
Expand Down
Loading

0 comments on commit 08e277b

Please sign in to comment.