Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InspireHome #12

Merged
merged 28 commits into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4d33385
desktop view ready inshallah
bahaadabbagh Jul 19, 2020
850a2dc
added Media Query
bahaadabbagh Jul 19, 2020
cb469c7
after installing i18n
bahaadabbagh Jul 19, 2020
26eaf00
added test file and configured translations from props
bahaadabbagh Jul 20, 2020
baa2e16
deleted media queries + px=>rem
bahaadabbagh Jul 20, 2020
67b6cf2
ran prettier
bahaadabbagh Jul 20, 2020
5755b92
Normalize all the line endings
bahaadabbagh Jul 20, 2020
4d7e5ef
fixed prettier issue
bahaadabbagh Jul 20, 2020
a25a13c
deleted bootstrap link in .html
bahaadabbagh Jul 21, 2020
586fb2d
resolved conflict and added circleCI
bahaadabbagh Jul 22, 2020
c8f9c0e
after tests of CircleCI and megring with dev
bahaadabbagh Jul 22, 2020
c0ff5af
fixed classNames and fixed line breaks to be reponsive instead of <br/>
bahaadabbagh Jul 22, 2020
e2dbf2b
remved font family and added a snapshot test
bahaadabbagh Jul 23, 2020
ced3f95
fixed tests to be snapshot and removed an extra line
bahaadabbagh Jul 23, 2020
a08b730
Merge branch 'dev' into inspire_home
bahaadabbagh Jul 23, 2020
b9eddbd
resolved conflicts and deleted extra space
bahaadabbagh Jul 23, 2020
e4497c5
Merge branch 'inspire_home' of https://github.com/ReCoded-Org/capston…
bahaadabbagh Jul 23, 2020
4570b16
fixed issue in package.json because test was failing in circleci
bahaadabbagh Jul 23, 2020
50b0295
deleted extra test
bahaadabbagh Jul 23, 2020
c5f3b5c
deleted one extra space after button
bahaadabbagh Jul 23, 2020
b2df6ca
fixed snapshot
bahaadabbagh Jul 23, 2020
4923269
fixed .prettierrc and added command to script to process snapshot
bahaadabbagh Jul 24, 2020
2642dd0
Merge branch 'dev' into inspire_home
bahaadabbagh Jul 24, 2020
2dbd1c0
fixed file name Home.jsx
bahaadabbagh Jul 24, 2020
8f89651
a step of fixing conflicts
bahaadabbagh Jul 24, 2020
cda56fc
Saving files before refreshing line endings
bahaadabbagh Jul 24, 2020
769c16f
fixed merge conflicts inshallah
bahaadabbagh Jul 24, 2020
cb6b2f9
fixing circle ci test
bahaadabbagh Jul 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"bootstrap": "^4.5.0",
"firebase": "^7.16.0",
"i18next": "^19.6.2",
"i18next-browser-languagedetector": "^5.0.0",
"react": "^16.13.1",
"react-bootstrap": "^1.2.2",
"react-dom": "^16.13.1",
"react-i18next": "^9.0.10",
"react-i18next": "^11.7.0",
"react-scripts": "3.4.1"
},
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous"
/>
<title>React App</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';

import Home from './containers/home/Home'
function App() {
bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
return (
<div className="App">

<Home/>
bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
</div>
);
}
Expand Down
35 changes: 35 additions & 0 deletions src/components/inspire/Inspire.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

.inspireHome{
font-family: 'Roboto', sans-serif;
text-align: center;
}
.inspireHeader{
bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
font-size: 2.875rem;
}
.pinkSpanInspire{
color: #E87A80;
}
.purpleSpanInspire{
color: #6C567C;
}
.greyParaInspire{
color: #4A474D;
font-size: 1.875rem;
}
.inspireButton{
background-color: #6c567b;
color: white;
font-family: "Roboto";
bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
cursor: pointer;
width: 18.75rem;
height: 6.25rem;
font-size: 3.75rem;
border-radius: 3.125rem;
border-style: hidden;
box-shadow: 0 0.6875rem 1.5rem -0.4375rem #b3b3b3;
}
.inspireButton:hover{
background-color: #f8b195;
}
18 changes: 18 additions & 0 deletions src/components/inspire/Inspire.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import './Inspire.css'
import Button from 'react-bootstrap/Button';


export default function Inspire(props) {

return (
<div className='inspireHome'>
<h2 className="inspireHeader"><span className="purpleSpanInspire">{props.header1}</span> <span className="pinkSpanInspire">{props.header2}</span><span className="purpleSpanInspire">{props.header3}</span> <span className="pinkSpanInspire">{props.header4}</span></h2>
bahaadabbagh marked this conversation as resolved.
Show resolved Hide resolved
<p className="greyParaInspire"> {props.par1} <br />
{props.par2} <br />
{props.par3}</p>
<Button className="inspireButton">{props.button}</Button>{' '}

</div>
)
}
8 changes: 8 additions & 0 deletions src/components/inspire/Inspire.test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from "react";
import ReactDOM from "react-dom";
import Inspire from "./Inspire";

it("renders with no crash", () => {
const div = document.createElement("div");
ReactDOM.render(<Inspire />, div)
});
22 changes: 22 additions & 0 deletions src/containers/home/home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import Inspire from '../../components/inspire/Inspire';
import { useTranslation } from 'react-i18next';

export default function Home() {
const { t } = useTranslation();

return (
<div>
<Inspire
header1={t('home.inspire.header.header1')}
header2={t('home.inspire.header.header2')}
header3={t('home.inspire.header.header3')}
header4={t('home.inspire.header.header4')}
par1={t('home.inspire.paragraph.par1')}
par2={t('home.inspire.paragraph.par2')}
par3={t('home.inspire.paragraph.par3')}
button={t('home.inspire.button')}
/>
</div>
)
}
20 changes: 19 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
{}

{
"home": {
"inspire":{
"header":{
"header1":"Give hope.",
"header2":"Inspire.",
"header3":"Change lives.",
"header4":"Share your story today"
},
"paragraph":{
"par1":"YOU have a powerful story to share. Your story can help women and girls",
"par2":"around the world. Please help build our inspiring collection of stories by",
"par3":"sharing some aspects of your journey to empowerment"
},
"button":"Share"
}
}
}
Loading