Skip to content

Commit

Permalink
Merge branch 'staging' into sub-display
Browse files Browse the repository at this point in the history
  • Loading branch information
paridhikhaitan authored Feb 5, 2020
2 parents 95a1c8c + 09c7f6c commit ee442df
Show file tree
Hide file tree
Showing 20 changed files with 586 additions and 158 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@d4sd/components": "^2.7.18",
"@react-pdf/renderer": "^1.6.8",
"@types/dompurify": "^2.0.1",
"@d4sd/components": "^3.0.11",
"@types/jest": "^24.0.20",
"@types/node": "^12.11.7",
"@types/react": "^16.9.11",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="stylesheet" href="reset.css" />
<link rel="stylesheet" href="/reset.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.css">
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
38 changes: 17 additions & 21 deletions src/assets/content.js → src/assets/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ import climate4 from './img/climate_community.jpg';
import sponsors_designlab from './img/sponsors_designlab.svg';
import sponsors_yankelovich from './img/sponsors_yankelovich.png';
import sponsors_ibm from './img/sponsors_ibm.svg';
import sponsors_nsf from './img/sponsors_nsf.png';


/** ***********************************Home content************************************** */
export const homeContent = {
Expand Down Expand Up @@ -519,11 +521,10 @@ export const workspaceContent = {
isAction1: true,
isAction2: true,
link1:
"https://join.slack.com/t/d4sd/shared_invite/enQtMjExMjA5MDY0MjkzLTk3NjY4NGM3MTE0N2M1NTJjODAxMGRiMDgxNmQ4ZDk1NTU4Mzk0OThjMTdkMzc0NTJmY2M1ZmNkZDA3NTdjYTU",
link2: "/challenges",
target: "_blank",
img: "timeline_discover",
shortDesc: "Problem discovery is perhaps the most important part of the..."
'https://join.slack.com/t/d4sd/shared_invite/enQtMjExMjA5MDY0MjkzLTk3NjY4NGM3MTE0N2M1NTJjODAxMGRiMDgxNmQ4ZDk1NTU4Mzk0OThjMTdkMzc0NTJmY2M1ZmNkZDA3NTdjYTU',
link2: '/challenges',
target: '_blank',
img: 'timeline_discover'
},
{
stage: 'Share your Ideas and Find a Team',
Expand All @@ -539,25 +540,21 @@ export const workspaceContent = {
'https://join.slack.com/t/d4sd/shared_invite/enQtMjExMjA5MDY0MjkzLTk3NjY4NGM3MTE0N2M1NTJjODAxMGRiMDgxNmQ4ZDk1NTU4Mzk0OThjMTdkMzc0NTJmY2M1ZmNkZDA3NTdjYTU',
isAction1: true,
isAction2: true,
img: "timeline_ideate",
shortDesc: "Collaboration is essential for truly innovative design work..."
img: 'timeline_ideate'
},
{
stage: 'Propose Concepts for Community Feedback',
date: 'BY FEB 14',
detail:
"Your team will have the opportunity to get early feedback from members of the San Diego community on your initial concepts. Community feedback can be particularly valuable as these stakeholders will likely have a sense of what’s feasible and desirable in solutions to address key civic issues. To participate in community feedback, register and submit your team’s preliminary concepts here in the D4SD Workspace by Feb 15th. The preliminary submission must include a description of the problem and proposal, details about your team, and questions for feedback providers to answer about your concept.",
action1: "Start",
state1: "inactive",
action2: "Register your team",
state2: "inactive",
note: "Registration will open on JAN 6",
startDate: new Date("12/20/2019, 11:59:00 PM"),
dueDate: new Date("02/03/2020, 11:59:00 PM"),
'Your team will have the opportunity to get early feedback from members of the San Diego community on your initial concepts. Community feedback can be particularly valuable as these stakeholders will likely have a sense of what’s feasible and desirable in solutions to address key civic issues. To participate in community feedback, register and submit your team’s preliminary concepts (details coming soon). The preliminary submission must include a description of the problem and proposal, details about your team, and questions for feedback providers to answer about your concept.',
action1: 'Sign up for D4SD',
state1: 'inactive',
action2: 'Register your team',
state2: 'inactive',
note: 'Registration will open on JAN 6',
isAction1: true,
isAction2: false,
img: "timeline_prototype",
shortDesc: "Your team will have the opportunity to get feedback from..."
img: 'timeline_prototype'
},
{
stage: 'Submit Final Proposals for the D4SD Summit ',
Expand All @@ -571,8 +568,7 @@ export const workspaceContent = {
note: 'Registration will open on JAN 6',
isAction1: true,
isAction2: false,
img: "timeline_pitch",
shortDesc: "How will the public react to your proposal? ..."
img: 'timeline_pitch'
},
{
stage: 'Create Alliances to Support your Proposal',
Expand All @@ -586,8 +582,7 @@ export const workspaceContent = {
note: 'Registration will open on JAN 6',
isAction1: true,
isAction2: false,
img: "timeline_activate",
shortDesc: "Attend the D4SD Summit and create an alliance to advance..."
img: 'timeline_activate'
}
]
};
Expand Down Expand Up @@ -736,5 +731,6 @@ export const sponsorsContent = {
img1: sponsors_designlab,
img2: sponsors_yankelovich,
img3: sponsors_ibm,
img4: sponsors_nsf,

}
Binary file added src/assets/img/sponsors_nsf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions src/components/copy-url/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import {
Button, Row, Icon
} from '@d4sd/components';
import './style.less';

interface PrelimFinishCardIF {
setSubmitStep(step: string): void;
}

const CopyURL = (props: {link: string}): JSX.Element => {
// eslint-disable-next-line
// eslint-disable-next-line
const [linkToFeedback, setLinkToFeedback] = useState(props.link);
/* eslint-disable */
const setURL = (): void => {
const inputField = document.getElementById('copyLink');
// @ts-ignore
inputField.value = linkToFeedback;
};

const copyURL = (): void => {
const copyText = document.getElementById('copyLink');
// @ts-ignore
copyText.select();
// @ts-ignore
copyText.setSelectionRange(0, 99999);
document.execCommand('copy');
};
/* eslint-enable */

useEffect(() => {
setURL();
// eslint-disable-next-line
}, []);
const history = useHistory();
// call setLinkToFeedback("NEW LINK") and setURL() to update links.

return (
<div className="Copy-Container">
<input className="copy-link" id="copyLink" />
<Button
className="copy-btn" type="primary-outline" size="small"
onClick={(): void => { copyURL(); }}
>
COPY URL
</Button>
</div>
);
};
export default CopyURL;
31 changes: 31 additions & 0 deletions src/components/copy-url/style.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@import '../../styles/vars.less';
@import '../../styles/mixins.less';
.Copy-Container {
display: flex;
width: 600px;
max-width: 90%;
margin: auto;
.copy-link {
display: inline-block;
vertical-align: middle;
border: 2px solid @b3;
border-radius: 10px 0px 0px 10px;
border-right-width: 0px;
line-height: 50px;
font-size: 14px;
height: 50px;
height: 50px;
padding: 0 18px;
flex-grow: 1;
span {
top: -1px;
position: relative;
}
}
.d4sdbutton {
display: inline;
// width: auto;
vertical-align: middle;
border-radius: 0px 10px 10px 0px;
}
}
67 changes: 67 additions & 0 deletions src/components/layouts/community-feedback-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import React, { useState } from 'react';
import {
Row, Steps, Header, FeedbackActionCard
} from '@d4sd/components';
import Menubar from '../../menubar/index';
import CopyURL from '../../copy-url';
import './style.less';
import FeedbackCard from '../../preliminarysubmission-cards/feedback';

const { Step } = Steps;

const cardJson = {
cards: [
{
name: 'Jane Doe',
dateBack: new Date('1988-03-21'),
feedbacklink: 'http://google.com/'
},
{
name: 'Jane Doe',
dateBack: new Date('1988-03-21'),
feedbacklink: 'http://google.com/'
}
]
};

const CommunityFeedbackLayout = (): JSX.Element => {
const [linkToFeedback, setLinkToFeedback] = useState('LINK TO FEEDBACK');
// signupStep
return (
<div>
<Menubar />
<div className="CommunityFeedbackLayout">
<Header
title="Community Feedback"
back="Back to workspace"
handleBackClick={undefined}
/>

<div className="content">
<Row className="row">
<p>
Share the link below to more people to if you want to get more
feedback:
</p>
</Row>
<Row className="row">
<CopyURL link={linkToFeedback} />
</Row>
<Row className="row">
<p>
Click each card to view feedback on your project. This feedback
could be from the D4SD community network, or from your friends and
colleagues. Please provide a rating on each point of feedback so
that we can improve the system.
</p>
</Row>
</div>
<div className="feedback">
{ cardJson.cards.map((data) => <FeedbackActionCard card={data} />)}
</div>
</div>
</div>
);
};

export default CommunityFeedbackLayout;
20 changes: 20 additions & 0 deletions src/components/layouts/community-feedback-layout/style.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import '../../../styles/vars.less';
@import '../../../styles/mixins.less';
.CommunityFeedbackLayout {
margin-top: @tab-height;
overflow: hidden;

.feedback {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 5vh;
}

.content {
padding: @margin-base-1 @margin-base*6;
.row {
margin-top: @margin-base * 2;
}
}
}
34 changes: 24 additions & 10 deletions src/components/layouts/sponsors-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
import {
Row, Col, Button
} from '@d4sd/components';
import { Row, Col, Button } from '@d4sd/components';
import Header from '../../Header/index';
import Footer from '../../Footer/index';
import '../../../styles/containers.less';
Expand All @@ -27,10 +25,7 @@ const SponsorsLayout = (): JSX.Element => (
target="_blank"
rel="noopener noreferrer"
>
<Button
type="primary"
size="medium"
>
<Button className="spon" type="primary" size="medium">
REACH OUT TO SPONSOR US
</Button>
</a>
Expand All @@ -43,13 +38,32 @@ const SponsorsLayout = (): JSX.Element => (
<br />
<Row type="flex" justify="center" gutter={[48, 24]}>
<Col md={8} xs={18}>
<img src={sponsorsContent.img1} style={{ width: '100%' }} alt="designlab" />
<img
src={sponsorsContent.img1}
style={{ width: '100%' }}
alt="designlab"
/>
</Col>
<Col md={8} xs={18}>
<img src={sponsorsContent.img2} style={{ width: '100%' }} alt="yankelovich" />
<img
src={sponsorsContent.img2}
style={{ width: '100%' }}
alt="yankelovich"
/>
</Col>
<Col md={8} xs={18}>
<img src={sponsorsContent.img3} style={{ width: '70%' }} alt="ibm" />
<img
src={sponsorsContent.img3}
style={{ width: '70%' }}
alt="ibm"
/>
</Col>
<Col md={8} xs={18}>
<img
src={sponsorsContent.img4}
style={{ width: '70%' }}
alt="nsf"
/>
</Col>
</Row>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/components/layouts/sponsors-layout/style.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.section {
.spon {
margin-bottom: 5vh;
}
h4 {
color: #4497ff;
font-weight: 650;
Expand Down
Loading

0 comments on commit ee442df

Please sign in to comment.