Compare commits
1 Commits
burn/38-17
...
fix/59
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbc513821f |
47
index.html
47
index.html
@@ -80,37 +80,6 @@ html, body {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* ===== HEADER SAFETY PLAN BUTTON ===== */
|
||||
#header-safety-plan {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ff6b6b;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
transition: background 0.2s, color 0.2s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#header-safety-plan:hover,
|
||||
#header-safety-plan:focus {
|
||||
background: rgba(255, 107, 107, 0.15);
|
||||
color: #ff8a8a;
|
||||
outline: 2px solid #ff6b6b;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
#header-safety-plan svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
|
||||
.status-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
@@ -660,10 +629,6 @@ html, body {
|
||||
<span class="status-dot"></span>
|
||||
<span id="status-text">Online</span>
|
||||
</div>
|
||||
<button id="header-safety-plan" aria-label="Open My Safety Plan" title="Open My Safety Plan">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
|
||||
<span>Safety Plan</span>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<!-- Enhanced crisis panel - shown on keyword detection -->
|
||||
@@ -715,7 +680,7 @@ html, body {
|
||||
|
||||
<!-- Footer -->
|
||||
<footer id="footer">
|
||||
<a href="/about" aria-label="About The Door">about</a>
|
||||
<a href="/about.html" aria-label="About The Door">about</a>
|
||||
<button id="safety-plan-btn" aria-label="Open My Safety Plan">my safety plan</button>
|
||||
<button id="clear-chat-btn" aria-label="Clear chat history">clear chat</button>
|
||||
</footer>
|
||||
@@ -1332,16 +1297,6 @@ Sovereignty and service always.`;
|
||||
safetyPlanModal.classList.add('active');
|
||||
_activateSafetyPlanFocusTrap(crisisSafetyPlanBtn);
|
||||
});
|
||||
|
||||
// Header safety plan button
|
||||
var headerSafetyPlanBtn = document.getElementById('header-safety-plan');
|
||||
if (headerSafetyPlanBtn) {
|
||||
headerSafetyPlanBtn.addEventListener('click', function() {
|
||||
loadSafetyPlan();
|
||||
safetyPlanModal.classList.add('active');
|
||||
_activateSafetyPlanFocusTrap(headerSafetyPlanBtn);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ===== TEXTAREA AUTO-RESIZE =====
|
||||
|
||||
24
tests/test_about_link.py
Normal file
24
tests/test_about_link.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import pathlib
|
||||
import unittest
|
||||
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
INDEX_HTML = ROOT / 'index.html'
|
||||
ABOUT_HTML = ROOT / 'about.html'
|
||||
|
||||
|
||||
class TestAboutLink(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.html = INDEX_HTML.read_text(encoding='utf-8')
|
||||
|
||||
def test_about_page_exists(self):
|
||||
self.assertTrue(ABOUT_HTML.exists(), 'about.html should exist for static serving')
|
||||
|
||||
def test_footer_about_link_targets_static_about_html(self):
|
||||
self.assertIn('href="/about.html"', self.html)
|
||||
self.assertNotIn('href="/about"', self.html)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user