fix mobile layout tab pds select

This commit is contained in:
2026-01-23 01:11:42 +09:00
parent 22f34377ec
commit 058965f58e
2 changed files with 12 additions and 4 deletions

View File

@@ -38,14 +38,14 @@ export function renderModeTabs(handle: string, activeTab: 'blog' | 'browser' | '
tabs += `<a href="/@${handle}/at/link" class="tab ${activeTab === 'link' ? 'active' : ''}">link</a>` tabs += `<a href="/@${handle}/at/link" class="tab ${activeTab === 'link' ? 'active' : ''}">link</a>`
} }
tabs += ` const pdsSelector = `
<div class="pds-selector" id="pds-selector"> <div class="pds-selector" id="pds-selector">
<button type="button" class="tab" id="pds-tab">pds</button> <button type="button" class="tab" id="pds-tab">pds</button>
<div class="pds-dropdown" id="pds-dropdown"></div> <div class="pds-dropdown" id="pds-dropdown"></div>
</div> </div>
` `
return `<div class="mode-tabs">${tabs}</div>` return `<div class="mode-tabs"><div class="tabs-scroll">${tabs}</div>${pdsSelector}</div>`
} }
// Render language selector (above content) // Render language selector (above content)

View File

@@ -282,13 +282,21 @@ body {
display: flex; display: flex;
gap: 4px; gap: 4px;
margin-bottom: 16px; margin-bottom: 16px;
align-items: center;
}
.tabs-scroll {
display: flex;
gap: 4px;
overflow-x: auto; overflow-x: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; -ms-overflow-style: none;
flex: 1;
min-width: 0;
} }
.mode-tabs::-webkit-scrollbar { .tabs-scroll::-webkit-scrollbar {
display: none; display: none;
} }
@@ -331,7 +339,7 @@ body {
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
min-width: 180px; min-width: 180px;
z-index: 100; z-index: 1000;
overflow: hidden; overflow: hidden;
} }