Commit 256a087e authored by Eric Bremner's avatar Eric Bremner
Browse files

FDSU-1829: Making homepage banners look like UW homepage.

parent bf5ead92
......@@ -64,3 +64,38 @@
.homepage_banners_paginator li:last-child {
border-right: none;
}
.banner-caption-wrapper {
position: relative;
margin-left: auto;
margin-right: auto;
max-width: 63.125rem;
}
.banner-caption {
text-align:center;
padding: 1rem 2.5rem;
border: none;
width: 100%;
color: #fff;
display: block;
padding-top: 1rem;
padding-bottom: 1rem;
text-align: center;
transition-delay: 0s;
transition-duration: 0.2s;
transition-property: opacity;
position: absolute;
bottom: 1.5rem;
background-color: rgba(0, 0, 0, 0.8);
transition-delay: 0s;
transition-duration: 0.3s;
transition-property: color, background-color, border-color, opacity;
height: auto;
opacity: 1;
}
.uw-homepage-banners-figure picture {
padding: 0;
margin: 0;
}
......@@ -98,11 +98,13 @@ function uw_virtual_site_homepage_page_alter(&$page) {
// If there is a title, set the caption.
if($page['uw-virtual-site-homepage']['field_uw_home_page_banners'][$index]['#item']['title'] !== "") {
$html .= '<span class="banner-caption"><strong>' . $page['uw-virtual-site-homepage']['field_uw_home_page_banners'][$index]['#item']['title'] . '</strong>';
$html .= '<div class="banner-caption-wrapper">';
$html .= '<div class="banner-caption"><strong>' . $page['uw-virtual-site-homepage']['field_uw_home_page_banners'][$index]['#item']['title'] . '</strong>';
if($page['uw-virtual-site-homepage']['field_uw_home_page_banners'][0]['#item']['image_field_caption']) {
$html .= '<span>' . $page['uw-virtual-site-homepage']['field_uw_home_page_banners'][0]['#item']['image_field_caption']['value'] . '</span>';
}
$html .= '</span>';
$html .= '</div>';
$html .= '</div>';
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment