Skip to content

Feedback #1

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

Open
wants to merge 34 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
98ecd85
Setting up GitHub Classroom Feedback
github-classroom[bot] Feb 19, 2021
5ab82da
Clean default react code
robcartome Feb 19, 2021
f6c1b7c
Set root with colors in css and add basic components
robcartome Feb 19, 2021
1a9c709
Merge pull request #2 from codeableorg/clean_code
xtrator Feb 19, 2021
2ae4094
Created base for Link Component with a prop for theme
xtrator Feb 19, 2021
f79ce6a
Add style css for component Header and Make component Header
robcartome Feb 19, 2021
4cc109b
Modified height of header
robcartome Feb 19, 2021
d4ced12
Add input search and Add styles for SearchBar
robcartome Feb 19, 2021
018b1d1
Make styles for icon and input of Component SearchBar
robcartome Feb 19, 2021
cc4b09d
Link Component: made some changes that reflected better figma example
xtrator Feb 19, 2021
09c3409
Merge pull request #6 from codeableorg/header
xtrator Feb 19, 2021
462ed92
Merge pull request #8 from codeableorg/Link-component
robcartome Feb 19, 2021
9b9d57e
Solved conflicts in Header
robcartome Feb 19, 2021
899d2ba
Modified import in Link.js why moved Link.css to stylesheets
robcartome Feb 19, 2021
8daa21c
Created Card Component
xtrator Feb 19, 2021
e8c83e1
Merge pull request #9 from codeableorg/search
xtrator Feb 19, 2021
93b7bd6
Merge branch 'main' of github.com:codeableorg/react-ui-w16-team01-rea…
xtrator Feb 19, 2021
e31d49d
Merge pull request #10 from codeableorg/Card-component
robcartome Feb 19, 2021
064ebb7
Add notices to Header and Optimized styles for header
robcartome Feb 19, 2021
bef266a
Merge pull request #12 from codeableorg/notice
xtrator Feb 19, 2021
db2126b
Add store in src
robcartome Feb 20, 2021
abb270e
Add component section in main
robcartome Feb 20, 2021
da1be07
Add export in store
robcartome Feb 20, 2021
d64d261
Merge pull request #14 from codeableorg/store
xtrator Feb 20, 2021
23089cc
Created cards container component
xtrator Feb 20, 2021
778cb81
added hover styles to card component
xtrator Feb 20, 2021
48bb247
Merge pull request #15 from codeableorg/cards-container-component
robcartome Feb 20, 2021
8ced1c8
Show cards with data STORE
robcartome Feb 20, 2021
3ebb0cd
Corrected Cards Container styles: layout now in accordance with figma
xtrator Feb 20, 2021
4c9da64
Merge pull request #17 from codeableorg/cards-container-component
robcartome Feb 20, 2021
2b2ea69
Solved conflicts
robcartome Feb 20, 2021
39bc10b
Merge branch 'main' into test
robcartome Feb 20, 2021
a413bd1
Make filter articles with container in main
robcartome Feb 20, 2021
16ab3b2
Merge pull request #18 from codeableorg/test
xtrator Feb 20, 2021
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
15,314 changes: 15,314 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@fortawesome/react-fontawesome": "^0.1.14",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.2",
"remixicon": "^2.5.0",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
31 changes: 0 additions & 31 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
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`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

49 changes: 29 additions & 20 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
import logo from './logo.svg';
import './App.css';
import React from "react";
import Header from "./components/Header";
import Link from "./components/Link";
import SearchBar from "./components/SearchBar";
import Main from "./components/Main";
/* Fuente */
import Card from "./components/Card";
import Container from "./components/Container";
/* import Main from "./components/Main"; */
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBell, faCommentDots, faUser } from '@fortawesome/free-solid-svg-icons'

function App() {
const App = () => {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<>
<Header className="header" >
<div className="header__nav">
<Link>Inicio</Link>
<Link>Hoy</Link>
<Link>Siguiendo</Link>
</div>
<SearchBar/>
<div className="header__notices">
<FontAwesomeIcon icon={faBell} />
<FontAwesomeIcon icon={faCommentDots} />
<FontAwesomeIcon icon={faUser} />
</div>
</Header>
<Main />
</>
);
}
};

export default App;
8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

15 changes: 15 additions & 0 deletions src/components/Card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styles from "./../stylesheets/Card.css"

const Card = ({className, description, title, size, src,...props}) => {
const sizeClassName = size ? "card--large" : "";
return (
<div className={`card ${className} ${sizeClassName}`}>
<div className='card__gradient'/>
<img src={src} className="card__img"/>
<p className='card__description'>{description}</p>
<h2 className='card__title'>{title}</h2>
</div>
);
};

export default Card;
15 changes: 15 additions & 0 deletions src/components/Container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import styles from "./../stylesheets/Container.css"

export default function Container({title, children, ...props}) {
return (
<div className="container__wrapper">
<div className="container">
<h2 className="container__title">{title}</h2>
<div className="container__cards">
{children}
</div>
</div>
</div>
)
}
12 changes: 12 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "../stylesheets/Header.css";
import 'remixicon/fonts/remixicon.css';

const Header = ({className,children}) => {
return (
<header className={className}>
{children}
</header>
);
};

export default Header;
10 changes: 10 additions & 0 deletions src/components/Link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import "../stylesheets/Link.css"

export default function Link({href, children, ...props}) {
return (
<a className={`link`} href={href}>
{children}
</a>
)
}
54 changes: 54 additions & 0 deletions src/components/Main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import styles from "./../stylesheets/main.css"
import Container from "./Container";
import Card from "./Card";
import { STORE } from "../store";

function dateTitle(date){
var options = { year: 'numeric', month: 'long', day: 'numeric' };
let [a,m,d]= date.split("-");
let dateArticle = new Date(a,m-1,d);
return dateArticle.toLocaleDateString("es-ES", options)
}

const Main = () => {
let dateTitle1 = '2021-02-18';
let dateTitle2 = '2021-02-17';
const title1 = dateTitle(dateTitle1);
const title2 = dateTitle(dateTitle1);


return (
<main className="main">
<Container title={title1}>
{STORE.map((article) => {
if (dateTitle1 == article.date){
return <Card description={article.description}
title = {article.title}
src = {article.img_url}
size ={article.size}
key = {article.title}
/>
}
})}
</Container>
<Container title={title2}>
{STORE.map((article) => {
let [a,m,d]= article.date.split("-");
let dateArticle = new Date(a,m-1,d);
var options = { year: 'numeric', month: 'long', day: 'numeric' };
if (dateTitle2 == article.date){
return <Card description={article.description}
title = {article.title}
src = {article.img_url}
size ={article.size}
key = {article.title}
/>
}

})}
</Container>
</main>
);
};

export default Main;
12 changes: 12 additions & 0 deletions src/components/SearchBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "../stylesheets/SearchBar.css";

const SearchBar = () => {
return (
<div className="searchbar">
<i className="ri-search-line"></i>
<input placeholder="Buscar" />
</div>
);
};

export default SearchBar;
18 changes: 18 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
:root {
--background-body: #FFFFFF;
--background-header: #FFFFFF;
--background-main: #E5E5E5;
--background-search:#EFEFEF;
--button-background-black: #111111;
--color-white: #FFFFFF;
--font-dark: #000000;
--font-dark-gray: #333333;
}

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: var(--background-body);
}

code {
Expand Down
5 changes: 0 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
<React.StrictMode>
Expand All @@ -11,7 +10,3 @@ ReactDOM.render(
document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.

53 changes: 53 additions & 0 deletions src/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const STORE = [
{
title: 'Para dias más productivos',
description: 'Agendas y bullet journals',
date: '2021-02-18',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613786388/image_7_teaj7e.png',
size: '',
},
{
title: 'Para IOS',
description: 'Intereses, el nuevo Widget de Pinterest',
date: '2021-02-18',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613786730/image_2_fhq6jo.png',
size: '',
},
{
title: 'Gafas de Sol',
description: 'Un accesorio que no puede faltar en tu look',
date: '2021-02-18',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613786735/image_1_cyn7va.png',
size: 'large',
},
{
title: 'Un viaje por la arquitectura mexicana',
description: 'Estilo colonial y moderno',
date: '2021-02-17',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613786974/torres_4.png',
size: '',
},
{
title: 'Espejos con mucho estilo para tu casa',
description: 'Ideas para decorar',
date: '2021-02-17',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613787059/decorar_5.png',
size: '',
},
{
title: 'Cómo utilizarla para un mundo mejor',
description: 'Inteligencia Artificial',
date: '2021-02-17',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613787090/ia_6.png',
size: '',
},
{
title: 'Por dias más productivos',
description: 'Agendas y bullet journals',
date: '2021-02-17',
img_url: 'https://res.cloudinary.com/robcar/image/upload/v1613787095/agenda_7.png',
size: '',
},
]

export { STORE };
Loading