diff --git a/common/css/seesaa_neutral_gray.css b/common/css/seesaa_neutral_gray.css new file mode 100644 index 0000000..1bf7dd5 --- /dev/null +++ b/common/css/seesaa_neutral_gray.css @@ -0,0 +1,515 @@ +@charset "UTF-8"; + +/* ========================================================================== + Seesaa Wiki ニュートラルグレー(Neutral Gray)完全踏襲スタイルシート + FINAL FANTASY XIV 総合攻略Wiki 専用共通デザイン + ========================================================================== */ + +/* 基本リセット & 変数定義 */ +:root { + --wiki-bg: #ebeeef; /* ページ全体のベース背景(淡いグレー) */ + --wiki-wrap-bg: #ffffff; /* コンテンツ全体の背景(白) */ + --wiki-border: #d0d3d8; /* 基本枠線色 */ + --wiki-border-light: #e4e6ea; /* 薄い区切り線 */ + --wiki-text-main: #2b2f36; /* 本文文字色(濃いグレー) */ + --wiki-text-muted: #69707d; /* 補足文字色 */ + --wiki-link: #0b5fb3; /* リンク青 */ + --wiki-link-hover: #083c70; /* リンクホバー色 */ + + /* ニュートラルグレー見出し・バーカラー */ + --wiki-bar-bg: #525a66; /* ナビバー・サイドメニュー見出し背景 */ + --wiki-bar-text: #ffffff; /* バー文字色 */ + --wiki-h2-bg: #eef0f3; /* H2帯背景色 */ + --wiki-h2-border: #525a66; /* H2左ボーダー色 */ + --wiki-h3-border: #636d7a; /* H3下ボーダー色 */ + + /* サイドバー */ + --wiki-sidebar-bg: #f7f8fa; /* サイドバー背景 */ + --wiki-sidebar-box-bg: #ffffff; /* サイドメニュー枠背景 */ + + /* テーブル */ + --wiki-th-bg: #eceef2; /* 表見出し背景 */ + --wiki-th-text: #333842; /* 表見出し文字色 */ + --wiki-td-stripe: #fafbfc; /* 表ストライプ行 */ + + /* マクロ・コードブロック */ + --wiki-macro-bg: #f5f6f8; /* マクロ表示背景 */ + --wiki-macro-border: #c8cbd2; /* マクロ枠線 */ + --wiki-macro-header: #e4e6ec; /* マクロタイトルヘッダー */ + + /* コールアウト・通知枠 */ + --wiki-info-bg: #eef5fc; + --wiki-info-border: #b8d4ed; + --wiki-warn-bg: #fff9eb; + --wiki-warn-border: #ecd499; + --wiki-danger-bg: #fdf2f2; + --wiki-danger-border: #f0b8b8; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + background-color: var(--wiki-bg); + color: var(--wiki-text-main); + font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif; + font-size: 14px; + line-height: 1.68; + -webkit-font-smoothing: antialiased; +} + +a { + color: var(--wiki-link); + text-decoration: none; +} + +a:hover { + color: var(--wiki-link-hover); + text-decoration: underline; +} + +/* 全体ラッパー(Seesaa Wiki風中央配置) */ +#wiki-wrapper { + max-width: 1240px; + margin: 0 auto; + background-color: var(--wiki-wrap-bg); + border-left: 1px solid var(--wiki-border); + border-right: 1px solid var(--wiki-border); + min-height: 100vh; + display: flex; + flex-direction: column; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.06); +} + +/* ヘッダーエリア */ +#wiki-header { + background-color: #ffffff; + padding: 24px 30px 18px; + border-bottom: 1px solid var(--wiki-border); +} + +.wiki-site-title { + font-size: 24px; + font-weight: 700; + color: #333942; + letter-spacing: -0.01em; + margin-bottom: 6px; +} + +.wiki-site-title a { + color: #333942; + text-decoration: none; +} + +.wiki-site-title a:hover { + color: var(--wiki-link); + text-decoration: none; +} + +.wiki-site-desc { + font-size: 12px; + color: var(--wiki-text-muted); +} + +/* グローバルナビゲーションバー(ニュートラルグレー帯) */ +#wiki-global-nav { + background-color: var(--wiki-bar-bg); + border-top: 1px solid #444b55; + border-bottom: 1px solid #3c424c; +} + +.wiki-nav-list { + display: flex; + list-style: none; + flex-wrap: wrap; + padding: 0 16px; +} + +.wiki-nav-list li a { + display: block; + padding: 9px 16px; + color: var(--wiki-bar-text); + font-size: 13px; + font-weight: 600; + border-right: 1px solid rgba(255, 255, 255, 0.12); + transition: background-color 0.15s ease; +} + +.wiki-nav-list li:first-child a { + border-left: 1px solid rgba(255, 255, 255, 0.12); +} + +.wiki-nav-list li a:hover, +.wiki-nav-list li a.active { + background-color: #3f4651; + text-decoration: none; +} + +/* 2カラムレイアウト(ボディ) */ +#wiki-container { + display: flex; + flex: 1; +} + +/* 左サイドバー */ +#wiki-sidebar { + width: 250px; + background-color: var(--wiki-sidebar-bg); + border-right: 1px solid var(--wiki-border); + padding: 16px 12px; + flex-shrink: 0; +} + +.sidebar-box { + background-color: var(--wiki-sidebar-box-bg); + border: 1px solid var(--wiki-border); + margin-bottom: 16px; + font-size: 13px; +} + +.sidebar-title { + background-color: var(--wiki-bar-bg); + color: var(--wiki-bar-text); + font-size: 12px; + font-weight: 700; + padding: 6px 12px; + letter-spacing: 0.03em; +} + +.sidebar-content { + padding: 8px 12px; +} + +.sidebar-content ul { + list-style: none; +} + +.sidebar-content li { + padding: 4px 0; + border-bottom: 1px dashed var(--wiki-border-light); +} + +.sidebar-content li:last-child { + border-bottom: none; +} + +.sidebar-content li a { + color: #38404a; + display: block; + transition: color 0.12s; +} + +.sidebar-content li a:hover { + color: var(--wiki-link); + padding-left: 3px; +} + +.sidebar-content li.current a { + font-weight: 700; + color: var(--wiki-link); +} + +/* サイト内検索枠(サイドバー) */ +.sidebar-search-box { + display: flex; + gap: 4px; +} + +.sidebar-search-input { + flex: 1; + padding: 5px 8px; + font-size: 12px; + border: 1px solid var(--wiki-border); + outline: none; + border-radius: 2px; +} + +.sidebar-search-input:focus { + border-color: var(--wiki-bar-bg); +} + +.sidebar-search-btn { + background-color: #646d7a; + color: #ffffff; + border: 1px solid #525a66; + padding: 5px 10px; + font-size: 12px; + cursor: pointer; + border-radius: 2px; +} + +.sidebar-search-btn:hover { + background-color: #4b535f; +} + +/* 右メインコンテンツ */ +#wiki-main { + flex: 1; + padding: 24px 30px 48px; + background-color: #ffffff; + min-width: 0; /* flex縮小バグ防止 */ +} + +/* パンくずリスト */ +.wiki-breadcrumbs { + font-size: 12px; + color: var(--wiki-text-muted); + margin-bottom: 16px; + padding-bottom: 8px; + border-bottom: 1px solid var(--wiki-border-light); +} + +.wiki-breadcrumbs a { + color: var(--wiki-text-muted); +} + +.wiki-breadcrumbs a:hover { + color: var(--wiki-link); +} + +.wiki-breadcrumbs span { + margin: 0 4px; +} + +/* ページタイトル(H1) */ +.wiki-page-header { + margin-bottom: 24px; + border-bottom: 2px solid var(--wiki-bar-bg); + padding-bottom: 10px; +} + +.wiki-page-title { + font-size: 22px; + font-weight: 700; + color: #24292f; + margin-bottom: 6px; +} + +.wiki-page-meta { + font-size: 11px; + color: var(--wiki-text-muted); + display: flex; + gap: 16px; +} + +/* Seesaa Wiki ニュートラルグレー見出しスタイル */ +h2.wiki-h2 { + font-size: 16px; + font-weight: 700; + color: #2e343d; + background-color: var(--wiki-h2-bg); + border-left: 6px solid var(--wiki-h2-border); + border-top: 1px solid var(--wiki-border-light); + border-right: 1px solid var(--wiki-border-light); + border-bottom: 1px solid var(--wiki-border-light); + padding: 8px 14px; + margin-top: 32px; + margin-bottom: 16px; +} + +h3.wiki-h3 { + font-size: 15px; + font-weight: 700; + color: #38404b; + border-left: 4px solid var(--wiki-h3-border); + border-bottom: 1px solid #d8dade; + padding: 4px 10px; + margin-top: 24px; + margin-bottom: 12px; +} + +h4.wiki-h4 { + font-size: 14px; + font-weight: 700; + color: #4b535f; + margin-top: 18px; + margin-bottom: 8px; + border-bottom: 1px dotted var(--wiki-border); + padding-bottom: 2px; +} + +p { + margin-bottom: 14px; +} + +/* リスト */ +ul.wiki-list, ol.wiki-list { + margin-left: 24px; + margin-bottom: 16px; +} + +ul.wiki-list li, ol.wiki-list li { + margin-bottom: 4px; +} + +/* テーブルスタイル(Seesaa標準) */ +.wiki-table { + width: 100%; + border-collapse: collapse; + margin: 16px 0 24px; + font-size: 13px; + border: 1px solid var(--wiki-border); +} + +.wiki-table th, .wiki-table td { + border: 1px solid var(--wiki-border); + padding: 8px 12px; + text-align: left; +} + +.wiki-table th { + background-color: var(--wiki-th-bg); + color: var(--wiki-th-text); + font-weight: 700; + text-align: center; + white-space: nowrap; +} + +.wiki-table tr:nth-child(even) td { + background-color: var(--wiki-td-stripe); +} + +/* マクロ解説専用枠(完全詳細仕様) */ +.wiki-macro-box { + background-color: var(--wiki-macro-bg); + border: 1px solid var(--wiki-macro-border); + border-radius: 3px; + margin: 18px 0 24px; + overflow: hidden; +} + +.wiki-macro-header { + background-color: var(--wiki-macro-header); + border-bottom: 1px solid var(--wiki-macro-border); + padding: 6px 12px; + font-size: 12px; + font-weight: 700; + color: #3b424d; + display: flex; + justify-content: space-between; + align-items: center; +} + +.wiki-macro-code { + font-family: Consolas, "Courier New", "Meiryo", monospace; + font-size: 13px; + line-height: 1.55; + background-color: #fbfcff; + padding: 12px 14px; + border-bottom: 1px dashed var(--wiki-macro-border); + white-space: pre-wrap; + word-break: break-all; + color: #1a202c; +} + +.wiki-macro-explanation { + padding: 10px 14px; + font-size: 12.5px; + background-color: #ffffff; + color: #444b55; + line-height: 1.6; +} + +.wiki-macro-explanation dt { + font-weight: 700; + color: #2b3038; + margin-top: 6px; +} + +.wiki-macro-explanation dd { + margin-left: 14px; + margin-bottom: 4px; +} + +/* コールアウト・注釈ボックス */ +.wiki-callout { + padding: 12px 16px; + margin: 16px 0; + border: 1px solid var(--wiki-border); + border-radius: 2px; + font-size: 13px; +} + +.wiki-callout.info { + background-color: var(--wiki-info-bg); + border-color: var(--wiki-info-border); +} + +.wiki-callout.warn { + background-color: var(--wiki-warn-bg); + border-color: var(--wiki-warn-border); +} + +.wiki-callout.danger { + background-color: var(--wiki-danger-bg); + border-color: var(--wiki-danger-border); +} + +.wiki-callout-title { + font-weight: 700; + margin-bottom: 4px; + display: flex; + align-items: center; + gap: 6px; +} + +.wiki-callout.info .wiki-callout-title { color: #1e5a8a; } +.wiki-callout.warn .wiki-callout-title { color: #8a621e; } +.wiki-callout.danger .wiki-callout-title { color: #9c2828; } + +/* ページネーション(前後のページリンク) */ +.wiki-pagination { + display: flex; + justify-content: space-between; + margin-top: 36px; + padding-top: 16px; + border-top: 1px solid var(--wiki-border); + font-size: 13px; +} + +.wiki-pagination a { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 6px 14px; + background-color: #f4f5f7; + border: 1px solid var(--wiki-border); + border-radius: 2px; + color: #3b424d; +} + +.wiki-pagination a:hover { + background-color: #e8eaee; + text-decoration: none; + color: var(--wiki-link); +} + +/* フッター */ +#wiki-footer { + background-color: #e2e4e8; + border-top: 1px solid var(--wiki-border); + padding: 18px 24px; + text-align: center; + font-size: 11px; + color: #6a717e; + line-height: 1.6; +} + +/* モバイル対応(レスポンシブ) */ +@media (max-width: 860px) { + #wiki-container { + flex-direction: column; + } + #wiki-sidebar { + width: 100%; + border-right: none; + border-bottom: 1px solid var(--wiki-border); + } + #wiki-main { + padding: 18px 16px 36px; + } +} + diff --git a/common/js/wiki_common.js b/common/js/wiki_common.js new file mode 100644 index 0000000..390b5ae --- /dev/null +++ b/common/js/wiki_common.js @@ -0,0 +1,51 @@ +/** + * Seesaa Wiki ニュートラルグレー 共通スクリプト + * FINAL FANTASY XIV 総合攻略Wiki + */ + +document.addEventListener('DOMContentLoaded', () => { + // マクロコピーボタンの初期化 + document.querySelectorAll('.wiki-macro-box').forEach(box => { + const header = box.querySelector('.wiki-macro-header'); + const code = box.querySelector('.wiki-macro-code'); + if (header && code) { + const btn = document.createElement('button'); + btn.textContent = '📋 マクロをコピー'; + btn.style.cssText = 'background: #525a66; color: #fff; border: 1px solid #3c424c; padding: 2px 8px; font-size: 11px; cursor: pointer; border-radius: 2px;'; + btn.addEventListener('click', () => { + navigator.clipboard.writeText(code.innerText.trim()).then(() => { + btn.textContent = '✔ コピー完了!'; + setTimeout(() => { btn.textContent = '📋 マクロをコピー'; }, 2000); + }); + }); + header.appendChild(btn); + } + }); + + // サイドバー簡易検索の初期化 + const searchInput = document.getElementById('sidebarSearchInput'); + const searchBtn = document.getElementById('sidebarSearchBtn'); + if (searchInput) { + const doSearch = () => { + const q = searchInput.value.trim(); + if (q) { + // ルートの index.html にクエリ付きで遷移 + const rootPath = getWikiRootPath(); + window.location.href = `${rootPath}index.html?q=${encodeURIComponent(q)}`; + } + }; + if (searchBtn) searchBtn.addEventListener('click', doSearch); + searchInput.addEventListener('keydown', (e) => { + if (e.key === 'Enter') doSearch(); + }); + } +}); + +function getWikiRootPath() { + // 現在の階層からWikiルートへの相対パスを計算 + const path = window.location.pathname; + const depth = (path.match(/\//g) || []).length; + // IISのルートからの深さに応じて調整 + return '/'; +} +