feat: iframeを廃止しCSS Grid 3ペイン化とスマホ用ドロワーを全ページに導入
This commit is contained in:
1 parent
6260f99a1b
commit
9c0b1a4d99
373 files changed
+1327
-1815
No files matched your search
@@ -148,42 +148,35 @@ a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* 2カラムレイアウト(ボディ) */
|
||||
/* 3ペイングリッドレイアウト(ヘッダー・サイドメニュー・コンテンツ) */
|
||||
#wiki-container {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 250px minmax(0, 1fr);
|
||||
grid-template-areas: "sidebar main";
|
||||
align-items: start;
|
||||
flex: 1;
|
||||
align-items: stretch;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 左サイドバー */
|
||||
/* 左サイドバー(グリッド列・通常配置) */
|
||||
#wiki-sidebar {
|
||||
grid-area: sidebar;
|
||||
width: 250px;
|
||||
max-width: 100%;
|
||||
background-color: var(--wiki-sidebar-bg);
|
||||
border-right: 1px solid var(--wiki-border);
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-self: stretch;
|
||||
padding: 16px 12px;
|
||||
align-self: start;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* iframe共通コンポーネント */
|
||||
.wiki-header-frame {
|
||||
width: 100%;
|
||||
height: 124px;
|
||||
border: none;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
/* モバイル用ドロワー制御(PC幅では無効) */
|
||||
.wiki-drawer-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wiki-sidebar-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1 1 auto;
|
||||
min-height: 600px;
|
||||
border: none;
|
||||
display: block;
|
||||
.wiki-drawer-overlay {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-box {
|
||||
@@ -277,10 +270,10 @@ a:hover {
|
||||
|
||||
/* 右メインコンテンツ */
|
||||
#wiki-main {
|
||||
flex: 1;
|
||||
grid-area: main;
|
||||
padding: 24px 30px 48px;
|
||||
background-color: #ffffff;
|
||||
min-width: 0; /* flex縮小バグ防止 */
|
||||
min-width: 0; /* グリッド列の最小幅暴走防止 */
|
||||
}
|
||||
|
||||
/* パンくずリスト */
|
||||
@@ -728,3 +721,106 @@ ul.wiki-list li, ol.wiki-list li {
|
||||
margin: 0;
|
||||
padding: 12px 14px 12px 32px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
レスポンシブ(3ペイン → 1カラム+オフキャンバスドロワー)
|
||||
860px 以下でサイドメニューを左ドロワー化する
|
||||
============================================================ */
|
||||
@media (max-width: 860px) {
|
||||
#wiki-container {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-areas: "main";
|
||||
}
|
||||
|
||||
/* ヘッダー内のハンバーガーボタン */
|
||||
.wiki-drawer-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
z-index: 110;
|
||||
background-color: var(--wiki-bar-bg);
|
||||
color: var(--wiki-bar-text);
|
||||
border: 1px solid #3c424c;
|
||||
border-radius: 3px;
|
||||
padding: 7px 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wiki-drawer-toggle:hover {
|
||||
background-color: #3f4651;
|
||||
}
|
||||
|
||||
/* ドロワー化したサイドバー */
|
||||
#wiki-sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 120;
|
||||
width: 82vw;
|
||||
max-width: 320px;
|
||||
height: 100vh;
|
||||
border-right: 1px solid var(--wiki-border);
|
||||
border-bottom: none;
|
||||
overflow-y: auto;
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
#wiki-sidebar.is-open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/* 背景オーバーレイ */
|
||||
.wiki-drawer-overlay {
|
||||
display: block;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 115;
|
||||
background-color: rgba(0, 0, 0, 0.45);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, visibility 0.2s ease;
|
||||
}
|
||||
|
||||
.wiki-drawer-overlay.is-open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#wiki-main {
|
||||
padding: 18px 16px 36px;
|
||||
}
|
||||
|
||||
.wiki-nav-list {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.wiki-nav-list li a {
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 長いURL・コード・表で横スクロールが発生しないようにする */
|
||||
#wiki-main table {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
#wiki-header {
|
||||
padding: 52px 16px 14px;
|
||||
}
|
||||
|
||||
.wiki-site-title {
|
||||
font-size: 19px;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user