HB25-1219 on Amplify
In backhead:
- Make sure the District Type is set to Metropolitan
- Feature Flag Co Metro District
- Feature Flag Compliance Overhaul
<!-- Transparency Footer -->
<script>
function runTransparencyFooter() {
if (typeof jQuery === 'undefined') {
console.error('jQuery failed to load!');
return;
}
$(document).ready(function () {
const footer = $('footer.amplify-footer').first();
if (!footer.length) {
console.warn('Footer element not found.');
return;
}
// Read footer colors
const computedStyles = getComputedStyle(footer[0]);
const bgColor = computedStyles.getPropertyValue('--bg-color') || '#ffffff';
const fgColor = computedStyles.getPropertyValue('--fg-color') || '#000000';
// Inject styling
$('<style>').prop('type', 'text/css').html(`
.footer-transparency-accordion {
margin: 20px 0 40px 0;
padding: 20px;
font-family: sans-serif;
background-color: ${bgColor};
color: ${fgColor};
border: 1px solid ${fgColor};
}
.footer-transparency-accordion h3 {
margin: 0;
padding: 20px;
flex-grow: 1;
font-size: 16px;
font-weight: normal;
}
.footer-transparency-toggle {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
padding-right: 30px;
}
.footer-transparency-icon {
font-size: 2rem;
font-weight: 100;
line-height: 1;
}
.footer-transparency-content {
display: none;
margin-top: 20px;
overflow-x: auto;
padding: 0 30px 20px;
font-size: 14px;
text-transform: none;
}
.footer-transparency-content table {
width: 100%;
border-collapse: collapse;
background-color: transparent;
}
.footer-transparency-content th,
.footer-transparency-content td {
border: 1px solid ${fgColor};
padding: 10px;
text-align: left;
}
.footer-transparency-content a {
color: ${fgColor};
}
`).appendTo('head');
// Load transparency HTML
$.get('/transparency.html', function (response) {
const reportContent = $('<div>').html(response).find('.wysiwym-transparency-report');
if (!reportContent.length) {
console.warn('[Transparency] .wysiwym-transparency-report not found in /transparency.html');
return;
}
// Allowed headings filter
const allowedHeadings = [
'Board Members',
'Annual Meeting',
'Board Meetings',
'Overlapping Governmental Entities',
'Contact Procedures – Business & After Hours',
'Call for Nominations, Notice of Elections, and Election Results (if applicable)'
];
const table = reportContent.find('table').first();
table.find('> tbody > tr, > tr').each(function () {
const firstCellText = $(this).find('td, th').first().text().trim();
if (!allowedHeadings.includes(firstCellText)) {
$(this).remove();
}
});
// Content wrapper
const $content = $('<div>', {
class: 'footer-transparency-content',
id: 'transparency-footer-content'
}).append(table);
// Icon
const $icon = $('<span>', {
class: 'footer-transparency-icon',
text: '+'
});
// Title
const $title = $('<h3>', {
text: 'Colorado Metro District Transparency Details'
});
// Toggle row
const $toggle = $('<div>', {
class: 'footer-transparency-toggle',
role: 'button',
tabindex: 0,
'aria-expanded': 'false',
'aria-label': 'Toggle Colorado Metro District Transparency Details',
click: function () {
const expanded = $content.is(':visible');
$content.slideToggle();
$icon.text(expanded ? '+' : '−');
$(this).attr('aria-expanded', String(!expanded));
},
keydown: function (e) {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
$(this).click();
}
}
}).append($title, $icon);
// Accordion container
const $accordion = $('<div class="footer-transparency-accordion"></div>').append($toggle, $content);
const $accordionWrapper = $('<div style="max-width: 1200px; margin: 0 auto;"></div>').append($accordion);
// Inject into footer
footer.prepend($accordionWrapper);
}).fail(function () {
console.error('[Transparency] Failed to load /transparency.html');
});
});
}
// Load jQuery if not already present
if (typeof jQuery === 'undefined') {
var script = document.createElement('script');
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js';
script.onload = runTransparencyFooter;
document.head.appendChild(script);
} else {
runTransparencyFooter();
}
</script>