Skip to content

Commit 90bc79d

Browse files
committed
[ADD]πŸš€ animate.css added
1 parent 650a216 commit 90bc79d

File tree

5 files changed

+36
-5
lines changed

5 files changed

+36
-5
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Gif Expert App
22

3+
- [Developers Giphy][giphy]
4+
- [Animate CSS][animate_css]
35
- [Estructura de archivos][structure]
46
- [Structuring projects and naming components in React][structuring-projects-and-naming-components]
57

68
[structure]: https://es.reactjs.org/docs/faq-structure.html
79
[structuring-projects-and-naming-components]: https://hackernoon.com/structuring-projects-and-naming-components-in-react-1261b6e18d76
10+
[giphy]: https://developers.giphy.com/
11+
[animate_css]: https://animate.style/
812

913
### Install
1014

@@ -21,12 +25,23 @@
2125
β”œβ”€β”€ package.json
2226
β”œβ”€β”€ src
2327
β”‚Β Β  β”œβ”€β”€ GifExpertApp.js
28+
β”‚Β Β  β”œβ”€β”€ components
29+
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ AddCategory.js
30+
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ GifGrid.js
31+
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ GifGridItem.js
32+
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ListCategories.js
33+
β”‚Β Β  β”‚Β Β  └── index.js
34+
β”‚Β Β  β”œβ”€β”€ helpers
35+
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ getGifs.js
36+
β”‚Β Β  β”‚Β Β  └── index.js
37+
β”‚Β Β  β”œβ”€β”€ hooks
38+
β”‚Β Β  β”‚Β Β  └── useFetchGifs.js
2439
β”‚Β Β  β”œβ”€β”€ index.css
2540
β”‚Β Β  β”œβ”€β”€ index.js
2641
β”‚Β Β  └── setupTests.js
2742
└── yarn.lock
2843

29-
1 directory, 9 files
44+
4 directories, 17 files
3045
```
3146

3247
### Scripts
@@ -39,3 +54,8 @@
3954

4055
> run `docker-compose run app yarn test`
4156
57+
#### Build
58+
59+
> run `docker-compose run app yarn build`, install `yarn global http-server` to test.
60+
> run `http-server build`
61+

β€Žpublic/index.htmlβ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<link
28+
rel="stylesheet"
29+
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css"
30+
/>
31+
<title>Gif Expert App</title>
2832
</head>
2933
<body>
3034
<noscript>You need to enable JavaScript to run this app.</noscript>

β€Žsrc/components/GifGrid.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const GifGrid = ({category}) => {
99

1010
return(
1111
<div className="card-grid">
12-
<h3>{category}</h3>
13-
{ loading && <p>Loading</p> }
12+
<h3 className="animate__animated animate__fadeIn">{category}</h3>
13+
{ loading && <p className="loading animate__animated animate__flash">Loading</p> }
1414
{
1515
gifs.map(gif => (
1616
<GifGridItem

β€Žsrc/components/GifGridItem.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
const GifGridItem = ({url, title}) => {
44
return (
5-
<div className="card">
5+
<div className="card animate__animated animate__fadeIn">
66
<img src={url} alt={title} />
77
<p>{title}</p>
88
</div>

β€Žsrc/index.cssβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ img {
2828
text-align: center;
2929
}
3030

31+
.card-grid .loading {
32+
font-size: 1.5rem;
33+
font-weight: 700;
34+
flex: 0 1 100%;
35+
text-align: center;
36+
}
37+
3138
.card {
3239
display: flex;
3340
flex-direction: column;

0 commit comments

Comments
Β (0)