Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
einsjason authored Jul 21, 2023
1 parent 5b6d80c commit ef3603c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ <h2>Wetter Aktuell</h2>
</div>

<br>
<button name="measurementButton" onclick="switchMeasurements()"><span class="icon_s">&#xf107</span> Messwerte anzeigen</button>
<button id="measurementButton" onclick="switchMeasurements()"><span class="icon_s">&#xf107</span> Messwerte anzeigen</button>
<style>
.content .container {
width: 290px;
backdrop-filter: blur(5px);
}
</style>

<div name="measurement" style="max-height: 0px; overflow: hidden; transition: all 1s;">
<div id="measurement" style="max-height: 0px; overflow: hidden; transition: all 1s;">
<br>
<div class="container bg_image">
<table>
Expand Down
6 changes: 3 additions & 3 deletions docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ async function getDataText(url) {
}

function switchMeasurements() {
let div_measurements = document.querySelector('[name=measurement]');
let button_measurements = document.querySelector('[name=measurementButton]');
let div_measurements = document.getElementById('measurement');
let button_measurements = document.getElementById('measurementButton');

if (div_measurements.style.maxHeight == "0px") {
div_measurements.style.maxHeight = "2000px";
Expand Down Expand Up @@ -38,7 +38,7 @@ async function getWeather() {
document.querySelector(".content_container.bg_image").style.background = "url(https://rammer.org/cdn/images/weather/backgrounds/weather/" + data.data.weather_icon + ".jpg)";
}

Array.from(document.querySelectorAll(".content_container.bg_image .container, .content_container.bg_image button")).forEach(e => {
Array.from(document.querySelectorAll(".content_container.bg_image mneasurement .container, .content_container.bg_image button")).forEach(e => {
e.style.background = "var(--" + data.data.weather_icon + ")";
});

Expand Down

0 comments on commit ef3603c

Please sign in to comment.