-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ECON-212 Add Media Card layout for Panels and Display Suite * ECON-212 Adjust styles of the Media component for the Media Card layout * ECON-212 Update Media Card layout thumbnail
- Loading branch information
Showing
5 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div class="media media_card" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>> | ||
|
||
<?php if (!empty($content['media_left'])): ?> | ||
<div class="media-left"> | ||
<?php print $content['media_left']; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<div class="media-body"> | ||
<?php if (!empty($content['media_heading'])): ?> | ||
<div class="media-heading"> | ||
<?php print $content['media_heading']; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php if (!empty($content['media_body'])): ?> | ||
<div class="media-body"> | ||
<?php print $content['media_body']; ?> | ||
</div> | ||
<?php endif; ?> | ||
</div> | ||
</div> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/** | ||
* Implements hook_panels_layouts(). | ||
*/ | ||
function suitcase_interim_media_card_panels_layouts() { | ||
$items['media_card'] = array( | ||
'title' => t('Media Card'), | ||
'category' => t('Suitcase: Media Card'), | ||
'icon' => 'media_card.jpg', | ||
'theme' => 'media_card', | ||
'admin css' => 'media_card_admin.css', | ||
'regions' => array( | ||
'media_left' => t('Left'), | ||
'media_heading' => t('Heading'), | ||
'media_body' => t('Body'), | ||
), | ||
); | ||
return $items; | ||
} | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.media { | ||
/* Overrides blog_blog.css */ | ||
display: flex !important; | ||
align-items: center; | ||
margin-bottom: 1rem; | ||
margin-right: 1rem; | ||
} | ||
|
||
.media.media_card { | ||
wdith: 100%; | ||
margin-top: 0.5rem; | ||
margin-bottom: 0.5rem; | ||
align-items: flex-start; | ||
} | ||
|
||
.media-left { | ||
min-width: 250px; | ||
flex: 0 0 auto; | ||
margin-right: 1rem; | ||
margin-bottom: 0.5rem; | ||
padding: 0; | ||
} | ||
|
||
.media-left img { | ||
border: 1px solid #ddd; | ||
} | ||
|
||
.media-body { | ||
flex-grow: 1; | ||
} | ||
|
||
.media-heading { | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
} |