1
0
Fork 0

[SITE] move img-Tags to new thumb syntax

This commit is contained in:
Jannik Beyerstedt 2016-04-22 23:35:45 +02:00
parent edf3ce49c8
commit 8ebfbbfab4
5 changed files with 27 additions and 3 deletions

View file

@ -1,6 +1,14 @@
/* STYLE for jannikbeyerstedt.de /* STYLE for jannikbeyerstedt.de
* for specific template * for specific template
*/ */
.card a {
color: #000; }
.card a:active, .card a:hover {
color: #000;
text-decoration: none; }
.card a.card-link:active, .card a.card-link:hover {
text-decoration: underline; }
.img-fluid { .img-fluid {
display: block; display: block;
max-width: 100%; max-width: 100%;

View file

@ -20,6 +20,20 @@ main.projects {
} }
} }
.card a {
color: $color_font;
&:active, &:hover {
color: $color_font;
text-decoration: none;
}
&.card-link {
&:active, &:hover {
text-decoration: underline;
}
}
}
// ---- from boostrap ---- // ---- from boostrap ----

View file

@ -21,14 +21,16 @@ snippet('base/cont-header');
<div class="container"><div class="row"> <div class="container"><div class="row">
<?php $i=0; foreach($children as $c) : $i++; ?> <?php $i=0; foreach($children as $c) : $i++; ?>
<div class="col-sm-6 col-lg-3"><div class="card"> <div class="col-sm-6 col-lg-3"><div class="card">
<a href="<?php echo $c->url(); ?>">
<?php if ($img = $c->images()->find($c->exrpt_img())) { <?php if ($img = $c->images()->find($c->exrpt_img())) {
echo thumb($img, array('width'=>400, 'class'=>"card-img-top")); echo html::img($img->width(400)->quality(70)->url(), ['class'=>"card-img-top"]);
} ?> } ?>
<div class="card-block"> <div class="card-block">
<h5 class="card-title"><?php echo $c->title()->html(); ?></h5> <h5 class="card-title"><?php echo $c->title()->html(); ?></h5>
<p class="card-text"><?php echo $c->exrpt_text()->kirbytext(); ?> </p> <p class="card-text"><?php echo $c->exrpt_text()->kirbytext(); ?></p>
<a href="<?php echo $c->url(); ?>" class="card-link">mehr</a> <a href="<?php echo $c->url(); ?>" class="card-link">mehr</a>
</div> </div>
</a>
</div></div> </div></div>
<?php <?php
echo ($i%2 == 0)?'<div class="clearfix hidden-lg-up"></div>':''; echo ($i%2 == 0)?'<div class="clearfix hidden-lg-up"></div>':'';

View file

@ -22,7 +22,7 @@ snippet('base/cont-header');
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<?php if ($img = $page->images()->find($page->featurette_img())) { <?php if ($img = $page->images()->find($page->featurette_img())) {
echo '<img src="'.$img->width(235)->url().'" class="img-fluid img-rounded" alt="Portrait">'; echo html::img($img->width(235)->quality(70)->url(), ['class'=>"img-fluid img-rounded", 'alt'=>"Portrait"]);
}?> }?>
</div> </div>
</div> </div>