baf0857e by Jeremy Groot

mobile header image

1 parent c27d53cb
...@@ -14633,7 +14633,17 @@ article > h5 { ...@@ -14633,7 +14633,17 @@ article > h5 {
14633 margin-top: 11.875rem; 14633 margin-top: 11.875rem;
14634 } 14634 }
14635 14635
14636 #mobile-header-image {
14637 display: none;
14638 }
14639
14636 @media (max-width: 768px) { 14640 @media (max-width: 768px) {
14641 #header-image {
14642 display: none;
14643 }
14644 #mobile-header-image {
14645 display: block;
14646 }
14637 .article-wrapper article > h1 { 14647 .article-wrapper article > h1 {
14638 margin-top: 0; 14648 margin-top: 0;
14639 } 14649 }
...@@ -14903,7 +14913,7 @@ article > h5 { ...@@ -14903,7 +14913,7 @@ article > h5 {
14903 transition: 0.3s; 14913 transition: 0.3s;
14904 } 14914 }
14905 .has-sidebar-content .article-wrapper { 14915 .has-sidebar-content .article-wrapper {
14906 margin-top: 4rem; 14916 margin-top: 1.5rem;
14907 } 14917 }
14908 #resources_wrapper { 14918 #resources_wrapper {
14909 margin-top: 0; 14919 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.
1 #mobile-header-image {
2 display: none;
3 }
1 @media(max-width:768px) { 4 @media(max-width:768px) {
2 5
6 #header-image {
7 display: none;
8 }
9
10 #mobile-header-image {
11 display: block;
12 }
13
3 .article-wrapper article > h1 { 14 .article-wrapper article > h1 {
4 margin-top:0; 15 margin-top:0;
5 } 16 }
...@@ -321,7 +332,7 @@ ...@@ -321,7 +332,7 @@
321 332
322 .has-sidebar-content { 333 .has-sidebar-content {
323 .article-wrapper { 334 .article-wrapper {
324 margin-top:4rem; 335 margin-top:1.5rem;
325 } 336 }
326 } 337 }
327 338
......
...@@ -16,8 +16,15 @@ global $wpdb; ...@@ -16,8 +16,15 @@ global $wpdb;
16 16
17 <?php if (has_post_thumbnail( $post->ID ) ): ?> 17 <?php if (has_post_thumbnail( $post->ID ) ): ?>
18 <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> 18 <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
19 <div class="header-image" id="header-image" style="background-image: url(<?php echo $image[0]; ?>);"> 19 <div class="header-image" id="header-image" style="background-image: url(<?php echo $image[0]; ?>);"></div>
20 </div> 20 <?php
21 $mobile_image = get_field('mobile_header_image');
22 if($mobile_image) {
23 ?>
24 <div class="header-image" id="mobile-header-image" style="background-image: url(<?= $mobile_image['url']; ?>);"></div>
25 <?php
26 }
27 ?>
21 <?php endif; ?> 28 <?php endif; ?>
22 29
23 <div id="page-content"> 30 <div id="page-content">
......