deploy lang switcher

This commit is contained in:
Rokas V. 2024-10-21 16:57:22 +03:00
parent d0256857a8
commit e2eed10355
2 changed files with 52 additions and 178 deletions

View File

@ -1,130 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Page Information
-->
<meta charset="utf-8">
<title>Anime Nights</title>
<meta name="description" content="Anime Nights links!">
<meta property="og:image" content="https://rokvaz.github.io/littlelink_AN/images/musu/an.png">
<meta name="author" content="infoshow">
<!-- Mobile Specific Metas
-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS
-->
<link rel="stylesheet" href="css/normalize.css">
<!-- Themes:
Auto: css/skeleton-auto.css
Light: css/skeleton-light.css
Dark: css/skeleton-dark.css
-->
<link rel="stylesheet" href="css/skeleton-auto.css">
<!-- Brand Styles -->
<link rel="stylesheet" href="css/brands.css">
<!-- Favicon
-->
<link rel="icon" href="images/icons/an.png">
<style>
.language-button {
position: fixed;
top: 10px;
right: 10px;
padding: 10px;
background-color: transparent;
color: #fff;
border: 2px solid #fff;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
}
@media only screen and (max-width: 600px) {
.language-button {
padding: 6px;
font-size: 70%;
}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:image" content="https://rokvaz.github.io/littlelink_AN/images/musu/an.png">
<meta name="author" content="infoshow">
<title>Anime Nights</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
height: 100vh;
}
</style>
button {
position: fixed;
top: 10px;
right: 10px;
padding: 10px;
background-color: transparent;
color: #fff;
border: 2px solid #fff;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
}
button:hover {
background-color: #ed1c24;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<!--<a href="https://infoshow.info/lt/AN" class="language-button">LT</a>-->
<div class="container">
<div class="row">
<div class="column" style="margin-top: 10%">
<img src="images/musu/an.png" class="avatar" srcset="images/musu/an.png 2x" alt="" width="200" height="200">
<button id="toggleButton">LT</button>
<iframe id="contentFrame"></iframe>
<h1 role="heading">Anime Nights</h1>
<script>
let currentPage = "EN";
<a class="button" href="https://bit.ly/AnimeNights25" target="_blank" rel="noopener" role="button"><img class="icon" src="images/icons/facebook.svg" alt="">Anime Nights'25 event page</a><br>
// resetinan cache on each load because why not
const timestamp = new Date().getTime();
const iframe = document.getElementById("contentFrame");
iframe.src = "https://rokvaz.github.io/littlelink_AN/en.html?t=" + timestamp;
<iframe width="560" height="315" src="https://www.youtube.com/embed/jygCUWQ7GLc?si=X1WIm6LnViY2pdDH" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="max-width: 100%; width: 100%;"></iframe>
<br>
<br>
document.getElementById("toggleButton").addEventListener("click", function() {
if (currentPage === "EN") {
iframe.src = "https://rokvaz.github.io/littlelink_AN/lt.html?t=" + timestamp;
currentPage = "LT";
this.textContent = "EN";
} else {
iframe.src = "https://rokvaz.github.io/littlelink_AN/en.html?t=" + timestamp;
currentPage = "EN";
this.textContent = "LT";
}
});
</script>
<!--<a class="button" href="https://bit.ly/AN24Tickets" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/ticket.png" alt="">Buy tickets to the night part of Anime Nights'24 here!</a><br>
<a class="button" href="https://bit.ly/AN24movies" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/moviei.png" alt="">Movie list!</a><br>
<p>Registration to the games run by "123 Renginys"</p>
<a class="button" href="https://forms.gle/Ldp9hathJy6eWGY67" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/sword.png" alt="">12:45 session of "Blood on the Clocktower"</a><br>
<a class="button" href="https://forms.gle/gwUgZghqPs7ngyyX7" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/sword.png" alt="">16:30 session of "Blood on the Clocktower"</a><br>
<p>Registration to the games run by "RPG House"</p>
<a class="button" href="https://dndhouse.lt/animenights/" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/rpghouse.png" alt="">registration for all of their D&D one-shot sessions</a><br> -->
<!--<p>Contests:</p>-->
<!--<a class="button" href="https://bit.ly/ANcosplay" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/crown.png" alt="">Cosplay contest | Registration closes on April 21st.</a><br>-->
<!--<a class="button" href="https://bit.ly/ANfoto" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/camera.png" alt="">Cosplay photo contest | Registration closes on April 28th.</a><br>-->
<!--<a class="button" href="https://bit.ly/ANamvs" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/cinema.png" alt="">AMV contest | Registration closes on April 28th.</a><br>-->
<!--<p>Other:</p>
<a class="button" href="https://bit.ly/AN24media" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/akred.png" alt="">Media pass registration</a><br>
<a class="button" href="https://infoshow.info/anime-nights/faq" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/faq.png" alt="">FAQ</a><br>-->
<!--<a class="button" href="https://bit.ly/ANartist" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/paint.png" alt="">Artist Alley registration | Registration closes on April 21st.</a><br>-->
<!--<br>
<br>-->
<p>Follow us:</p>
<a class="button button-instagram" href="https://www.instagram.com/animenights.info/" target="_blank" rel="noopener" role="button"><img class="icon" src="images/icons/instagram.svg" alt="">Instagram</a><br>
<a class="button button-faceb" href="https://www.facebook.com/AnimeNights/" target="_blank" rel="noopener" role="button"><img class="icon" src="images/icons/facebook.svg" alt="">Facebook</a><br>
<a class="button button-yt" href="https://www.youtube.com/@InfoShow_AnimeNights/videos" target="_blank" rel="noopener" role="button"><img class="icon" src="images/icons/youtube.svg" alt="">YouTube</a><br>
<a class="button button-tiktok" href="https://www.tiktok.com/@infoshow.info" target="_blank" rel="noopener" role="button"><img class="icon" src="images/icons/tiktok.svg" alt="">TikTok</a><br>
<!--<br>
<p>Take a look at 2024 "Anime Nights" AMV contest entries:</p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/videoseries?si=XcocLdh0-HqyXQMI&amp;list=PLNScQ1DfTsykhw5pt0VDOzuV5MT6KDR94" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="max-width: 100%; width: 100%;"></iframe>
<br>
<br>-->
<!--<p>KTU FSA InfoSA projects:</p>
<a class="button" href="https://www.facebook.com/InfoShowLanParty" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/icon.png" alt="">InfoShow'24 | Lan Party</a><br>
<a class="button" href="https://www.facebook.com/AnimeNights" target="_blank" rel="noopener" role="button"><img class="icon" src="images/musu/icon.png" alt="">InfoShow'24 | Anime Nights</a><br>
<br>-->
<br>
<p>AnimeNights 2025. Using: <a href="https://littlelink.io" target="_blank" rel="noopener" role="button">LittleLink</a>. Design: <a href="https://github.com/linkstackorg/sublime" target="_blank" rel="noopener" role="button">Sublime</a>.</p>
</div>
</div>
</div>
<!-- End Document
-->
</body>
</html>

View File

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:image" content="https://rokvaz.github.io/littlelink_AN/images/musu/an.png">
<meta name="author" content="infoshow">
<title>Anime Nights</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
height: 100vh;
}
button {
position: fixed;
top: 10px;
right: 10px;
padding: 10px;
background-color: transparent;
color: #fff;
border: 2px solid #fff;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
}
button:hover {
background-color: #ed1c24;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<button id="toggleButton">LT</button>
<iframe id="contentFrame" src="https://rokvaz.github.io/littlelink_AN/en.html"></iframe>
<script>
let currentPage = "EN";
document.getElementById("toggleButton").addEventListener("click", function() {
const iframe = document.getElementById("contentFrame");
if (currentPage === "EN") {
iframe.src = "https://rokvaz.github.io/littlelink_AN/lt.html";
currentPage = "LT";
this.textContent = "EN";
} else {
iframe.src = "https://rokvaz.github.io/littlelink_AN/en.html";
currentPage = "EN";
this.textContent = "LT";
}
});
</script>
</body>
</html>