Webserver_Dashboard and basic functionality #1

Merged
Roman_Schenk merged 12 commits from Webserver_Layout into master 2022-08-23 20:28:05 +02:00
4 changed files with 20 additions and 7 deletions
Showing only changes of commit b5d1637e0f - Show all commits

View File

@ -114,10 +114,12 @@
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<td class="icon"> <td>
<span class="outer_dot"> <label class="toggle">
<p class="inner_icon">{{'A' if zone.autoMode else 'M'}}</p> <input type="checkbox" {{ "checked" if zone.autoMode }} onchange="switchZoneMode(this.checked, {{ zone.number }})">
</span> <span class="slider"></span>
<span class="labels" data-on="A" data-off="H"></span>
</label>
</td> </td>
<td class="property">{{ translater.getTranslation("operating mode") }}:</td> <td class="property">{{ translater.getTranslation("operating mode") }}:</td>
<td class="value">{{translater.getTranslation("automatic mode") if zone.autoMode else translater.getTranslation("manual mode")}}</td> <td class="value">{{translater.getTranslation("automatic mode") if zone.autoMode else translater.getTranslation("manual mode")}}</td>

View File

@ -3,7 +3,9 @@
<head> <head>
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/header.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='Styles/header.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/main.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='Styles/main.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/switch.css') }}">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="refresh" content="5" >
<script> <script>
function executeAction(command, index, value) { function executeAction(command, index, value) {
@ -13,6 +15,9 @@
var value = document.getElementById(valueID).value * valueFactor; var value = document.getElementById(valueID).value * valueFactor;
executeAction(command, index, value); executeAction(command, index, value);
} }
function switchZoneMode(autoMode, zone) {
executeAction('switch_zone_mode' ,zone, (autoMode ? 'automatic' : 'manual'))
}
</script> </script>
</head> </head>
<body> <body>
@ -29,11 +34,11 @@
</ul> </ul>
</nav> </nav>
<div class="heading"> <a class="heading" href="{{ url_for('startPage')}}">
<img src="{{ url_for('static', filename='img/header/wassertropfen.png') }}" alt="" class="title-img"> <img src="{{ url_for('static', filename='img/header/wassertropfen.png') }}" alt="" class="title-img">
<h1>{{ translater.getTranslation("Irrigation") }}-<br>{{ translater.getTranslation("system") }}</h1> <h1>{{ translater.getTranslation("Irrigation") }}-<br>{{ translater.getTranslation("system") }}</h1>
</div> </a>
<img src="{{ url_for('static', filename='img/header/blumenbeet.jpg') }}" alt="" class="header-img"> <img src="{{ url_for('static', filename='img/header/blumenbeet.jpg') }}" alt="" class="header-img">

View File

@ -45,7 +45,8 @@ nav ul li a:hover{
background-color: darkblue; background-color: darkblue;
padding-top: 0px; padding-top: 0px;
padding-bottom: 0px; padding-bottom: 0px;
margin: 0px; margin: 0px;
text-decoration: none;
} }
.heading h1{ .heading h1{

View File

@ -9,4 +9,9 @@ h2{
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif; font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
text-transform: uppercase; text-transform: uppercase;
margin-bottom: 2em; margin-bottom: 2em;
}
h3{
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
text-transform: uppercase;
} }