Add project image (#987)
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
parent
22531ce9a8
commit
bc67ca1187
2 changed files with 50 additions and 27 deletions
|
@ -9,6 +9,11 @@
|
||||||
box-shadow: $box-shadow;
|
box-shadow: $box-shadow;
|
||||||
border: 1px solid get-light-color('bg-primary');
|
border: 1px solid get-light-color('bg-primary');
|
||||||
@include transition();
|
@include transition();
|
||||||
|
.card-img-top {
|
||||||
|
transform: scale(1.2);
|
||||||
|
object-fit: cover;
|
||||||
|
@include transition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-head {
|
.card-head {
|
||||||
|
@ -17,6 +22,10 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-size: large;
|
||||||
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,20 @@
|
||||||
>
|
>
|
||||||
<div class="card mt-1">
|
<div class="card mt-1">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<a class="card-header" href="{{ if .repo }}{{ .repo }}{{ else if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}>
|
<a href="{{ if .repo }}{{ .repo }}{{ else if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}>
|
||||||
|
{{ if .image }}
|
||||||
|
<div class="card-head">
|
||||||
|
{{ $imageImage:= resources.Get .image}}
|
||||||
|
{{ if $imageImage }}
|
||||||
|
{{/* svg don't support "Fit" operation */}}
|
||||||
|
{{ if ne $imageImage.MediaType.SubType "svg" }}
|
||||||
|
{{ $imageImage = $imageImage.Fit "1000x1000" }}
|
||||||
|
{{ end }}
|
||||||
|
<img class="card-img-top" src="{{ $imageImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
<div class="card-header">
|
||||||
<div>
|
<div>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{{ if .logo }}
|
{{ if .logo }}
|
||||||
|
@ -34,6 +47,7 @@
|
||||||
<span>{{ .timeline }}</span>
|
<span>{{ .timeline }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="card-body text-justify pt-1 pb-1">
|
<div class="card-body text-justify pt-1 pb-1">
|
||||||
<p>{{ .summary | markdownify }}</p>
|
<p>{{ .summary | markdownify }}</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue