fix: 共通ヘッダー検索欄のはみ出しとサイドバー下への回り込みを修正
This commit is contained in:
1 parent
c3759d1c8e
commit
0533cd3896
3 files changed
+36
-2
No files matched your search
@@ -152,6 +152,7 @@ a:hover {
|
||||
#wiki-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
/* 左サイドバー */
|
||||
@@ -161,6 +162,9 @@ a:hover {
|
||||
border-right: 1px solid var(--wiki-border);
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
/* iframe共通コンポーネント */
|
||||
@@ -176,7 +180,8 @@ a:hover {
|
||||
.wiki-sidebar-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 1450px;
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
@@ -233,11 +238,16 @@ a:hover {
|
||||
/* サイト内検索枠(サイドバー) */
|
||||
.sidebar-search-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
align-items: stretch;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.sidebar-search-input {
|
||||
flex: 1;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
padding: 5px 8px;
|
||||
font-size: 12px;
|
||||
border: 1px solid var(--wiki-border);
|
||||
@@ -250,6 +260,8 @@ a:hover {
|
||||
}
|
||||
|
||||
.sidebar-search-btn {
|
||||
flex: 0 0 auto;
|
||||
white-space: nowrap;
|
||||
background-color: #646d7a;
|
||||
color: #ffffff;
|
||||
border: 1px solid #525a66;
|
||||
|
||||
@@ -746,4 +746,25 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// サイドバー iframe を内容の高さに追従させる
|
||||
if (sidebarFrame) {
|
||||
|
||||
const fitSidebar = function () {
|
||||
|
||||
try {
|
||||
|
||||
const doc = sidebarFrame.contentWindow.document;
|
||||
|
||||
sidebarFrame.style.height = doc.body.scrollHeight + 'px';
|
||||
|
||||
} catch (e) { /* クロスオリジン時は無視 */ }
|
||||
|
||||
};
|
||||
|
||||
sidebarFrame.addEventListener('load', fitSidebar);
|
||||
|
||||
window.addEventListener('resize', fitSidebar);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user