diff --git a/common/header.html b/common/header.html new file mode 100644 index 0000000..3c07afe --- /dev/null +++ b/common/header.html @@ -0,0 +1,31 @@ + + +
+ + +${group.name}
+${WIKI_NAV_CONFIG.footer.copyright}
+${WIKI_NAV_CONFIG.footer.subText}
+ `; +} + +// サイト内検索機能の初期化 +function initSearch(rootPrefix) { + const searchInput = document.getElementById('sidebarSearchInput'); + const searchBtn = document.getElementById('sidebarSearchBtn'); + if (searchInput) { + const doSearch = () => { + const q = searchInput.value.trim(); + if (q) { + window.location.href = `${rootPrefix}index.html?q=${encodeURIComponent(q)}`; + } + }; + if (searchBtn) searchBtn.addEventListener('click', doSearch); + searchInput.addEventListener('keydown', (e) => { + if (e.key === 'Enter') doSearch(); + }); + } +} + +// マクロコピーボタンの初期化 +function initMacroCopy() { document.querySelectorAll('.wiki-macro-box').forEach(box => { const header = box.querySelector('.wiki-macro-header'); const code = box.querySelector('.wiki-macro-code'); - if (header && code) { + if (header && code && !header.querySelector('button')) { const btn = document.createElement('button'); + btn.type = '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', () => { @@ -21,31 +295,19 @@ document.addEventListener('DOMContentLoaded', () => { 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 '/'; } +// DOMContentLoaded 時に一括実行 +document.addEventListener('DOMContentLoaded', () => { + const rootPrefix = getWikiRootPrefix(); + + // 共通コンポーネント自動レンダリング + renderHeader(rootPrefix); + renderGlobalNav(rootPrefix); + renderSidebar(rootPrefix); + renderFooter(); + + // 機能の初期化 + initSearch(rootPrefix); + initMacroCopy(); +}); diff --git a/common/sidebar.html b/common/sidebar.html new file mode 100644 index 0000000..ba0bf1b --- /dev/null +++ b/common/sidebar.html @@ -0,0 +1,32 @@ + + + + + +FF14の大きな魅力である「生活系コンテンツ」クラフター全8職・ギャザラー全3職の完全育成ガイドです。フリートライアルプレイヤー(マーケットボード利用不可)から製品版プレイヤーまで、自給自足で爆速レベル上げを行うための情報を網羅しています。
大量の経験値と限定報酬(マウント・おしゃれ装備)が手に入る「イシュガルド復興」「オーシャンフィッシング」「お得意様取引」の3大コンテンツを解説します。
フリートライアルプレイヤーでも自給自足で確実にカンストを目指せる、レベル帯別の爆速育成ロードマップです。
毎日・毎週の習慣にするだけで勝手にレベルが上がる「グランドカンパニー調達納品」と「ギルドリーヴ」の仕組みと活用法を解説します。
クラフター全8職・ギャザラー全3職の解放ギルド、主要NPCの座標(X: Y:)、および解放条件を網羅した完全一覧表です。
当ガイドは、Wikiの「1ページ1コンテンツ原則」に基づき、以下の個別ページへ詳細に分割・移転いたしました。お探しのコンテンツを選択してください。
@@ -189,14 +76,12 @@当吟遊詩人ガイドは、以下の個別ページへ詳細に分割・移転いたしました。
@@ -193,14 +80,12 @@当ギャザクラ攻略は、以下の個別ページへ詳細に分割・移転いたしました。
@@ -193,14 +80,12 @@当召喚士大全は、以下の個別ページへ詳細に分割・移転いたしました。
@@ -185,14 +72,12 @@ファイナルファンタジーXIV(FF14)の戦闘ジョブ立ち回り、クロスホットバー(XHB/WXHB)設計、実戦マクロ、およびギャザラー・クラフター爆速育成ロードマップを集約したローカルHTML型Wikiナレッジベースです。
巴術士(Arcanist)は、リムサ・ロミンサを拠点とする遠隔魔法DPSクラスです。FF14において唯一、「Lv30到達時に2つの派生ジョブ(召喚士・学者)を同時に解放できる」という極めて特殊かつ強力な特徴を持っています。