From Dark and Darker Wiki
No edit summary |
(topbar testing) Tag: Replaced |
||
(23 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
< | <templatestyles src="Template:Topbar/styles.css" /> | ||
<div id="topbar" style="position:fixed; top:50px; z-index:7; width:400px; left:50%; transform:translate(-50%); background-color: #007bff; border: 1px solid #ccc; border-radius: 5px; overflow: hidden;"> | |||
<!-- Div acting as a button to toggle visibility --> | |||
<div id="toggleDiv" style="cursor: pointer; padding: 10px; background-color: #0056b3; color: white; text-align: center;"> | |||
▼ | |||
</div> | |||
<!-- Content that will be shown/hidden --> | |||
< | <div id="topbarContent" style="padding: 10px; background-color: #f8f9fa;"> | ||
<table class="basicsnavtable" style="width: 100%; margin: 0; border-collapse: collapse;"> | |||
<tr> | |||
<td class="last" style="padding: 5px;">Season End:</td> | |||
</tr> | |||
<tr> | |||
<td class="last" style="color:green; padding: 5px;">{{#widget:Countdown|uniqueId=A|date=2024-08-30 02:00:00}}</td> | |||
</tr> | |||
<tr> | |||
<td class="last" style="padding: 5px;">Wipe Day: [https://media.discordapp.net/attachments/1055538406509264967/1277170341357293568/image.png?ex=66cc3112&is=66cadf92&hm=93ca6dd1100180cbc62b00668ea7be6c4888814d9dd7de844983afa3f52b0ef1 6th of September]</td> | |||
</tr> | |||
<tr> | |||
<td class="last" style="color:red; padding: 5px;">{{#widget:Countdown|uniqueId=B|date=2024-09-06 02:00:00}}</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
</ | <script> | ||
document.getElementById("toggleDiv").addEventListener("click", function() { | |||
var content = document.getElementById("topbarContent"); | |||
var toggleDiv = document.getElementById("toggleDiv"); | |||
if (content.style.display === "none") { | |||
content.style.display = "block"; | |||
toggleDiv.textContent = "▼"; | |||
} else { | |||
content.style.display = "none"; | |||
toggleDiv.textContent = "▲"; | |||
} | |||
}); | |||
// Initially show content | |||
document.getElementById("topbarContent").style.display = "block"; | |||
</script> |
Latest revision as of 19:23, 26 August 2024
▼
Season End: |
Wipe Day: 6th of September |
<script>
document.getElementById("toggleDiv").addEventListener("click", function() { var content = document.getElementById("topbarContent"); var toggleDiv = document.getElementById("toggleDiv"); if (content.style.display === "none") { content.style.display = "block"; toggleDiv.textContent = "▼"; } else { content.style.display = "none"; toggleDiv.textContent = "▲"; } });
// Initially show content document.getElementById("topbarContent").style.display = "block";
</script>