| [9e5438e] | 1 | <%# Shared tab bar for the unified Fediverse section. Owner/admin-only.
|
|---|
| [f1a23b8] | 2 | Param: active = 'feed' | 'connect' | 'berichten' | 'blokkeren'
|
|---|
| 3 | (legacy values 'following'/'followers' → Connect, 'reacties'/'meldingen' → Berichten).
|
|---|
| [297c77d] | 4 | All tabs share the content width equally (flex:1) and always fit (ellipsis).
|
|---|
| 5 | "Back to site" lives in the top nav, not here. %>
|
|---|
| [9e5438e] | 6 | <% var _a = (typeof active !== 'undefined') ? active : ''; %>
|
|---|
| 7 | <% var _nu = (typeof notifUnread !== 'undefined') ? notifUnread : 0; %>
|
|---|
| [297c77d] | 8 | <nav class="fedi-tabs" aria-label="Fediverse">
|
|---|
| [eefd302] | 9 | <a href="/news" class="fedi-tab<%= _a === 'feed' ? ' is-active' : '' %>"
|
|---|
| 10 | hx-get="/news?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/news" hx-indicator="#pcms-loading"><%= t('tl.tab_feed') %></a>
|
|---|
| [b109a29] | 11 | <a href="/connect" class="fedi-tab<%= (_a === 'connect' || _a === 'following' || _a === 'followers') ? ' is-active' : '' %>"
|
|---|
| 12 | hx-get="/connect?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/connect" hx-indicator="#pcms-loading"><%= t('tl.tab_connect') %></a>
|
|---|
| [f1a23b8] | 13 | <a href="/messages" class="fedi-tab<%= (_a === 'berichten' || _a === 'reacties' || _a === 'meldingen') ? ' is-active' : '' %>"
|
|---|
| 14 | hx-get="/messages?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/messages" hx-indicator="#pcms-loading"><span class="fedi-tab-label"><%= t('msg.tab') %></span><% if (_nu > 0) { %><span class="fedi-tab-badge"><%= _nu > 9 ? '9+' : _nu %></span><% } %></a>
|
|---|
| [297c77d] | 15 | <a href="/blocking" class="fedi-tab<%= _a === 'blokkeren' ? ' is-active' : '' %>"
|
|---|
| 16 | hx-get="/blocking?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/blocking" hx-indicator="#pcms-loading"><%= t('blk.title') %></a>
|
|---|
| 17 | </nav>
|
|---|
| [9e5438e] | 18 | <style>
|
|---|
| [297c77d] | 19 | /* All 5 tabs share the width equally and always fit (truncate with ellipsis if needed). */
|
|---|
| [dee7f02] | 20 | .fedi-tabs { display: flex; margin: 0 0 1.25rem;
|
|---|
| [9e5438e] | 21 | border-bottom: 1px solid color-mix(in srgb, var(--ink, #000) 10%, transparent); }
|
|---|
| [297c77d] | 22 | .fedi-tab { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|---|
| 23 | padding: .6rem .4rem; text-decoration: none; font-weight: 600; font-size: .95rem;
|
|---|
| 24 | color: var(--ink-soft, #888); border-bottom: 2px solid transparent; margin-bottom: -1px;
|
|---|
| 25 | display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
|
|---|
| [9e5438e] | 26 | .fedi-tab:hover { color: var(--ink, #000); }
|
|---|
| 27 | .fedi-tab.is-active { color: var(--accent, #06c); border-bottom-color: var(--accent, #06c); }
|
|---|
| [297c77d] | 28 | .fedi-tab-label { overflow: hidden; text-overflow: ellipsis; }
|
|---|
| 29 | .fedi-tab-badge { flex: 0 0 auto; min-width: 1.15em; padding: 0 .3em; border-radius: 999px;
|
|---|
| 30 | background: var(--accent, #e8b04b); color: #fff; font-size: .66rem; line-height: 1.5; text-align: center; }
|
|---|
| 31 | @media (max-width: 520px) { .fedi-tab { padding: .55rem .25rem; font-size: .82rem; } }
|
|---|
| 32 | @media (max-width: 380px) { .fedi-tab { font-size: .74rem; } }
|
|---|
| [9e5438e] | 33 | </style>
|
|---|