Skip to content

Commit

Permalink
feat: added style for 'change image'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahas001 committed May 28, 2024
1 parent 85c7637 commit bed4280
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
20 changes: 15 additions & 5 deletions Frontend/src/Components/UploadForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,25 @@ export default function UploadForm({ image, onPress }: Props) {
hover:outline-1
transition-all
overflow-hidden
relative
hover-text-overlay
`}
>
{image && image.data
? (
<img
src={image.data}
alt="Uploaded"
className="object-fit h-full custom-scale"
/>
<>
<img
src={image.data}
alt="Uploaded"
className="object-fit h-full custom-scale"
title="Change Image"
/>
<div className="absolute inset-0 bg-gray-900 bg-opacity-50 flex items-center justify-center opacity-0 hover-text transition-opacity duration-300 ">
<h1 className="text-white text-[41px] font-[900]">
Change Image
</h1>
</div>
</>
)
: (
<>
Expand Down
26 changes: 15 additions & 11 deletions Frontend/src/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
.container-full {
height: calc(100vh - 16px - 56px);
height: calc(100vh - 16px - 56px);
}

.transition-outline {
transition: 200ms outline linear;
transition: 200ms outline linear;
}

.transite-width {
transition: 200ms width linear;
transition: 200ms width linear;
}

.custom-scale {
transition: 200ms scale linear;
object-fit: cover;
&:hover {
scale: 1.1;
}
transition: 200ms scale linear;
object-fit: cover;
&:hover {
scale: 1.1;
}
}

.shadow-card {
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.31);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.31);
}

::-webkit-scrollbar {
width: 0;
}
width: 0;
}

.hover-text-overlay:hover .hover-text {
opacity: 1;
}
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
client:
cd Frontend && npm run dev


server:
python3 Backend/main.py

.PHONY: client
.PHONY: client server
Binary file added uploads/GGykm3waYAA2oeg.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/agricultural-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uploads/agro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bed4280

Please sign in to comment.