gallery component now fancier
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
img: string;
|
||||
imgAlt: string;
|
||||
link: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -34,9 +35,11 @@
|
||||
{#if reverseTextOrder}
|
||||
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
||||
<p class="gallery-title">{entry.title}</p>
|
||||
<p class="gallery-description">{entry.description}</p>
|
||||
{:else}
|
||||
<p class="gallery-title">{entry.title}</p>
|
||||
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
||||
<p class="gallery-description">{entry.description}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</a>
|
||||
@@ -56,22 +59,24 @@
|
||||
|
||||
.gallery-container {
|
||||
box-sizing: content-box;
|
||||
height: 80px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
text-decoration: none;
|
||||
align-items: center;
|
||||
margin: 6px 0;
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
border: var(--border-style) transparent var(--border-dash-size);
|
||||
transition: border-color var(--duration-animation) var(--anim-curve);
|
||||
}
|
||||
|
||||
.gallery-img, .gallery-img-placeholder {
|
||||
width: 145px;
|
||||
min-width: 145px;
|
||||
width: 180px;
|
||||
min-width: 180px;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
object-fit: cover;
|
||||
/* filter: grayscale(60%); */
|
||||
transition: margin var(--duration-animation) ease-out;
|
||||
transition: width var(--duration-animation) var(--anim-curve);
|
||||
}
|
||||
|
||||
.gallery-img-placeholder {
|
||||
@@ -79,53 +84,66 @@
|
||||
}
|
||||
|
||||
.gallery-text-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: grid;
|
||||
grid-auto-columns: 1fr;
|
||||
grid-template-rows: 1fr 1fr 0fr;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-style: var(--border-style);
|
||||
justify-content: center;
|
||||
border-color: transparent;
|
||||
border-width: var(--border-dash-size);
|
||||
border-left: none;
|
||||
transition: border-color var(--duration-animation) ease-out,
|
||||
padding-right var(--duration-animation) ease-out,
|
||||
background-color var(--duration-animation) ease-out,
|
||||
backdrop-filter var(--duration-blur) ease-out;
|
||||
padding: 0 16px;
|
||||
transition: background-color var(--duration-animation) var(--anim-curve),
|
||||
backdrop-filter var(--duration-blur) var(--anim-curve),
|
||||
grid-template-rows var(--duration-blur) var(--anim-curve);
|
||||
}
|
||||
|
||||
.gallery-title, .gallery-subtitle {
|
||||
.gallery-title, .gallery-subtitle, .gallery-description {
|
||||
margin: 0;
|
||||
transition: color var(--duration-animation) ease-out;
|
||||
transition: color var(--duration-animation) var(--anim-curve),
|
||||
opacity var(--duration-animation) var(--anim-curve);
|
||||
}
|
||||
|
||||
.gallery-title {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: 700;
|
||||
font-size: 1.4rem;
|
||||
line-height: 2.0rem;
|
||||
}
|
||||
|
||||
.gallery-subtitle {
|
||||
.gallery-subtitle, .gallery-description {
|
||||
font-size: 1.0rem;
|
||||
line-height: 1.2rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.gallery-container:hover .gallery-text-container {
|
||||
.gallery-description {
|
||||
font-weight: 500;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.gallery-container:hover {
|
||||
border-color: var(--color-highlight);
|
||||
background-color: var(--color-background-highlight);
|
||||
backdrop-filter: blur(var(--blur-radius-background));
|
||||
}
|
||||
.gallery-container:hover .gallery-img, .gallery-container:hover .gallery-img-placeholder {
|
||||
/* filter: grayscale(0%); */
|
||||
margin-left: 8px;
|
||||
/* margin-left: 8px; */
|
||||
width: 260px;
|
||||
}
|
||||
.gallery-container:hover .gallery-text-container {
|
||||
padding-right: 8px;
|
||||
/* padding-right: 8px; */
|
||||
grid-template-rows: 0fr 1fr 1fr;
|
||||
}
|
||||
.gallery-container:hover p {
|
||||
color: var(--color-highlight);
|
||||
}
|
||||
.gallery-container:hover .gallery-subtitle {
|
||||
opacity: 0;
|
||||
|
||||
}
|
||||
.gallery-container:hover .gallery-description {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 700px) {
|
||||
/* .gallery-title {
|
||||
|
||||
Reference in New Issue
Block a user