117 lines
3.3 KiB
HTML
117 lines
3.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
|
|
<title>fateforge-tools</title>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"
|
|
/>
|
|
<link href="css/all.min.css" rel="stylesheet" />
|
|
|
|
<link href="css/flickity.css" rel="stylesheet" />
|
|
<link href="css/style.css" rel="stylesheet" />
|
|
<link
|
|
rel="icon"
|
|
type="image/x-icon"
|
|
href="/img/FateforgeTool_logo_80.png"
|
|
/>
|
|
</head>
|
|
|
|
<body>
|
|
<button onclick="changeLangEN()">
|
|
<img
|
|
src="https://cdn.countryflags.com/thumbs/united-kingdom/flag-400.png"
|
|
width="20"
|
|
/>
|
|
English
|
|
</button>
|
|
<button onclick="changeLangFR()">
|
|
<img
|
|
src="https://cdn.countryflags.com/thumbs/france/flag-400.png"
|
|
width="20"
|
|
/>
|
|
French
|
|
</button>
|
|
|
|
<h1>FateforgeTools</h1>
|
|
|
|
<div class="gallery js-flickity">
|
|
<div class="gallery-cell" id="ADV1">
|
|
<div class="book-container">
|
|
<div class="book">
|
|
<img src="img\books\ADV1_BC_EN.jpg" />
|
|
</div>
|
|
<div class="book-title">Adventurer</div>
|
|
</div>
|
|
</div>
|
|
<div class="gallery-cell">
|
|
<div class="book-container">
|
|
<div class="book">
|
|
<img src="img\books\GRI1_BC_EN.jpg" />
|
|
</div>
|
|
<div class="book-title">Grimoire</div>
|
|
</div>
|
|
</div>
|
|
<div class="gallery-cell" id="CRE2">
|
|
<div class="book-container" data-localize="book-CRE2"></div>
|
|
</div>
|
|
<div class="gallery-cell">
|
|
<div class="book-container">
|
|
<div class="book">
|
|
<img src="img\books\ENC1_BC_EN.png" />
|
|
</div>
|
|
<div class="book-title">Encyclopedia</div>
|
|
</div>
|
|
</div>
|
|
<div class="gallery-cell">
|
|
<div class="book-container">
|
|
<div class="book">
|
|
<img src="img\books\ENC2_DR.png" />
|
|
</div>
|
|
<div class="book-title">Encyclopedia : Netherworld</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div
|
|
class="view-container"
|
|
style="display: flex; align-items: center; justify-content: center"
|
|
>
|
|
<h1 id="view-title"></h1>
|
|
<br />
|
|
</div>
|
|
|
|
<script type="text/javascript" src="lib/jquery.min.js"></script>
|
|
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
|
|
<script type="text/javascript" src="js/language.js"></script>
|
|
<script src="lib/flickity.pkgd.min.js"></script>
|
|
<script src="lib/flickity.hash.js"></script>
|
|
<script>
|
|
var lastbook;
|
|
var flkty = new Flickity(".gallery", {
|
|
freeScroll: true,
|
|
wrapAround: true,
|
|
hash: true, // options
|
|
});
|
|
flkty.on("select", function (index) {
|
|
var currentbook = document
|
|
.getElementsByClassName("gallery-cell is-selected")[0]
|
|
.getAttribute("id");
|
|
if (currentbook == lastbook) {
|
|
return;
|
|
}
|
|
//TODO: Fill view-container with books
|
|
setLocalizeDataAttr("view-title", currentbook + ".title");
|
|
|
|
lastbook = currentbook;
|
|
refreshBooks();
|
|
});
|
|
flkty.on("settle", function (index) {
|
|
console.log("Flickity settled at " + index);
|
|
refreshBooks();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|