Skip to content

Commit

Permalink
add overlay (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliadiak authored Aug 12, 2023
1 parent 3e846ee commit c14cc9e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/basecomponents/QuizGame/ImageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const ImageContainer = ({ phrase, onClick, correct, disabled }: ImageContainerPr
>
<button className={'w-full h-full relative'}>
<Image src={phrase.getImageUrl() ?? ''} layout="fill" sizes="33vw" objectFit="cover" alt={phrase.getTranslation(otherLanguage)} />
<div className={'hidden'} />
</button>
</div>
);
Expand Down
24 changes: 22 additions & 2 deletions components/basecomponents/QuizGame/imageStyle.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,29 @@
}

.match {
animation: dance 0.7s, shine 0.7s;
animation: dance 0.7s;
}

.match div:last-child {
display: block;
position: absolute;
top: 0;
width: 100%;
height: 100%;
background: transparent;
animation: shine 0.7s;
}

.dontMatch {
animation: shake 0.7s, shineRed 0.7s;
animation: shake 0.7s;
}

.dontMatch div:last-child {
display: block;
position: absolute;
top: 0;
width: 100%;
height: 100%;
background: transparent;
animation: shineRed 0.7s;
}

0 comments on commit c14cc9e

Please sign in to comment.