Shires Of Britain Instant

// Function to highlight active button let activeButton = null; function setActiveButton(buttonElement) if (activeButton) activeButton.classList.remove('active');

// Helper to update panel based on shire object function updateInfoPanel(shire) shireNameDisplay.textContent = shire.name; countyTownSpan.textContent = shire.town; knownForSpan.textContent = shire.known; sinceSpan.textContent = shire.since; regionSpan.textContent = shire.region; famousQuoteSpan.innerHTML = 💬 $shire.motto ; // Optional: add micro animation or scroll effect - just smooth update

/* map stylized grid / interactive buttons */ .map-title font-weight: 600; background: #2e4a2c; color: #fef2e0; padding: 1rem 1.5rem; font-size: 1.3rem; letter-spacing: 1px; shires of britain

/* header section */ .shires-header text-align: center; margin-bottom: 2rem; border-bottom: 3px solid #b68b40; display: inline-block; width: 100%;

<div class="shire-explorer"> <!-- Interactive map / button grid panel --> <div class="shire-map-panel"> <div class="map-title"> 🗺️ Click any Shire </div> <div class="shire-grid" id="shireButtonsContainer"> <!-- dynamic buttons from JS --> </div> <div class="mini-map-illustration"> 🏰 <span>Historic Shires of Britain</span> — over 30 traditional counties · from Cornwall to Caithness </div> </div> // Function to highlight active button let activeButton

.shire-grid::-webkit-scrollbar-thumb background: #b68b40; border-radius: 8px;

// Additional tweak: if somehow we want to set default when page fully loads function initFeature() buildShireButtons(); // In case the first shire wasn't triggered due to timing, explicitly set from allShires[0] if (allShires.length > 0 && (!activeButton)) const defaultShire = allShires[0]; updateInfoPanel(defaultShire); // also try to highlight first button const firstBtn = document.querySelector('.shire-btn'); if (firstBtn) setActiveButton(firstBtn); countyTownSpan.textContent = shire.town

.shire-grid display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.7rem; padding: 1.8rem; background: #fef7e8; max-height: 520px; overflow-y: auto;