r/HTML • u/Harumi-Rose • Oct 17 '26
Question Please help getting this page to be accessible offline
Hi. There's a page I access regularly (https://leminerva.github.io/Dark-Souls-Documents/) and I'd like to be able to access it offline. I've downloaded all the pages and files from the github repository (https://github.com/LeMinerva/Dark-Souls-Documents), but index.html doesn't load header.html, which should work as a menu to access the other pages. And if I access header.html directly, the links in it open pages showing only a background image, with none of the associated content. I've tried it with Vivaldi and Edge (which is the browser recommended by the creator of the page), and I've tried adding --allow-file-access-from-files to the shortcut, as per the creator's instructions.
I don't know the first thing about HTML. Any help is greatly appreciated.
Index.html:
<!DOCTYPE html>
<html class="no-js">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>黑暗之魂档案</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link id="favicon" href="assets/favicon.ico" rel="icon" type="image/x-icon"/>
<link rel='stylesheet' href='assets/style.css' type='text/css' media='all' />
</head>
<body>
<div id="menu" class="content"></div><hr>
<script>fetch("header.html").then((f)=>{f.text().then((m)=>{document.getElementById("menu").innerHTML=m})})</script>
<div class="contentd desktop">
<img src="assets/splash.webp">
</div>
<div class="contentd mobile">
<img src="assets/splash2.webp">
</div>
</body>
</html>
Header.html:
<div class="menu">
<div class="submenu">
<p><span class="desktop">黑暗之</span><span>魂1</span></p>
<a id="weapon1" href="description.html?rmk=0&game=1&type=weapon&lines=198&title=\u6b66\u5668"><span>武器</span><span class="desktop"> / Weapons</span></a>
<a id="armor1" href="description.html?rmk=0&game=1&type=armor&lines=245&title=\u9632\u5177"><span>防具</span><span class="desktop"> / Armors</span></a>
<a id="ring1" href="description.html?rmk=1&game=1&type=ring&lines=44&title=\u6212\u6307"><span>戒指</span><span class="desktop"> / Rings</span></a>
<a id="item1" href="description.html?rmk=1&game=1&type=item&lines=144&title=\u7269\u54c1"><span>物品</span><span class="desktop"> / Items</span></a>
<a id="magic1" href="description.html?rmk=1&game=1&type=magic&lines=72&title=\u6cd5\u672f"><span>法术</span><span class="desktop"> / Magics</span></a>
<a id="dialogue1" href="dialogue1.html"><span>对话</span><span class="desktop"> / Dialogues</span></a>
</div>
<div class="submenu">
<p><span class="desktop">黑暗之</span><span>魂2</span></p>
<a id="weapon2" href="description.html?rmk=0&game=2&type=weapon&lines=374&title=\u6b66\u5668"><span>武器</span><span class="desktop"> / Weapons</span></a>
<a id="armor2" href="description.html?rmk=0&game=2&type=armor&lines=481&title=\u9632\u5177"><span>防具</span><span class="desktop"> / Armors</span></a>
<a id="ring2" href="description.html?rmk=1&game=2&type=ring&lines=77&title=\u6212\u6307"><span>戒指</span><span class="desktop"> / Rings</span></a>
<a id="item2" href="description.html?rmk=1&game=2&type=item&lines=205&title=\u7269\u54c1"><span>物品</span><span class="desktop"> / Items</span></a>
<a id="magic2" href="description.html?rmk=0&game=2&type=magic&lines=125&title=\u6cd5\u672f"><span>法术</span><span class="desktop"> / Magics</span></a>
<a id="dialogue2" href="dialogue2.html"><span>对话</span><span class="desktop"> / Dialogues</span></a>
</div>
<div class="submenu">
<p><span class="desktop">黑暗之</span><span>魂3</span></p>
<a id="weapon3" href="description.html?rmk=0&game=3&type=weapon&lines=321&title=\u6b66\u5668"><span>武器</span><span class="desktop"> / Weapons</span></a>
<a id="armor3" href="description.html?rmk=0&game=3&type=armor&lines=394&title=\u9632\u5177"><span>防具</span><span class="desktop"> / Armors</span></a>
<a id="ring3" href="description.html?rmk=1&game=3&type=ring&lines=80&title=\u6212\u6307"><span>戒指</span><span class="desktop"> / Rings</span></a>
<a id="item3" href="description.html?rmk=1&game=3&type=item&lines=241&title=\u7269\u54c1"><span>物品</span><span class="desktop"> / Items</span></a>
<a id="magic3" href="description.html?rmk=1&game=3&type=magic&lines=108&title=\u6cd5\u672f"><span>法术</span><span class="desktop"> / Magics</span></a>
<a id="dialogue3" href="dialogue3.html"><span>对话</span><span class="desktop"> / Dialogues</span></a>
</div>
<div class="submenu">
<p><span>数据</span><span class="desktop">清单</span></p>
<a id="npc" href="npc.html"><span>人物</span><span class="desktop"> / NPCs</span></a>
<a id="ring" href="ring.html"><span>戒指</span><span class="desktop"> / Rings</span></a>
<a id="magic" href="magic.html"><span>法术</span><span class="desktop"> / Magics</span></a>
<a id="map" href="map.html"><span>地图</span><span class="desktop"> / Maps</span></a>
<a id="param" href="param.html"><span>敌人</span><span class="desktop">属性 / Param</span></a>
<a id="itemlot" href="itemlot.html"><span class="desktop">物品</span><span>掉落</span><span class="desktop"> / Itemlot</span></a>
</div>
<div id="pagel"></div>
</div>
2
u/SirPigari Oct 17 '26
I think u need to host it on localhost, like for example run python -m http.serve from the directory of index.html and then go to localhost:8000
But we dont have enough information, what device do you use and etc
1
u/testingaurora Oct 17 '26
Have you also downloaded all the pages the menu links to? "description.html", "dialogue1.html", "ring.html", etc? (Every page thats listed as the link destination via
href', eg<a id="weapon1" href="description.html?queryparams">` )1
u/StrayFeral Oct 17 '26
This is the problem. Research what is CORS and why it's blocked by default. Next time something does not work, press F12 (in Chrome) and check for errors.
1
u/Mvp-long-ago Oct 18 '26
Never heard that tge HTML tag could have attributes too, except language or lang.