From 819af159a94437dd66d08c1b9f896f9028e097dc Mon Sep 17 00:00:00 2001 From: Lindsey Bieda Date: Sat, 13 Dec 2025 05:59:16 +0000 Subject: [PATCH 1/6] Remove border-left --- static/css/style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/static/css/style.css b/static/css/style.css index 436f58a..ee2119d 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -164,7 +164,6 @@ button.loading:hover { padding: 20px; background: var(--section-bg); border-radius: 10px; - border-left: 5px solid #667eea; transition: background 0.3s ease; } From 27c16adf574de464b60c04837102bccb76fbf27a Mon Sep 17 00:00:00 2001 From: Lindsey Bieda Date: Sat, 13 Dec 2025 06:17:42 +0000 Subject: [PATCH 2/6] Add toggles for for full chart sections --- static/css/style.css | 72 +++++++++++++++++++++++++++++++++++++ static/js/section-toggle.js | 67 ++++++++++++++++++++++++++++++++++ templates/full_chart.html | 19 +++++++--- 3 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 static/js/section-toggle.js diff --git a/static/css/style.css b/static/css/style.css index ee2119d..b87d268 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -847,3 +847,75 @@ input[readonly] { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } +/* Toggleable Section Styles */ +.toggleable-section { + position: relative; + padding: 0; +} + +.section-header { + display: flex; + align-items: center; + cursor: pointer; + user-select: none; + padding: 15px; + margin: 0; + border-radius: 8px; + transition: all 0.2s ease; + width: 100%; + border: 1px solid var(--border-color); + background: var(--section-bg); + text-align: left; + box-shadow: none; +} + +.section-header:hover { + background: rgba(102, 126, 234, 0.05); + border-color: #667eea; + box-shadow: none; +} + +.dark-mode .section-header:hover { + background: rgba(102, 126, 234, 0.1); + border-color: #667eea; + box-shadow: none; +} + +.section-header h2 { + margin: 0; + flex: 1; + pointer-events: none; +} + +.toggle-btn { + background: transparent; + border: none; + font-size: 16px; + cursor: pointer; + padding: 0; + margin-right: 10px; + color: var(--text-secondary); + transition: color 0.2s ease; + line-height: 1; + flex-shrink: 0; + width: 16px; + height: 16px; + display: inline-flex; + align-items: center; + justify-content: center; + font-family: monospace; +} + +.section-content { + max-height: 10000px; + overflow: hidden; + transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease; + opacity: 1; + padding: 20px; +} + +.section-content.collapsed { + max-height: 0; + opacity: 0; + padding: 0; +} \ No newline at end of file diff --git a/static/js/section-toggle.js b/static/js/section-toggle.js new file mode 100644 index 0000000..91c36b2 --- /dev/null +++ b/static/js/section-toggle.js @@ -0,0 +1,67 @@ +/** + * Toggle functionality for collapsible sections + */ + +function initializeToggleSections() { + const headers = document.querySelectorAll('.section-header'); + + headers.forEach(header => { + header.addEventListener('click', function(e) { + e.preventDefault(); + + const sectionId = this.getAttribute('data-section'); + const content = document.getElementById(sectionId); + const toggleIcon = this.querySelector('.toggle-btn'); + const isCollapsed = content.classList.contains('collapsed'); + + if (isCollapsed) { + // Expand section + content.classList.remove('collapsed'); + toggleIcon.classList.remove('collapsed'); + toggleIcon.textContent = '▼'; + this.setAttribute('aria-expanded', 'true'); + + // Save state to localStorage + localStorage.setItem(`section-${sectionId}`, 'expanded'); + } else { + // Collapse section + content.classList.add('collapsed'); + toggleIcon.classList.add('collapsed'); + toggleIcon.textContent = '▶'; + this.setAttribute('aria-expanded', 'false'); + + // Save state to localStorage + localStorage.setItem(`section-${sectionId}`, 'collapsed'); + } + }); + }); + + // Restore saved states from localStorage + restoreSectionStates(); +} + +function restoreSectionStates() { + const headers = document.querySelectorAll('.section-header'); + + headers.forEach(header => { + const sectionId = header.getAttribute('data-section'); + const savedState = localStorage.getItem(`section-${sectionId}`); + const content = document.getElementById(sectionId); + const toggleIcon = header.querySelector('.toggle-btn'); + + if (savedState === 'expanded') { + content.classList.remove('collapsed'); + toggleIcon.classList.remove('collapsed'); + toggleIcon.textContent = '▼'; + header.setAttribute('aria-expanded', 'true'); + } + // Default is already collapsed, no need to do anything + }); +} + +// Initialize when DOM is ready +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initializeToggleSections); +} else { + initializeToggleSections(); +} diff --git a/templates/full_chart.html b/templates/full_chart.html index 4df3309..31063d3 100644 --- a/templates/full_chart.html +++ b/templates/full_chart.html @@ -5,6 +5,7 @@ {% block extra_scripts %} + {% if streaming %} @@ -148,8 +149,12 @@

⬆️ Ascendant

-
-

🪐 All Planets

+
+ +
-
-

🏠 Houses

+
+ + +