Skip to content

Commit

Permalink
Use flex instead of float to layout site entry listing. #2168
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Mar 20, 2024
1 parent 5c7c380 commit ae921a2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion application/asset/css/page-blocks.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion application/asset/sass/page-blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@
.site {
margin-bottom: .5rem;
@include clearfix;
display: flex;
}

.site-thumbnail {
flex: 0 0 auto;
}

.site-link {
Expand All @@ -314,7 +319,6 @@

.site-thumbnail-image {
max-height: 3 * $base-line-height;
float: left;
margin-right: 1rem;
}
}
Expand Down
10 changes: 6 additions & 4 deletions application/view/common/site-list-entry.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ $summary = $showSummary ? $site->summary() : null;
<?php if ($thumbnail): ?>
<div class="site-thumbnail"><?php echo $this->thumbnail($thumbnail, 'square', ['class' => 'site-thumbnail-image']); ?></div>
<?php endif; ?>
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
<?php if ($summary): ?>
<p class="site-summary"><?php echo nl2br($this->escapeHtml($summary)); ?></p>
<?php endif; ?>
<div class="site-text">
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
<?php if ($summary): ?>
<p class="site-summary"><?php echo nl2br($this->escapeHtml($summary)); ?></p>
<?php endif; ?>
</div>
</div>

0 comments on commit ae921a2

Please sign in to comment.