-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from vevcom/feat/committee-page
Feat/committee page
- Loading branch information
Showing
30 changed files
with
724 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
src/app/_components/CommitteeCard/CommitteeCard.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
@use "@/styles/ohma"; | ||
|
||
$padding: 1.5em; | ||
$imageHeight: 175px; | ||
$contentHeight: 50px; | ||
$height: $imageHeight + $contentHeight; | ||
|
||
$background: lighten(ohma.$colors-secondary, 15%); | ||
$textBoxTransparency: 60%; | ||
$textColor: ohma.$colors-gray-900; | ||
$textUnderlineColor: ohma.$colors-secondary; | ||
$textBoxBackgroundColor: ohma.$colors-white; | ||
|
||
.CommitteeCard { | ||
width: 100%; | ||
aspect-ratio: 1/1; | ||
border-radius: 50%; | ||
padding: 0px; | ||
position: relative; | ||
color: inherit; | ||
text-decoration: none; | ||
display: block; | ||
background-color: $background; | ||
isolation: isolate; | ||
overflow: hidden; | ||
box-shadow: ohma.$colors-gray-800 0 0 10px; | ||
@include ohma.screenMobile { | ||
width: 100%; | ||
} | ||
|
||
&:hover { | ||
@include ohma.screenMobile { | ||
scale: 1; | ||
} | ||
scale: 1.1; | ||
transition-duration: 0.3s; | ||
|
||
> .image { | ||
@include ohma.screenMobile { | ||
scale: 1; | ||
} | ||
scale: 1.1; | ||
transition: scale 0.3s; | ||
} | ||
|
||
> .content { | ||
@include ohma.screenMobile { | ||
background-color: rgba($textBoxBackgroundColor, 60%); | ||
box-shadow: ohma.$colors-secondary 0 0 40px; | ||
padding-top: $padding | ||
} | ||
background-color: rgba($textBoxBackgroundColor, 0%); | ||
box-shadow: ohma.$colors-secondary 0 0 0px; | ||
padding-top: 10px; | ||
|
||
> h2 { | ||
@include ohma.screenMobile { | ||
opacity: 100%; | ||
} | ||
opacity: 0%; | ||
} | ||
} | ||
} | ||
|
||
> .image { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 1; | ||
transition: scale 0.3s; | ||
|
||
> * { | ||
width: 100% !important; | ||
height: 100%; | ||
object-fit: cover; | ||
|
||
img { | ||
width: 100% !important; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
} | ||
|
||
&::after { | ||
content: ''; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: radial-gradient(ellipse at center top, transparent 40%, $background 70%, $background 100%); | ||
scale: 1.5 1; | ||
z-index: 0; | ||
} | ||
} | ||
|
||
> .content { | ||
z-index: 2; | ||
position: absolute; | ||
border-radius: calc(ohma.$cardRounding - $padding); | ||
background-color: rgba($textBoxBackgroundColor, $textBoxTransparency); | ||
width: 100%; | ||
padding: $padding; | ||
bottom: 5%; | ||
height: $contentHeight; | ||
box-shadow: ohma.$colors-secondary 0 0 40px; | ||
color: $textColor; | ||
transition: 0.3s; | ||
overflow: hidden; | ||
|
||
> h2 { | ||
opacity: 100%; | ||
text-align: center; | ||
text-decoration-color: $textUnderlineColor; | ||
margin-bottom: ohma.$gap; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import styles from './CommitteeCard.module.scss' | ||
import Image from '@/components/Image/Image' | ||
import Link from 'next/link' | ||
import type { Image as ImageT } from '@prisma/client' | ||
import type { ReactNode } from 'react' | ||
|
||
type PropTypes = { | ||
image: ImageT | null, | ||
title: string, | ||
children?: ReactNode, | ||
href: string | ||
} | ||
|
||
export default function CommitteeCard({ image, title, children, href }: PropTypes) { | ||
return ( | ||
<Link href={href} className={styles.CommitteeCard}> | ||
<div className={styles.image}> | ||
{ | ||
image && ( | ||
<Image width={240} image={image} /> | ||
) | ||
} | ||
</div> | ||
<div className={styles.content}> | ||
<h2>{title}</h2> | ||
{children} | ||
</div> | ||
</Link> | ||
) | ||
} |
97 changes: 97 additions & 0 deletions
97
src/app/_components/CommitteeImage/CommitteeImage.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
@use "@/styles/ohma"; | ||
|
||
$background: lighten(ohma.$colors-secondary, 15%); | ||
|
||
.CommitteeImage { | ||
position: relative; | ||
width: 100vw; | ||
height: 300px; | ||
overflow: hidden; | ||
box-shadow: ohma.$colors-secondary 0 0 75px; | ||
margin-bottom: 3rem; | ||
@include ohma.screenMobile { | ||
height: 150px; | ||
animation: none; | ||
} | ||
|
||
.image { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 275px; | ||
object-fit: cover; | ||
z-index: 1; | ||
transform: scale(0.9); | ||
transform-origin: top left; | ||
animation: loading 1s ease-in-out forwards; | ||
animation-delay: 1s; | ||
pointer-events: none; | ||
|
||
@include ohma.screenMobile { | ||
transform: scale(0.4); | ||
animation: none; | ||
animation: loadingMobile 1s ease-in-out forwards; | ||
animation-delay: 1s; | ||
} | ||
} | ||
|
||
.images { | ||
position: relative; | ||
width: auto; | ||
height: auto; | ||
} | ||
|
||
.committeeImage { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
z-index: 0; | ||
> * { | ||
width: 100vw !important; | ||
img { | ||
width: 100vw !important; | ||
height: 300px; | ||
object-fit: cover; | ||
object-position: center; | ||
background-size: cover; | ||
} | ||
} | ||
|
||
@include ohma.screenMobile { | ||
height: 150px; | ||
animation: none; | ||
} | ||
} | ||
|
||
.content { | ||
position: relative; | ||
z-index: 2; | ||
margin: 0 auto; | ||
max-width: 800px; | ||
} | ||
} | ||
|
||
.image-container { | ||
width: 100vw; | ||
max-width: 100%; | ||
height: 100%; | ||
} | ||
|
||
@keyframes loading { | ||
0% { | ||
transform: scale(0.9); | ||
} | ||
100% { | ||
transform: scale(1.0); | ||
} | ||
} | ||
|
||
@keyframes loadingMobile { | ||
0% { | ||
transform: scale(0.4); | ||
} | ||
100% { | ||
transform: scale(0.5); | ||
} | ||
} |
Oops, something went wrong.