feat(footer): arsitektur 4-kolom institusi, native svg social icons, dan opsi jam layanan

This commit is contained in:
Mas Budi Kusuma
2026-09-15 22:56:17 +07:00
parent 8bcb046113
commit 77819e7d1f
3 changed files with 324 additions and 140 deletions
+136 -65
View File
@@ -1,65 +1,136 @@
<!-- SEKSI LOGO MITRA / AKREDITASI -->
<div class="partner-logos text-center" style="padding: 40px 0; background: #fff;">
<div class="container" style="display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;">
<img src="<?php echo get_template_directory_uri(); ?>/assets/logo-kemdikbud.png" alt="Kemdikbud" style="height: 60px; filter: grayscale(100%);" onerror="this.style.display='none'">
</div>
</div>
<!-- MAIN FOOTER -->
<footer style="background-color: var(--primary-color); color: #ffffff; padding: 60px 0 30px;">
<div class="container" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px;">
<!-- Kolom 1: Kontak -->
<div class="footer-col">
<h3 style="color: #fff; margin-bottom: 20px;">Hubungi Kami</h3>
<p style="font-size: 15px; opacity: 0.9; line-height: 1.8;">
📍 <?php echo nl2br(esc_html(get_option('edukarsa_footer_alamat', 'Alamat belum diisi'))); ?><br>
📞 <?php echo esc_html(get_option('edukarsa_footer_telp', '000-0000')); ?><br>
✉️ <?php echo esc_html(get_option('edukarsa_footer_email', '[email protected]')); ?>
</p>
</div>
<!-- Kolom 2: Tautan -->
<div class="footer-col">
<h3 style="color: #fff; margin-bottom: 20px;">Tautan Penting</h3>
<nav class="footer-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-footer',
'fallback_cb' => false,
'container' => false,
'menu_class' => 'footer-links-custom'
) );
?>
</nav>
</div>
<!-- Kolom 3: Sosial Media -->
<div class="footer-col">
<h3 style="color: #fff; margin-bottom: 20px;">Ikuti Kami</h3>
<div class="social-icons" style="display: flex; gap: 20px;">
<!-- Pengecekan Toggle Tampil dari Dashboard -->
<?php if( get_option('edukarsa_tampil_fb', 1) == 1 ) : ?>
<a href="<?php echo esc_url(get_option('edukarsa_footer_fb', '#')); ?>" target="_blank" style="color: #fff; font-size: 20px; font-weight:bold;">FB</a>
<?php endif; ?>
<?php if( get_option('edukarsa_tampil_ig', 1) == 1 ) : ?>
<a href="<?php echo esc_url(get_option('edukarsa_footer_ig', '#')); ?>" target="_blank" style="color: #fff; font-size: 20px; font-weight:bold;">IG</a>
<?php endif; ?>
<?php if( get_option('edukarsa_tampil_yt', 1) == 1 ) : ?>
<a href="<?php echo esc_url(get_option('edukarsa_footer_yt', '#')); ?>" target="_blank" style="color: #fff; font-size: 20px; font-weight:bold;">YT</a>
<?php endif; ?>
</div>
</div>
</div>
<div class="footer-bottom" style="border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center;">
<p style="margin: 0; font-size: 14px; opacity: 0.7;">
&copy; <?php echo date( 'Y' ); ?> <?php echo esc_html(get_option('edukarsa_footer_copyright', 'Semua Hak Dilindungi')); ?>.
</p>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>
<?php
/**
* Template Footer EduKarsa Modern 4-Kolom
*/
$footer_logo = get_option( 'edukarsa_footer_logo' );
if ( empty( $footer_logo ) ) {
$footer_logo = get_option( 'edukarsa_header_logo' );
}
?>
<!-- MAIN FOOTER -->
<footer class="site-footer">
<div class="container footer-grid-wrapper">
<!-- Kolom 1: Identitas & Visi Kampus -->
<div class="footer-col footer-col-brand">
<div class="footer-brand-logo">
<?php if ( ! empty( $footer_logo ) ) : ?>
<img src="<?php echo esc_url( $footer_logo ); ?>" alt="<?php bloginfo( 'name' ); ?>" style="max-height: 52px; width: auto; object-fit: contain; margin-bottom: 15px;">
<?php else : ?>
<h3 style="color: #fff; margin-bottom: 12px; font-size: 22px; font-weight: 800;"><?php bloginfo( 'name' ); ?></h3>
<?php endif; ?>
</div>
<p class="footer-brand-desc">
<?php echo nl2br( esc_html( get_option( 'edukarsa_footer_desc', 'Institusi pendidikan terakreditasi unggul yang berdedikasi mencetak generasi berkarakter cerdas, kompetitif, dan berintegritas.' ) ) ); ?>
</p>
<?php
$jam = get_option( 'edukarsa_footer_jam' );
if ( ! empty( $jam ) ) :
?>
<div class="footer-hours-box">
<span class="hours-icon">🕒</span>
<div>
<div style="font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; opacity: 0.8;">Jam Layanan</div>
<div style="font-weight: 600; font-size: 13px; color: #fff;"><?php echo esc_html( $jam ); ?></div>
</div>
</div>
<?php endif; ?>
</div>
<!-- Kolom 2: Kontak Resmi -->
<div class="footer-col">
<h4 class="footer-col-title">Hubungi Kami</h4>
<ul class="footer-contact-list">
<li>
<span class="f-icon">📍</span>
<span><?php echo nl2br( esc_html( get_option( 'edukarsa_footer_alamat', 'Alamat belum diatur di dashboard' ) ) ); ?></span>
</li>
<li>
<span class="f-icon">📞</span>
<a href="tel:<?php echo esc_attr( preg_replace( '/[^0-9+]/', '', get_option( 'edukarsa_footer_telp', '' ) ) ); ?>">
<?php echo esc_html( get_option( 'edukarsa_footer_telp', '(021) 000-0000' ) ); ?>
</a>
</li>
<li>
<span class="f-icon">✉️</span>
<a href="mailto:<?php echo esc_attr( get_option( 'edukarsa_footer_email', '[email protected]' ) ); ?>">
<?php echo esc_html( get_option( 'edukarsa_footer_email', '[email protected]' ) ); ?>
</a>
</li>
</ul>
</div>
<!-- Kolom 3: Tautan Penting -->
<div class="footer-col">
<h4 class="footer-col-title">Tautan Penting</h4>
<nav class="footer-nav-clean">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-footer',
'fallback_cb' => false,
'container' => false,
'menu_class' => 'footer-links-custom',
'depth' => 1
) );
?>
</nav>
</div>
<!-- Kolom 4: Media Sosial Institusi -->
<div class="footer-col">
<h4 class="footer-col-title">Media Sosial</h4>
<p style="font-size: 13px; opacity: 0.85; margin-bottom: 18px; line-height: 1.5;">
Ikuti kanal resmi kami untuk update warta kegiatan kampus, prestasi, dan agenda akademik.
</p>
<div class="footer-social-icons">
<?php if ( get_option( 'edukarsa_tampil_fb', 1 ) == 1 && get_option( 'edukarsa_footer_fb' ) ) : ?>
<a href="<?php echo esc_url( get_option( 'edukarsa_footer_fb' ) ); ?>" target="_blank" rel="noopener" class="social-btn" title="Facebook">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 4.84 3.44 8.87 8 9.8V15H8v-3h2V9.5C10 7.57 11.57 6 13.5 6H16v3h-2c-.55 0-1 .45-1 1v2h3v3h-3v6.95c5.05-.5 9-4.76 9-9.95z"/></svg>
</a>
<?php endif; ?>
<?php if ( get_option( 'edukarsa_tampil_ig', 1 ) == 1 && get_option( 'edukarsa_footer_ig' ) ) : ?>
<a href="<?php echo esc_url( get_option( 'edukarsa_footer_ig' ) ); ?>" target="_blank" rel="noopener" class="social-btn" title="Instagram">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg>
</a>
<?php endif; ?>
<?php if ( get_option( 'edukarsa_tampil_yt', 1 ) == 1 && get_option( 'edukarsa_footer_yt' ) ) : ?>
<a href="<?php echo esc_url( get_option( 'edukarsa_footer_yt' ) ); ?>" target="_blank" rel="noopener" class="social-btn" title="YouTube">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>
</a>
<?php endif; ?>
<?php if ( get_option( 'edukarsa_tampil_tiktok', 0 ) == 1 && get_option( 'edukarsa_footer_tiktok' ) ) : ?>
<a href="<?php echo esc_url( get_option( 'edukarsa_footer_tiktok' ) ); ?>" target="_blank" rel="noopener" class="social-btn" title="TikTok">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-1.01-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.24 1.07-.14 1.61.24 1.64 1.82 2.89 3.5 2.77 1.81-.05 3.29-1.52 3.36-3.33.04-3.78.02-7.57.02-11.35z"/></svg>
</a>
<?php endif; ?>
<?php if ( get_option( 'edukarsa_tampil_x', 0 ) == 1 && get_option( 'edukarsa_footer_x' ) ) : ?>
<a href="<?php echo esc_url( get_option( 'edukarsa_footer_x' ) ); ?>" target="_blank" rel="noopener" class="social-btn" title="X (Twitter)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
</a>
<?php endif; ?>
</div>
</div>
</div>
<!-- COPYRIGHT BOTTOM BAR -->
<div class="footer-bottom-bar">
<div class="container footer-bottom-inner">
<p class="copyright-text">
&copy; <?php echo date( 'Y' ); ?> <?php echo esc_html( get_option( 'edukarsa_footer_copyright', 'EduKarsa University. All Rights Reserved.' ) ); ?>
</p>
<div class="footer-bottom-badge">
<span>Terakreditasi BAN-PT &bull; Kampus Merdeka</span>
</div>
</div>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>