Add target on newsletter issue link and complete styling with hover

This commit is contained in:
2021-10-16 13:14:55 +02:00
parent 7384088388
commit a2d1a4c64c
2 changed files with 46 additions and 5 deletions

View File

@@ -24,8 +24,8 @@
<ul> <ul>
{#each issues as { issue, title, date_sent, link, thumbnail: { id } }} {#each issues as { issue, title, date_sent, link, thumbnail: { id } }}
<li class="issue"> <li class="issue">
<a href={link} rel="external noreferrer noopener"> <a href={link} target="_blank" rel="external noreferrer noopener">
<Image id={id} width={80} height={56} alt="Issue {issue} thumbnail" /> <Image id={id} width={160} height={112} alt="Issue {issue} thumbnail" />
<dl> <dl>
<dt>Issue #{issue}</dt> <dt>Issue #{issue}</dt>
<dd> <dd>

View File

@@ -1,7 +1,10 @@
.issue { .issue {
position: relative;
display: flex; display: flex;
background-color: #fff; background: #fff;
border-radius: 6px; border-radius: 6px;
transition: background-color 0.4s, transform 0.7s var(--ease-quart);
will-change: transform;
a { a {
display: flex; display: flex;
@@ -10,27 +13,65 @@
} }
// Image // Image
img { img {
$shadow-color: rgba(#936B47, 0.06);
display: block; display: block;
width: 80px; width: 80px;
height: 56px; height: 56px;
margin-right: 16px; margin-right: 16px;
border-radius: 3px;
box-shadow:
0 1.5px 1.5px $shadow-color,
0 3px 3px $shadow-color,
0 12px 12px $shadow-color;
} }
// Title // Title
dt { dt {
margin-bottom: 8px;
color: $color-secondary; color: $color-secondary;
font-size: rem(20px); font-size: rem(20px);
margin-bottom: 8px;
font-family: $font-serif; font-family: $font-serif;
font-weight: 400; font-weight: 400;
transition: color 0.2s;
} }
// Description // Description
dd { dd {
font-size: rem(16px); font-size: rem(14px);
color: $color-gray; color: $color-gray;
} }
// Date // Date
time { time {
display: block;
margin-top: 8px;
opacity: 0.6; opacity: 0.6;
font-size: rem(12px); font-size: rem(12px);
} }
// Under layer
&:after {
content: "";
display: block;
position: absolute;
z-index: -1;
top: 0;
left: 2%;
width: 96%;
height: 100%;
border-radius: 6px;
background: rgba(#fff, 0.4);
transition: transform 0.7s var(--ease-quart);
}
// Hover
&:hover {
background: $color-cream;
transform: rotate(-1deg) translateZ(0);
dt {
color: $color-primary;
}
&:after {
transform: rotate(3deg)translateZ(0);
}
}
} }