| 1 | <%# Shared tab bar for the unified Fediverse section. Owner/admin-only.
|
|---|
| 2 | Param: active = 'feed' | 'following' | 'reacties' | 'meldingen' | 'blokkeren'.
|
|---|
| 3 | Responsive: horizontal tabs that scroll on narrow screens. %>
|
|---|
| 4 | <% var _a = (typeof active !== 'undefined') ? active : ''; %>
|
|---|
| 5 | <% var _nu = (typeof notifUnread !== 'undefined') ? notifUnread : 0; %>
|
|---|
| 6 | <div class="fedi-bar">
|
|---|
| 7 | <a class="btn btn-primary fedi-bar-back" href="/"><%= t('nav.back_to_site') %></a>
|
|---|
| 8 | <nav class="fedi-tabs" aria-label="Fediverse">
|
|---|
| 9 | <a href="/tijdlijn" class="fedi-tab<%= _a === 'feed' ? ' is-active' : '' %>"
|
|---|
| 10 | hx-get="/tijdlijn?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/tijdlijn" hx-indicator="#pcms-loading"><%= t('tl.tab_feed') %></a>
|
|---|
| 11 | <a href="/volgend" class="fedi-tab<%= _a === 'following' ? ' is-active' : '' %>"
|
|---|
| 12 | hx-get="/volgend?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/volgend" hx-indicator="#pcms-loading"><%= t('tl.tab_following') %></a>
|
|---|
| 13 | <a href="/fediverse" class="fedi-tab<%= _a === 'reacties' ? ' is-active' : '' %>"
|
|---|
| 14 | hx-get="/fediverse?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/fediverse" hx-indicator="#pcms-loading"><%= t('tl.tab_replies') %></a>
|
|---|
| 15 | <a href="/meldingen" class="fedi-tab<%= _a === 'meldingen' ? ' is-active' : '' %>"
|
|---|
| 16 | hx-get="/meldingen?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/meldingen" hx-indicator="#pcms-loading"><%= t('notif.title') %><% if (_nu > 0) { %> <span class="fedi-tab-badge"><%= _nu > 9 ? '9+' : _nu %></span><% } %></a>
|
|---|
| 17 | <a href="/blokkeren" class="fedi-tab<%= _a === 'blokkeren' ? ' is-active' : '' %>"
|
|---|
| 18 | hx-get="/blokkeren?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/blokkeren" hx-indicator="#pcms-loading"><%= t('blk.title') %></a>
|
|---|
| 19 | </nav>
|
|---|
| 20 | </div>
|
|---|
| 21 | <style>
|
|---|
| 22 | .fedi-bar { margin: 0 0 1.25rem; }
|
|---|
| 23 | /* Big, full-width "back to site" button at the top of the Fediverse section. */
|
|---|
| 24 | .fedi-bar-back { display: block; width: 100%; box-sizing: border-box; text-align: center; margin: 0 0 1rem; padding: .7rem 1rem; }
|
|---|
| 25 | /* Tabs centered, wrap onto multiple rows on narrow screens (no scrollbar). */
|
|---|
| 26 | .fedi-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .25rem;
|
|---|
| 27 | border-bottom: 1px solid color-mix(in srgb, var(--ink, #000) 10%, transparent); }
|
|---|
| 28 | .fedi-tab { padding: .55rem .85rem; white-space: nowrap; text-decoration: none;
|
|---|
| 29 | color: var(--ink-soft, #888); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
|
|---|
| 30 | .fedi-tab:hover { color: var(--ink, #000); }
|
|---|
| 31 | .fedi-tab.is-active { color: var(--accent, #06c); border-bottom-color: var(--accent, #06c); }
|
|---|
| 32 | .fedi-tab-badge { display: inline-block; min-width: 1.15em; padding: 0 .3em; border-radius: 999px;
|
|---|
| 33 | background: var(--accent, #e8b04b); color: #fff; font-size: .68rem; line-height: 1.5; text-align: center; vertical-align: middle; }
|
|---|
| 34 | @media (max-width: 520px) { .fedi-tab { padding: .55rem .6rem; font-size: .92rem; } }
|
|---|
| 35 | </style>
|
|---|