42afe874 by Jeff Balicki

contest

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent d0eea6a7
...@@ -35,14 +35,35 @@ function contest_slider(){ ...@@ -35,14 +35,35 @@ function contest_slider(){
35 $num = get_post_meta(get_the_ID(), '_seq_num', true ); 35 $num = get_post_meta(get_the_ID(), '_seq_num', true );
36 $cap = get_post_meta(get_the_ID(), '_field_7', true ); 36 $cap = get_post_meta(get_the_ID(), '_field_7', true );
37 ?> 37 ?>
38 <img src="<?php echo $image[$num];?>" alt="<?php echo $cap;?>"> 38 <a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#Modal_<?php echo $num;?>">
39 <div class="contest_cap"><?php echo $cap;?></div> 39 <img src="<?php echo $image[$num];?>" alt="<?php echo $cap;?>">
40 </a>
41
40 </div> 42 </div>
41 <?php endwhile; ?> 43 <?php endwhile; ?>
42 </div> 44 </div>
43 <div class="swiper-button-prev"></div> 45 <div class="swiper-button-prev"></div>
44 <div class="swiper-button-next"></div> 46 <div class="swiper-button-next"></div>
45 </div> 47 </div>
48 <?php while ($custom_query->have_posts()): $custom_query->the_post(); ?>
49 <?php $image = get_post_meta(get_the_ID(), '_field_9', true );
50 $num = get_post_meta(get_the_ID(), '_seq_num', true );
51 $cap = get_post_meta(get_the_ID(), '_field_7', true );
52 ?>
53 <div class="modal fade" id="Modal_<?php echo $num;?>" tabindex="-1" role="dialog" data-bs-backdrop="static" aria-labelledby="exampleModalLabel" aria-hidden="true">
54 <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
55 <div class="modal-content">
56 <div class="modal-body">
57 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
58 <div class="body-content">
59 <img src="<?php echo $image[$num];?>" alt="<?php echo $cap;?>">
60 <div class="contest_cap"><?php echo $cap;?> like you live here</div>
61 </div>
62 </div>
63 </div>
64 </div>
65 </div>
66 <?php endwhile; ?>
46 <style> 67 <style>
47 .swiper-container{ 68 .swiper-container{
48 width: 100%; 69 width: 100%;
...@@ -101,10 +122,22 @@ function contest_slider(){ ...@@ -101,10 +122,22 @@ function contest_slider(){
101 font-size:20px; 122 font-size:20px;
102 margin-top:-40px; 123 margin-top:-40px;
103 margin-left:20px; 124 margin-left:20px;
104 125
126 }
127 .body-content {
128 margin: auto;
129 width: auto;
130 text-align: center;
131 padding: 20px;
132 }
133 .btn-close{
134 float:right;
135 }
136 .modal-content{
137 border-radius: 0px !important;
105 } 138 }
106
107 </style> 139 </style>
140
108 <?php endif; 141 <?php endif;
109 142
110 wp_reset_query(); 143 wp_reset_query();
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -44,6 +44,8 @@ jQuery(document).ready(function($) { ...@@ -44,6 +44,8 @@ jQuery(document).ready(function($) {
44 }) 44 })
45 45
46 46
47
48
47 49
48 50
49 text_change(); 51 text_change();
......