Created
June 9, 2015 13:47
-
-
Save srenault/1fcc44d7d9c8a859e172 to your computer and use it in GitHub Desktop.
Website starter - featured-items-micro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row-centered-aired featured-micro"> | |
<?php foreach($slice->getValue()->getArray() as $item) { ?> | |
<div class="col-4"> | |
<?php $illustration = $item->get('illustration'); ?> | |
<div class="illustration squared-image" <?= $illustration ? 'style="background-image: url('.$illustration->getView("icon")->getUrl().')"' : '' ?>></div> | |
<div class="text"> | |
<h3><?= $item->get('title') ? $item->get('title')->asText() : ''; ?></h3> | |
<?= $item->get('summary') ? $item->get('summary')->asHtml() : ''; ?> | |
</div> | |
</div> | |
<?php } ?> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Featured item micro */ | |
.featured-micro { | |
overflow: hidden; | |
} | |
.featured-micro .illustration, .featured-micro .text { | |
float: left; | |
} | |
.featured-micro .text { | |
margin-left: 20px; | |
width: 60%; | |
} | |
.featured-micro .text h3 { | |
font-size: 14px; | |
margin-bottom: 3px; | |
} | |
.featured-micro .text p { | |
font-size: 12px; | |
line-height: 16px; | |
margin: 0; | |
} | |
.featured-micro .illustration { | |
margin-bottom: 10px; | |
width: 66px; | |
height: 66px; | |
background-color: #F3F3F9; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment