<a class="card-14" href="#">
<div class="card-14__img"><img src="https://picsum.photos/id/1000/400/300" width="400" height="300" /></div>
<p class="card-14__sub-heading">SUB HEADING</p>
<h3 class="card-14__heading">見出しが入ります</h3>
<p class="card-14__text">テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。</p>
<div class="card-14__button">VIEW MORE</div>
</a>
a.card-14(href=link)
.card-14__img
img(src=img, width=400, height=300)
p.card-14__sub-heading #{ subHeading }
h3.card-14__heading #{ heading }
p.card-14__text #{ text }
.card-14__button VIEW MORE
{
"link": "#",
"img": "https://picsum.photos/id/1000/400/300",
"subHeading": "SUB HEADING",
"heading": "見出しが入ります",
"text": "テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。"
}
$BLOCK_NAME: '.card-14';
// 変数
$color_primary: #051b57;
$color_white: #fff;
$color_black: #131313;
$color_gray: #f6f6f3;
#{ $BLOCK_NAME } {
display: block;
max-width: 360px;
border-top: 3px solid $color_primary;
&__img {
overflow: hidden;
& > img {
transition: all 0.5s ease;
}
@at-root #{ $BLOCK_NAME }:hover & {
& > img {
transform: scale(1.06);
}
}
}
&__sub-heading {
margin-top: 20px;
font-family: 'Amiri', serif;
font-size: 14px;
color: $color_primary;
}
&__heading {
position: relative;
padding-bottom: 20px;
margin-top: 5px;
font-family: 游明朝, 'Yu Mincho', YuMincho, serif;
font-size: 18px;
font-weight: bold;
line-height: 1.3;
&::after {
position: absolute;
bottom: 0;
left: 0;
display: block;
width: 60px;
height: 1px;
content: '';
background: $color_primary;
}
}
&__text {
margin-top: 20px;
font-size: 14px;
font-weight: bold;
line-height: 1.8;
}
&__button {
padding: 20px 5px;
margin-top: 20px;
font-family: 'Amiri', serif;
font-size: 14px;
line-height: 1.3;
color: $color_primary;
text-align: center;
background: $color_gray;
transition: all 0.2s linear;
@at-root #{ $BLOCK_NAME }:hover & {
color: $color_white;
background-color: $color_primary;
}
}
}