Add notebook tabs (users, wiki); hide news+login+intro when sessionid cookie present

This commit is contained in:
Kato
2026-09-02 17:22:05 +00:00
parent dd9dcb8a65
commit ec8ef0c19e
+56 -2
View File
@@ -67,6 +67,12 @@
.sidebar-col { position: sticky; top: 20px; height: fit-content; }
.login-panel { background: var(--gray1); padding: 32px; border-radius: 16px; border: 1px solid var(--gray2); }
.notebook { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.notebook .tabs { display: flex; border-bottom: 2px solid var(--gray2); }
.notebook .tab { flex: 1; padding: 14px; text-align: center; font-weight: 600; cursor: pointer; border: none; background: #f9fafb; color: #6b7280; }
.notebook .tab.active { background: var(--white); color: var(--black); border-bottom: 3px solid var(--blue); }
.notebook .tab-content { padding: 24px; min-height: 200px; }
.notebook .hidden { display: none; }
.login-panel h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--gray2); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
@@ -113,7 +119,7 @@
</div>
</header>
<section class="intro">
<section class="intro" id="intro-section">
<p class="hide-de">Willkommen in der Gruppe Paraguay LLC & SRL! Diese Gruppe dient dem Austausch von Menschen, die in Paraguay eine LLC oder SRL betreiben oder sich damit beschäftigen.</p>
<p class="hide-en">Welcome to the Paraguay LLC & SRL group! This group serves as an exchange platform for people who run or are engaged with an LLC or SRL in Paraguay.</p>
</section>
@@ -193,7 +199,7 @@
</div>
</div>
<aside class="sidebar-col">
<aside class="sidebar-col hidden" id="login-panel">
<div class="login-panel">
<h3 class="hide-de">Anmeldung</h3>
<h3 class="hide-en">Login</h3>
@@ -238,6 +244,33 @@
</div>
</aside>
<aside class="sidebar-col hidden" id="notebook-panel">
<div class="notebook">
<div class="tabs">
<button class="tab active" data-tab="users">
<span class="hide-de">Mitglieder</span>
<span class="hide-en">Members</span>
</button>
<button class="tab" data-tab="wiki">
<span class="hide-de">Wiki</span>
<span class="hide-en">Wiki</span>
</button>
</div>
<div class="tab-content" id="tab-users">
<h3 class="hide-de">Mitglieder</h3>
<h3 class="hide-en">Members</h3>
<p class="hide-de">Hier werden in Kürze alle Community-Mitglieder angezeigt.</p>
<p class="hide-en">All community members will be displayed here soon.</p>
</div>
<div class="tab-content hidden" id="tab-wiki">
<h3 class="hide-de">Wiki</h3>
<h3 class="hide-en">Wiki</h3>
<p class="hide-de">Hier finden Sie nützliche Informationen zu LLC/SRL in Paraguay.</p>
<p class="hide-en">Useful information about LLC/SRL in Paraguay can be found here.</p>
</div>
</div>
</aside>
</div>
</main>
@@ -250,6 +283,16 @@
</footer>
<script>
function checkSession() {
const sessionid = getCookie('sessionid');
if (sessionid) {
document.getElementById('intro-section').classList.add('hidden');
document.getElementById('news-col').classList.add('hidden');
document.getElementById('login-panel').classList.add('hidden');
document.getElementById('notebook-panel').classList.remove('hidden');
}
}
document.querySelectorAll('.lang-btn').forEach(btn => {
btn.addEventListener('click', () => {
const lang = btn.dataset.lang;
@@ -297,6 +340,16 @@
}
}
document.querySelectorAll('.notebook .tab').forEach(tab => {
tab.addEventListener('click', () => {
document.querySelectorAll('.notebook .tab').forEach(t => t.classList.remove('active'));
tab.classList.add('active');
const tabName = tab.dataset.tab;
document.querySelectorAll('.notebook .tab-content').forEach(c => c.classList.add('hidden'));
document.getElementById('tab-' + tabName).classList.remove('hidden');
});
});
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
@@ -365,6 +418,7 @@
}
checkSession();
</script>
</body>
</html>