-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
122 lines (110 loc) · 5.85 KB
/
footer.php
File metadata and controls
122 lines (110 loc) · 5.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/**
* The template for displaying the footer.
*/
?>
<footer id="footer" class="footer" role="conteninfo">
<div class="site-footer u-bg-dark-gray u-py-2">
<div class="u-container">
<div class="footer-row">
<div class="footer-column">
<?php
$address = get_option( 'hbsc_address' );
$phone = get_option( 'hbsc_phone' );
$email = get_option( 'hbsc_email' );
if( $address ) : ?>
<address class="u-font-miller-bold">
<?php echo nl2br( $address ); ?>
</address>
<?php endif;
if( $phone || $email ) :
?>
<div class="u-font-miller <?php echo ( $address ) ? 'u-mt-2' : ''; ?>">
<?php if( $phone ) : ?>
<span class="u-display-block"><a href="tel:<?php echo $phone; ?>"><?php echo $phone; ?></a></span>
<?php endif; if( $email ) : ?>
<span class="u-display-block"><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></span>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?php
$footerNavList = getHeaderMenuItemsFirstLevel();
if ( ! empty( $footerNavList ) ) : ?>
<div class="footer-column">
<nav class="footer-nav">
<div class="footer-nav-menu-col">
<?php
$halfIdx = ceil(count($footerNavList) * 0.5);
$footerNavListFirst = array_slice( $footerNavList, 0, $halfIdx );
$footerNavListSecond = array_slice( $footerNavList, $halfIdx );
foreach( $footerNavListFirst as $key => $footerNavItem ) { ?>
<a href="<?php echo $footerNavItem->url; ?>" title="<?php echo $footerNavItem->post_title; ?>"><?php echo $footerNavItem->post_title; ?></a>
<?php } ?>
</div>
<div class="footer-nav-menu-col">
<?php foreach( $footerNavListSecond as $key => $footerNavItem ) { ?>
<a href="<?php echo $footerNavItem->url; ?>" title="<?php echo $footerNavItem->post_title; ?>"><?php echo $footerNavItem->post_title; ?></a>
<?php } ?>
</div>
</nav>
</div>
<?php endif; ?>
</div>
<div class="footer-row u-flex-items-center">
<div class="footer-social footer-column">
<?php
$facebook = get_option( 'hbsc_facebook' );
$instagram = get_option( 'hbsc_instagram' );
$twitter = get_option( 'hbsc_twitter' );
$youtube = get_option( 'hbsc_youtube' );
if( $facebook || $instagram || $twitter || $youtube ) :
?>
<ul class="social">
<?php if( $facebook ) : ?>
<li class="social__item">
<a href="<?php echo $facebook; ?>" class="icon icon-facebook"></a>
</li>
<?php endif; if( $instagram ) : ?>
<li class="social__item">
<a href="<?php echo $instagram; ?>" class="icon icon-instagram"></a>
</li>
<?php endif; if( $twitter ) : ?>
<li class="social__item">
<a href="<?php echo $twitter; ?>" class="icon icon-twitter"></a>
</li>
<?php endif; if( $youtube ) : ?>
<li class="social__item">
<a href="<?php echo $youtube; ?>" class="icon icon-youtube"></a>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
<div class="newsletter footer-column">
<?php get_template_part( 'partials/footer', 'newsletter' ); ?>
</div>
</div>
<div class="footer-row">
<div class="copyright footer-column">
<span>© <?php echo date('Y'); ?> HBSC</span>
<a href="#">Privacy Policy</a>
<a href="#">Terms of Use</a>
</div>
<div class="footer-column u-font-size-sm u-color-gray u-display-block-md" style="text-align: right;">By submitting this form, you are granting: Harriet Beecher Stowe Center, 77 Forest Street, Hartford, Connecticut, 06105, United States, http://www.harrietbeecherstowe.org permission to email you. You may unsubscribe via the link found at the bottom of every email. (See our <a href="http://www.constantcontact.com/legal/privacy-statement" target="_blank">Email Privacy Policy</a> for details.) Emails are serviced by Constant Contact.</div>
</div>
</div>
</div>
</footer>
</div><!-- #page -->
<?php wp_footer(); ?>
<script>
lightbox.option({
'showImageNumberLabel': false,
'disableScrolling': true,
'maxHeight': 540,
})
</script>
<!-- <span class="media-size"></span> -->
</body>
</html>