add timeline

This commit is contained in:
Lucas 2023-03-13 16:11:51 +01:00
parent f034968c51
commit 73126741cd
5 changed files with 78 additions and 14 deletions

View file

@ -106,10 +106,15 @@
.gallery-cell {
width: 66%;
margin-right: 10px;
/* margin-right: 10px; */
counter-increment: gallery-cell;
z-index: 10;
margin: auto;
}
.gallery-cell:not(.is-selected) {
z-index: -5;
filter: saturate(25%);
}
.flickity-viewport {

View file

@ -16,9 +16,14 @@
<body>
<header>
<button onclick="changeLangEN()">English</button>
<button onclick="changeLangFR()">🇫🇷 Français</button>
<button onclick="changeLangEN()">
<img src="img\flags\en-UK-400.png" width="20" />
English
</button>
<button onclick="changeLangFR()">
<img src="img\flags\fr-FR-400.png" width="20" />
Français
</button>
<a href="index.html">
<h1>FateforgeTools</h1>
</a>
@ -44,6 +49,10 @@
<div><i class="fa-solid fa-book"></i></div>
<div data-localize="btn-books">books</div>
</button>
<button onclick="window.location.href='timeline.html';">
<div><i class="fa-solid fa-timeline"></i></div>
<div data-localize="btn-timeline">timeline</div>
</button>
</div>
<div id="footer"></div>

View file

@ -1,6 +1,5 @@
$(function () {
$("#footer").load("footer.html",function (responseTxt, statusTxt, xhr) {
console.log("bla");
$("[data-localize]").localize("main", { pathPrefix: "lang" });
});
});
$("#footer").load("footer.html", function (responseTxt, statusTxt, xhr) {
refreshLoc();
});
});

View file

@ -33,14 +33,21 @@ function changeLangEN() {
}
function refreshBooks() {
$("[data-localize]").localize("books", {
$("[data-localize]").localize("books", {
pathPrefix: "lang",
language: currentLang,
});
}
function refreshLoc() {
$("[data-localize]")
.localize("main", { pathPrefix: "lang", language: currentLang })
.localize("books", { pathPrefix: "lang", language: currentLang });
}
// Function to fill a data-localize attribute and update DOM
function setLocalizeDataAttr(className, dataValue) {
$("#" + className).data("localize", dataValue).attr("data-localize", dataValue);
$("#" + className)
.data("localize", dataValue)
.attr("data-localize", dataValue);
}

44
timeline.html Normal file
View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>fateforge-tools</title>
<link rel="stylesheet" href="css/water.css" />
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
<link rel="icon" type="image/png" href="/img/FateforgeTool_logo_80.png">
</head>
<body>
<header>
<button onclick="changeLangEN()">
<img src="img\flags\en-UK-400.png" width="20" />
English
</button>
<button onclick="changeLangFR()">
<img src="img\flags\fr-FR-400.png" width="20" />
Français
</button>
<a href="index.html">
<h1>FateforgeTools</h1>
</a>
</header>
<iframe width="100%" height="400" src="https://time.graphics/fr/embed?v=1&id=492600" frameborder="0" allowfullscreen></iframe>
<div><a style="font-size: 12px; text-decoration: none;" title="Create a timeline" href="https://time.graphics">Create a timeline</a></div>
<div id="footer"></div>
<script type="text/javascript" src="js/footer.js"></script>
<script async type="text/javascript" src="js/language.js"></script>
<script rel="preload" src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
</body>
</html>