fix themes cards heights (#17280)
* fix themes cards heights Signed-off-by: Faissal Wahabali <fwahabali@gmail.com> * crop Original screen image Signed-off-by: Faissal Wahabali <fwahabali@gmail.com> * crop themes card image using CSS Signed-off-by: Faissal Wahabali <fwahabali@gmail.com> * fix card different heights Signed-off-by: Faissal Wahabali <fwahabali@gmail.com> * refactor styling Signed-off-by: Faissal Wahabali <fwahabali@gmail.com> * refactor card image height Signed-off-by: Faissal Wahabali <fwahabali@gmail.com>
This commit is contained in:
parent
d77467bc2a
commit
69064ac0ae
@ -3,8 +3,10 @@
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
|
||||
{% for theme in themes %}
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<img src="./themes/{{ theme.id }}/screen.png" class="card-img-top" alt="{{ 'Screenshot of the %s theme.'|trans|format(theme.name) }}">
|
||||
<div class="card h-100 mt-0">
|
||||
<div class="card-img-container">
|
||||
<img src="./themes/{{ theme.id }}/screen.png" class="card-img-top h-100" alt="{{ 'Screenshot of the %s theme.'|trans|format(theme.name) }}">
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ theme.name }} <small>({{ theme.version }})</small></h5>
|
||||
</div>
|
||||
|
||||
7
themes/bootstrap/scss/_card.scss
Normal file
7
themes/bootstrap/scss/_card.scss
Normal file
@ -0,0 +1,7 @@
|
||||
.card-img-container {
|
||||
height: $card-img-height;
|
||||
overflow: hidden;
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
@ -8,3 +8,7 @@ $breadcrumb-navbar-padding-y: 0.5rem !default;
|
||||
$breadcrumb-navbar-padding-x: 1.8rem !default;
|
||||
$breadcrumb-navbar-margin-bottom: 0 !default;
|
||||
$breadcrumb-navbar-bg: #e9ecef !default; // $gray-200
|
||||
|
||||
// Card
|
||||
|
||||
$card-img-height: 16vh;
|
||||
|
||||
@ -12,3 +12,4 @@
|
||||
@import "forms";
|
||||
@import "breadcrumb";
|
||||
@import "print";
|
||||
@import "card";
|
||||
|
||||
@ -8,6 +8,14 @@
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.card-img-container {
|
||||
height: $card-img-height;
|
||||
overflow: hidden;
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
@ -246,6 +246,7 @@ $pagination-disabled-border-color: $border-color;
|
||||
$card-border-radius: 0;
|
||||
$card-cap-bg: $th-background;
|
||||
$card-bg: $th-background;
|
||||
$card-img-height: 16vh;
|
||||
|
||||
// Accordion
|
||||
|
||||
|
||||
@ -18,6 +18,14 @@
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.card-img-container {
|
||||
height: $card-img-height;
|
||||
overflow: hidden;
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
#maincontainer .card-header {
|
||||
position: static;
|
||||
width: auto;
|
||||
|
||||
@ -133,6 +133,7 @@ $card-cap-bg: $th-background;
|
||||
$card-bg: $bg-one;
|
||||
$card-spacer-y: 0.5em;
|
||||
$card-spacer-x: 0.5em;
|
||||
$card-img-height: 16vh;
|
||||
|
||||
// Accordion
|
||||
|
||||
|
||||
@ -31,6 +31,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.card-img-container {
|
||||
height: $card-img-height;
|
||||
overflow: hidden;
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
color: $th-color;
|
||||
background: $th-background;
|
||||
|
||||
@ -138,6 +138,7 @@ $pagination-disabled-border-color: #aaa;
|
||||
$card-border-color: #aaa;
|
||||
$card-bg: #eee;
|
||||
$card-cap-bg: #fff;
|
||||
$card-img-height: 16vh;
|
||||
|
||||
// Accordion
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user