Skip to content

Commit

Permalink
SiV countdown: added url and dhub page
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinEggesvik committed Feb 16, 2024
1 parent 1e681a8 commit f572449
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 2 deletions.
115 changes: 115 additions & 0 deletions siv-dhub.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<head>
<meta charset="utf-8" />
<link href='https://fonts.googleapis.com/css?family=Open Sans' rel='stylesheet'>
<style>
img
{
display: inline-block;
}

.image-container {
text-align: center;
}

.super-lege {
width: 10.2%;
}

.super-pleier {
padding-left: 3%;
padding-right: 5%;
width: 11%;
}

.dips-logo {
width: 45%;
margin-right: 5%;
}


html, body
{
height: 100%;
}

html
{
display: table;
margin: auto;
}

body
{
display: table-cell;
vertical-align: middle;
}

.head
{
text-align: center;
font-weight: bold;
font-family: 'Open Sans';
color: #343434; font-size: 4vw;
}

.time
{
text-align: center;
font-weight: normal;
font-family: 'Open Sans';
color: #343434; font-size: 4vw;
}

</style>
</head>
<body style="background-color:#F8F8F8;">
<div class="content">
<div class="image-container">
<img class="dips-logo" src="images/DIPS_ArenaLogo.png" alt="Arena logo" />
</div>
<h3 id="hhsiv" class="head">Sykehuset i Vestfold (SiV) tar i bruk DIPS Arena</h3>
<h3 id="thsiv" class="time" ></h3>
</div>
<script>

var func = function(n1, n2, time, onFinishedName, x)
{
var now = new Date().getTime();

var distance = time - now;

var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);

var txt = "";
if(days > 0) txt += days + " dager ";
if(hours > 0) txt += hours + " timer ";
if(minutes > 0) txt += minutes + " minutter "
txt += seconds + " sekunder ";

if (distance < 0) {
if(x){
clearInterval(x);
}
document.getElementById(n2).innerHTML = ""
document.getElementById(n1).innerHTML = onFinishedName;
}else{
document.getElementById(n2).innerHTML = txt;
document.getElementById(n1).innerHTML = onFinishedName + " om";
}
};

var setup = function(letter, time){
var fallback = document.getElementById("h"+letter).innerHTML;
var x = setInterval(func, 1000, "h"+letter, "t"+letter, time, fallback, x);
func("h"+letter, "t"+letter, time, fallback, x);
}

var Hsiv= new Date("May 26, 2024 12:00:00").getTime();

setup("hsiv", Hsiv);
</script>
</body>
</html>
20 changes: 18 additions & 2 deletions siv.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,30 @@
color: #343434; font-size: 4vw;
}

a>h3:active {
color: darkblue;
}

a {
color: black;
}

a:active {
color: darkblue;
}

</style>
</head>
<body style="background-color:#F8F8F8;">
<div class="content">
<div class="image-container">
<img class="dips-logo" src="images/DIPS_ArenaLogo.png" />
<a href="https://hsorhf.sharepoint.com/sites/intranett-siv/DIPS/Sider/DIPS-arena.aspx">
<img class="dips-logo" src="images/DIPS_ArenaLogo.png" alt="Arena logo" />
</a>
</div>
<h3 id="hhsiv" class="head">Vi tar i bruk DIPS Arena</h3>
<a href="https://hsorhf.sharepoint.com/sites/intranett-siv/DIPS/Sider/DIPS-arena.aspx">
<h3 id="hhsiv" class="head">Vi tar i bruk DIPS Arena</h3>
</a>
<h3 id="thsiv" class="time" ></h3>
</div>
<script>
Expand Down

0 comments on commit f572449

Please sign in to comment.