Files
fitme3070.pt/includes/footer.php
T
2026-06-12 21:20:23 +01:00

65 lines
2.9 KiB
PHP

<?php
// Shared admin shell — close. Closes the main/content containers opened by header.php.
?>
</div><!-- /.p-3 / .p-md-4 -->
</main>
<?= script_tag('assets/vendor/jquery/jquery-3.7.1.min.js') ?>
<?= script_tag('assets/vendor/bootstrap5/js/bootstrap.bundle.min.js') ?>
<?= script_tag('assets/vendor/summernote/summernote-bs5.min.js') ?>
<?= script_tag('assets/vendor/summernote/lang/summernote-pt-PT.min.js') ?>
<script>
// Attach Summernote to any <textarea class="js-wysiwyg">. The editor keeps the
// underlying textarea in sync, so normal form POSTs submit the generated HTML.
// Inline image upload is intentionally omitted (base64 would bloat the row) —
// modules that need images use their own file-upload fields.
document.addEventListener('DOMContentLoaded', function () {
if (!window.jQuery || !jQuery.fn || !jQuery.fn.summernote) return;
jQuery('textarea.js-wysiwyg').each(function () {
var $ta = jQuery(this);
$ta.summernote({
lang: 'pt-PT',
height: parseInt($ta.data('wysiwyg-height'), 10) || 240,
disableDragAndDrop: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['para', ['ul', 'ol', 'paragraph']],
['insert', ['link']],
['view', ['codeview', 'fullscreen']]
],
styleTags: ['p', 'h2', 'h3', 'h4', 'blockquote'],
popover: { image: [], air: [] }
});
});
});
// Mobile off-canvas sidebar: hamburger toggles .sidebar.open + the backdrop;
// tapping the backdrop, a nav link, Escape, or resizing to desktop closes it.
(function () {
var sb = document.getElementById('sidebar');
var tg = document.getElementById('menuToggle');
var bd = document.getElementById('sidebarBackdrop');
if (!sb || !tg) return;
var mq = window.matchMedia('(max-width: 991.98px)');
function open() { sb.classList.add('open'); if (bd) bd.classList.add('show'); document.body.style.overflow = 'hidden'; tg.setAttribute('aria-expanded', 'true'); }
function close() { sb.classList.remove('open'); if (bd) bd.classList.remove('show'); document.body.style.overflow = ''; tg.setAttribute('aria-expanded', 'false'); }
tg.addEventListener('click', function () { sb.classList.contains('open') ? close() : open(); });
if (bd) bd.addEventListener('click', close);
sb.querySelectorAll('.nav-link').forEach(function (a) {
a.addEventListener('click', function () { if (mq.matches) close(); });
});
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') close(); });
window.addEventListener('resize', function () { if (!mq.matches) close(); });
})();
</script>
<style>
/* Console footer — subtle brand bar */
main:after {
content: ''; display: block; height: 4px;
background: linear-gradient(90deg, var(--bo-accent, #C2D500), transparent);
margin-top: 2rem;
}
</style>
</body>
</html>