styling homepage

This commit is contained in:
Jannis Portmann 2021-04-26 23:50:23 +02:00
parent 19a8630a6d
commit 6e8e85b025
2 changed files with 24 additions and 2 deletions

View file

@ -5,3 +5,21 @@ $primary: darken(#428bca, 20%);
// the ~ allows you to reference things in node_modules
@import "~bootstrap/scss/bootstrap";
.offering > img {
height: 15rem;
object-fit: cover;
}
.offering {
$card-height: 100%;
width: 20rem;
}
.username {
float: left;
}
.zip {
float: right;
}

View file

@ -7,13 +7,17 @@
<div class="card-deck">
{% for offering in offerings %}
<a href="#">
<div class="card" style="width: 20rem;">
<div class="card offering h-100">
{% if offering.photoFilename %}
<img class="card-img-top" src="{{ asset('uploads/photos/' ~ offering.photofilename) }}" />
{% endif %}
<div class="card-body">
<h5 class="card-title">{{ offering.title }}</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<p class="card-text">{{ offering.description }}</p>
</div>
<div class="card-footer">
<p class="username">{{ offering.byUser }}</p>
<p class="zip">{{ offering.zipCode }}</p>
</div>
</div>
</a>