diff --git a/_includes/nav-header.html b/_includes/nav-header.html index d0e042f1382c24c15b87bf201d75126eaee30e7b..cc6dbb945b09fe37e80c6d41f6942cd3e7245660 100644 --- a/_includes/nav-header.html +++ b/_includes/nav-header.html @@ -22,6 +22,8 @@ {% include nav-default.html %} {% endif %} +<script src="{{site.baseurl}}/assets/jquery-3.6.4.min.js"></script> + <script type="text/javascript"> const applyToggle = (list, button, breakpoint) => { const navList = document.querySelector(list) @@ -43,6 +45,31 @@ const applyToggle = (list, button, breakpoint) => { applyToggle('.list--nav', '.button', 640) </script> +<script> +$(document).ready(function(){ + spaceopen(); +}); + +function spaceopen() { + //http://nobreakspace.org/status/spaceapi.json + + $.get( "https://status.nobreakspace.org/spaceapi.json", function( data ) { + console.log(data); + if(data.open) { + $("#spaceopen").css( "border", "3px solid green" ); + $("#spaceopen").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/open.png' width='35'></div>Der Nbsp ist offen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); + $("#spaceopenmobile").css( "border", "3px solid green" ); + $("#spaceopenmobile").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/open.png' width='35'></div>Der Nbsp ist offen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); + } else { + $("#spaceopen").css( "border", "3px solid red" ); + $("#spaceopen").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/closed.png' width='35'></div>Der Nbsp ist geschlossen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); + $("#spaceopenmobile").css( "border", "3px solid red" ); + $("#spaceopenmobile").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/closed.png' width='35'></div>Der Nbsp ist geschlossen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); + } + }); +} +</script> + <!-- Core CSS file --> <link rel="stylesheet" href="{{site.baseurl}}/assets/scripts/photoswipe.css"> diff --git a/_includes/site-header.html b/_includes/site-header.html index 6d93a87ddb450d8c26d258fb1f152de2ae29d8c3..a6a9d443cc367f8ef8155a03750bb51f68346dec 100644 --- a/_includes/site-header.html +++ b/_includes/site-header.html @@ -22,6 +22,8 @@ {% include site-feature.html %} {% endif %} -<meta name="twitter:dnt" content="on"> +<div class="statusmobile" style="width: 80%; margin:0 auto; margin-top: -45px; background-color: #FAFAFA;"> + {% include space-status-mobile.html %} +</div> </header> diff --git a/_includes/space-status-mobile.html b/_includes/space-status-mobile.html new file mode 100644 index 0000000000000000000000000000000000000000..cfd1e04c06bb2190f64d1188a3f5b11eebf8b09b --- /dev/null +++ b/_includes/space-status-mobile.html @@ -0,0 +1,3 @@ +<div id="spaceopenmobile"> + Ob der Nobreakspace offen ist siehst du <a href='https://status.nobreakspace.org' target='_blank'>hier</a><p>Oder aktiviere Javascript</p> +</div> diff --git a/_includes/space-status.html b/_includes/space-status.html index 0f9bc059c8200ff96ccde7dcbd181b1ccc47ca89..00f01ad0069745bb7677aeb47c5e5afe2c4d16e0 100644 --- a/_includes/space-status.html +++ b/_includes/space-status.html @@ -1,27 +1,3 @@ -<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> -<script> -$(document).ready(function(){ - spaceopen(); - bbbopen(); -}); - -function spaceopen() { - //http://nobreakspace.org/status/spaceapi.json - - $.get( "https://status.nobreakspace.org/spaceapi.json", function( data ) { - console.log(data); - if(data.open) { - console.log("OPEN"); - $("#spaceopen").css( "border", "3px solid green" ); - $("#spaceopen").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/open.png' width='35'></div>Der Nbsp ist offen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); - } else { - console.log("CLOSED"); - $("#spaceopen").css( "border", "3px solid red" ); - $("#spaceopen").html("<div style='float:left'><img src='{{ site.baseurl }}/assets/closed.png' width='35'></div>Der Nbsp ist geschlossen!<br><div style='text-align: right;'><a href='https://status.nobreakspace.org' target='_blank' style='color: #EAEAEA;'>Status</a></div>"); - } - }); -} -</script> <div id="spaceopen"> Ob der Nobreakspace offen ist siehst du <a href='https://status.nobreakspace.org' target='_blank'>hier</a><p>Oder aktiviere Javascript</p> </div> diff --git a/_sass/_normalize.scss b/_sass/_normalize.scss index 6fa977414cda5f3f022024ee21172b6ee67540f1..45bd7138622837ff987206579694aefb1e675dd9 100644 --- a/_sass/_normalize.scss +++ b/_sass/_normalize.scss @@ -86,16 +86,19 @@ figcaption { color: #EFEFEF; } -@media (min-width: 650px) { +@media (min-width: 643px) { .aside { margin-top: -80px; } .projectinfo { - visibility: hidden; + display: none; + } + .statusmobile { + display: none; } } -#spaceopen, #cyberspaceopen { +#spaceopen { background-color: #fafafa; padding: 2%; text-align: center; @@ -108,7 +111,7 @@ figcaption { text-align: center; } -#spaceopen:a, #cyberspaceopen:a { +#spaceopen:a { background-color: #ff0000; text-align: left; }