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

Feature/buttons carrousel #25

Merged
merged 8 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
7 changes: 4 additions & 3 deletions src/components/marvel-characters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export default function MarvelCharacters({ addToFavorites }) {
const randomCharacters = data.data.results.sort(() => Math.random() - 1);
setMarvelCharacter(randomCharacters);
})
// eslint-disable-next-line no-console
.catch((err) => console.error(err));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [MarvelCharacters]);

const handleAddToFavorites = (character) => {
Expand Down Expand Up @@ -62,6 +64,7 @@ export default function MarvelCharacters({ addToFavorites }) {
.then((data) => {
setComics(data.data.results);
})
// eslint-disable-next-line no-console
.catch((err) => console.error(err));
};

Expand All @@ -85,9 +88,7 @@ export default function MarvelCharacters({ addToFavorites }) {
<div className='characters-comics'>
<div className='pagination'>
<button onClick={handlePrev}>prev</button>
<button onClick={handleNext} disabled={(currentPage + 1) * charactersPerPage >= marvelCharacter.length}>
next
</button>
<button onClick={handleNext}>next</button>
</div>
<div className='grid-box'>
{displayedCharacters.map((character) => (
Expand Down
3 changes: 2 additions & 1 deletion src/components/profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ export default function Profile({ characterMarvel, img, title, description, comi
<div className='image-containe'>
<img src={img} alt={characterMarvel} />
<h2>{characterMarvel}</h2>
<h3>{title} </h3>
</div>
<div className='bio'>
<h3>
{' '}
<strong>Bio :</strong>
</h3>
<p>{description}</p>
<p>{description ? description : 'Description not avalable'}</p>
</div>
</div>
<div className='comics-section'>
Expand Down
1 change: 1 addition & 0 deletions src/pages/favorite-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function FavoritePage({ favorites }) {
.then((data) => {
setComics(data.data.results.filter((comic) => comic.description));
})
// eslint-disable-next-line no-console
.catch((err) => console.error(err));
};

Expand Down
2 changes: 1 addition & 1 deletion src/style/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
width: 150px;

border: solid, $text-color;
background-color: black;
background-color: $background-card;
opacity: 85%;
height: 70px;
// margin-top: 10px;
Expand Down
10 changes: 5 additions & 5 deletions src/style/characters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
align-items: center;
width: 100%;
padding: 30px 0;
background-color: white;
background-color: $text-color;
z-index: 200;
}

Expand Down Expand Up @@ -58,7 +58,7 @@
align-items: center;
border:
solid 4px,
white;
$text-color;
border-radius: 8px;
cursor: pointer;

Expand All @@ -72,7 +72,7 @@
.character-img {
width: 150px;
height: 150px;
border: solid 4px white;
border: solid 4px $text-color;
border-radius: 8px;
}
.character-title {
Expand All @@ -81,7 +81,7 @@
align-items: center;
margin: 0 auto;
width: 150px;
border: solid, white;
border: solid, $text-color;
background-color: black;
opacity: 85%;
height: 70px;
Expand All @@ -90,7 +90,7 @@
}

h2 {
color: white;
color: $text-color;
text-align: center;
font-size: 0.7em;
font-family: $font-family;
Expand Down
26 changes: 15 additions & 11 deletions src/style/comics-display.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
@use 'settings.scss' as *;

.comics-display {
font-family: $font-family;
color: $text-color;
display: grid;
grid-template-columns: 1fr 1fr;
// justify-content: center;
height: 76svh;
background-color: $background-comics;
font-family: 'Aclonica', sans-serif;
color: #f4f4f4;
display: flex;
justify-content: space-around;
align-items: center;
gap: 12%;
background-color: rgba(0, 0, 0, 0.5);
max-width: 1000px;
margin: 0.4% auto;
overflow: hidden;
// transition: all 0.3sease;

//mobile
@media (max-width: 768px) {
flex-wrap: wrap;
gap: 10px;
}

.comics-img {
width: 67%;
Expand All @@ -24,8 +29,7 @@
border-radius: 0.5rem;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
border-radius: 2.5rem;
border: 2px solid red;
margin: 1rem;
border: 1px solid $text-color;
}
}

Expand All @@ -34,7 +38,7 @@
flex-direction: column;
justify-content: left;
width: 80%;
margin: 2.5rem 0;
padding: 2rem;
height: 83%;
gap: 2.5rem;

Expand Down
31 changes: 14 additions & 17 deletions src/style/comics-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
top: 10px;

button {
background-color: #670208;
background-color: $primary-color;
border: none;
color: white;
color: $text-color;
padding: 10px 20px;
border-radius: 5px;
font-size: 1em;
Expand All @@ -23,20 +23,17 @@
}
}
.typo-comics {
background-color: #670208;
font-family: 'Aclonica', sans-serif;
padding-top: 60px;
background-color: $primary-color;
font-family: $font-family;
width: 140px;
font-size: 18px;
padding: 14px;
border-radius: 10px;
margin-left: 157px;
color: white;
box-shadow: 0px 2px 6px black;
align-items: center;
justify-content: center;
text-shadow: 3px 2px 8px black;
display: flex;
color: $text-color;
text-align: center;
box-shadow: 0px 2px 6px $background-card;
text-shadow: 3px 2px 8px $background-card;
}
}
.comics {
Expand All @@ -61,7 +58,7 @@
font-weight: 700;
font-size: 1.2em;
text-transform: lowercase;
color: black;
color: $background-card;
}

.comic-card {
Expand All @@ -74,7 +71,7 @@
text-decoration: none;
border:
solid 4px,
white;
$text-color;
border-radius: 8px;

.caption {
Expand All @@ -83,9 +80,9 @@
flex-wrap: wrap;
justify-content: center;
align-items: center;
color: white;
color: $text-color;
text-align: center;
background-color: #0000004b;
background: $background-card;
height: 100%;

&.bottom {
Expand All @@ -94,7 +91,7 @@
left: 50%;
transform: translateX(-50%);
opacity: 0;
color: white;
color: $text-color;
text-decoration: underline;
width: 60%;
}
Expand All @@ -103,7 +100,7 @@
&:hover {
cursor: pointer;
filter: grayscale(0);
box-shadow: 6px 6px black;
box-shadow: 6px 6px $background-card;
transform: translate(-2px, -2px);

.caption {
Expand Down
10 changes: 5 additions & 5 deletions src/style/comics.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
text-decoration: none;
border:
solid 4px,
white;
$text-color;
border-radius: 8px;

.comics-title {
Expand All @@ -28,17 +28,17 @@
flex-wrap: wrap;
justify-content: center;
align-items: center;
color: white;
color: $text-color;
text-align: center;
background-color: #0000004b;
background-color: $background-card;
height: 100%;

h3 {
font-family: $font-family;
font-weight: 700;
font-size: 1em;
text-transform: lowercase;
color: white;
color: $text-color;
:hover {
transition: all 0.2s linear;
}
Expand All @@ -48,7 +48,7 @@
&:hover {
cursor: pointer;
filter: grayscale(0);
box-shadow: 6px 6px black;
box-shadow: 6px 6px $background-card;
transform: translate(-2px, -2px);
transition: all 0.2s linear;

Expand Down
12 changes: 6 additions & 6 deletions src/style/favorite-page.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
@use 'settings.scss' as *;
.favorite {
padding-top: 20px;
padding-left: 20px;
padding: 20px 0 0 20px;

.favor {
display: none;
}

.typo {
background-color: #670208;
background: $primary-color;
font-family: 'Aclonica', sans-serif;
padding-top: 60px;
width: 240px;
font-size: 16px;
padding: 14px;
border-radius: 10px;
margin-left: 160px;
color: white;
box-shadow: 0px 2px 6px black;
color: $text-color;
box-shadow: 0px 2px 6px $background-card;
align-items: center;
text-shadow: 3px 2px 8px black;
text-shadow: 3px 2px 8px $background-card;
}
}
3 changes: 2 additions & 1 deletion src/style/footer.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use 'settings' as *;

.footer {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -41,7 +42,7 @@
font-size: clamp(16px, 2vw, 20px);
text-decoration: none;
list-style-type: none;
color: white;
color: $text-color;
padding: 5px 10px;

@media screen and (min-width: 301px) and (max-width: 644px) {
Expand Down
2 changes: 1 addition & 1 deletion src/style/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
right: 0;
bottom: 0;
z-index: 1000;
background: rgba(0, 0, 0, 0.5);
background: $background-comics;

.modal-content {
padding: 0 20px;
Expand Down
8 changes: 4 additions & 4 deletions src/style/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
gap: 40px;

.my-link {
color: white;
color: $text-color;
text-decoration: none;
display: flex;
}
Expand All @@ -35,7 +35,7 @@
display: flex;
align-items: center;
font-size: 22px;
color: white;
color: $text-color;
font-family: $font-family;
margin-left: 20px;
}
Expand All @@ -56,11 +56,11 @@
background-color: transparent;
font-size: 20px;
width: 140px;
color: white;
color: $text-color;
}

input::placeholder {
color: white;
color: $text-color;
}

input:focus {
Expand Down
Loading