Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
wcms-openscholar
uw_virtual_site_homepage
Commits
256a087e
Commit
256a087e
authored
Jan 23, 2017
by
Eric Bremner
Browse files
FDSU-1829: Making homepage banners look like UW homepage.
parent
bf5ead92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
css/uw_virtual_site_homepage.css
css/uw_virtual_site_homepage.css
+35
-0
uw_virtual_site_homepage.module
uw_virtual_site_homepage.module
+4
-2
No files found.
css/uw_virtual_site_homepage.css
View file @
256a087e
...
...
@@ -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
;
}
uw_virtual_site_homepage.module
View file @
256a087e
...
...
@@ -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>'
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment