Merge pull request #95 from nisrulz/fix-showcase-box

Fix showcase box
This commit is contained in:
zzossig 2020-01-21 09:37:25 +09:00 committed by GitHub
commit bad7f2011b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -70,7 +70,7 @@
} }
&__box { &__box {
width: 47.5%; width: 25%;
height: auto; height: auto;
border-radius: 0.2rem; border-radius: 0.2rem;
margin: 0.5rem; margin: 0.5rem;
@ -91,7 +91,7 @@
} }
} }
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
width: 245px; width: 35%;
} }
&--wrapper { &--wrapper {
@ -101,12 +101,12 @@
} }
&--dummy { &--dummy {
width: 47.5%; width: 25%;
margin: 0.5rem; margin: 0.5rem;
@include flex-grow(1); @include flex-grow(1);
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
width: 245px; width: 35%;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
display: none; display: none;

View File

@ -15,9 +15,11 @@
<a href="{{ .Params.Link }}" class="showcase__box--title" target="_blank" rel="noreferrer"> <a href="{{ .Params.Link }}" class="showcase__box--title" target="_blank" rel="noreferrer">
{{ .Title }} {{ .Title }}
</a> </a>
{{ if (isset .Params "thumb") | or (eq .Params.thumb "") }}
<a href="{{ .Params.Link }}" class="showcase__box--img" target="_blank" rel="noreferrer"> <a href="{{ .Params.Link }}" class="showcase__box--img" target="_blank" rel="noreferrer">
<img src="{{ (print "images/" .Params.thumb) | relURL }}" alt="{{ .Title }}"> <img src="{{ (print "images/" .Params.thumb) | relURL }}" alt="{{ .Title }}">
</a> </a>
{{ end }}
<div class="showcase__box--desc"> <div class="showcase__box--desc">
{{ .Description }} {{ .Description }}
</div> </div>