2025-07-01 15:37:35 -07:00
|
|
|
<script>
|
2025-09-10 19:38:38 -07:00
|
|
|
document.addEventListener("view_changed", ({ detail: { view } }) => {
|
|
|
|
|
const target_tab = document.querySelector(`.tab-switch[data-view="${view}"]`);
|
2025-07-25 14:36:53 -07:00
|
|
|
|
2025-09-10 19:38:38 -07:00
|
|
|
if (target_tab) {
|
|
|
|
|
target_tab.click();
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
2025-09-10 19:38:38 -07:00
|
|
|
});
|
2025-07-01 15:37:35 -07:00
|
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
|
|
|
const tab_switchers = document.querySelectorAll(".tab-switch");
|
|
|
|
|
for (const tab_switch of tab_switchers) {
|
|
|
|
|
tab_switch.addEventListener("input", (event) => {
|
|
|
|
|
const tab_selector = event.target;
|
2025-09-10 19:38:38 -07:00
|
|
|
const view = tab_selector.dataset.view;
|
|
|
|
|
if (view) {
|
|
|
|
|
window.location.hash = `/topic/${document.body.dataset.topic}/${view}`;
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
.tabs-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tabs {
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
2025-08-20 14:47:05 -07:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: flex-start;
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tabs::before,
|
|
|
|
|
.tabs::after {
|
|
|
|
|
content: "";
|
|
|
|
|
display: table;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tabs::after {
|
|
|
|
|
clear: both;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-switch {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-label {
|
|
|
|
|
position: relative;
|
2025-08-20 14:47:05 -07:00
|
|
|
width: 6rem;
|
2025-07-01 15:37:35 -07:00
|
|
|
height: 5rem;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.25s;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: end;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-label .label {
|
|
|
|
|
margin: 0.75rem 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-content {
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
top: 5rem;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transition: all 0.35s;
|
|
|
|
|
border-top: 1px solid var(--border-subtle);
|
|
|
|
|
margin-top: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-switch,
|
|
|
|
|
.tab-switch + .tab-label {
|
|
|
|
|
transition: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-switch:checked + .tab-label {
|
|
|
|
|
margin-top: 1px;
|
2025-07-02 21:28:07 -07:00
|
|
|
border-bottom: 1px solid var(--accent);
|
2025-07-01 15:37:35 -07:00
|
|
|
z-index: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-switch:checked + label + .tab-content {
|
|
|
|
|
z-index: 2;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media screen and (max-width: 800px) {
|
|
|
|
|
.tab-label {
|
2025-08-20 14:47:05 -07:00
|
|
|
width: 3rem;
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-label .label {
|
|
|
|
|
font-size: small;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-20 14:47:05 -07:00
|
|
|
@media screen and (max-width: 400px) {
|
2025-07-01 15:37:35 -07:00
|
|
|
.tab-label {
|
2025-08-20 14:47:05 -07:00
|
|
|
width: 2.5rem;
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-label .label {
|
2025-08-20 14:47:05 -07:00
|
|
|
font-size: 8px;
|
2025-07-01 15:37:35 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div class="tabs">
|
2025-09-05 11:03:53 -07:00
|
|
|
<!-- #include file="./chat/chat.html" -->
|
2025-09-12 14:26:16 -07:00
|
|
|
<!-- #include file="./live/live.html" -->
|
2025-09-11 14:09:28 -07:00
|
|
|
<!-- #include file="./blurbs/blurbs.html" -->
|
|
|
|
|
<!-- #include file="./forum/forum.html" -->
|
|
|
|
|
<!-- #include file="./essays/essays.html" -->
|
2025-07-23 13:01:52 -07:00
|
|
|
<!-- #include file="./calendar/calendar.html" -->
|
2025-07-01 15:37:35 -07:00
|
|
|
</div>
|