Skip to content

Commit

Permalink
Added black fading block to the left of pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
sajochems committed Dec 4, 2023
1 parent e23e0f2 commit 1168cc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/components/photos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ export const Photos: FunctionalComponent = () => {
return (
<section class={style.photos}>
<h2>Photos</h2>
<p>
Take a look at a previous edition to get an impression of the event.
</p>
<div
ref={gallery}
class={style.gallery}
onClick={() => (shouldAnimate.current = false)}
>
<div class={style.block}></div>

{photosMap.map((url) => (
<Photo url={url} />
))}
Expand Down
18 changes: 16 additions & 2 deletions src/components/photos/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,23 @@
}
}

.block {
position: absolute;
margin-top: -120px;
margin-left: 120px;
display: block;
width: 260px;
height: 500px;
background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.00) 50%);
z-index: 2;
transform: rotate(-90deg);
}


.gallery {
display: flex;
overflow-x: scroll;
gap: 12px;
gap: 8px;
scrollbar-width: auto;
scrollbar-color: $primary-color $background-color;

Expand All @@ -38,6 +51,8 @@
&::-webkit-scrollbar-thumb {
background-color: $primary-color;
}


}

.image {
Expand All @@ -47,7 +62,6 @@
height: 260px;
width: 400px;
object-fit: cover;
border-radius: 6px;
}
}

Expand Down

0 comments on commit 1168cc0

Please sign in to comment.