baf0857e by Jeremy Groot

mobile header image

1 parent c27d53cb
......@@ -14633,7 +14633,17 @@ article > h5 {
margin-top: 11.875rem;
}
#mobile-header-image {
display: none;
}
@media (max-width: 768px) {
#header-image {
display: none;
}
#mobile-header-image {
display: block;
}
.article-wrapper article > h1 {
margin-top: 0;
}
......@@ -14903,7 +14913,7 @@ article > h5 {
transition: 0.3s;
}
.has-sidebar-content .article-wrapper {
margin-top: 4rem;
margin-top: 1.5rem;
}
#resources_wrapper {
margin-top: 0;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
#mobile-header-image {
display: none;
}
@media(max-width:768px) {
#header-image {
display: none;
}
#mobile-header-image {
display: block;
}
.article-wrapper article > h1 {
margin-top:0;
}
......@@ -321,7 +332,7 @@
.has-sidebar-content {
.article-wrapper {
margin-top:4rem;
margin-top:1.5rem;
}
}
......
......@@ -16,8 +16,15 @@ global $wpdb;
<?php if (has_post_thumbnail( $post->ID ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<div class="header-image" id="header-image" style="background-image: url(<?php echo $image[0]; ?>);">
</div>
<div class="header-image" id="header-image" style="background-image: url(<?php echo $image[0]; ?>);"></div>
<?php
$mobile_image = get_field('mobile_header_image');
if($mobile_image) {
?>
<div class="header-image" id="mobile-header-image" style="background-image: url(<?= $mobile_image['url']; ?>);"></div>
<?php
}
?>
<?php endif; ?>
<div id="page-content">
......