Files
ESP8266-Station/data/mouse.html
Serge NOEL fcccd73879 Good
2026-02-27 10:50:27 +01:00

75 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mouse Speedometer</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container">
<h2>Mouse Speedometer</h2>
<div id="toolBar">
<!-- ON/OFF (Gray OFF/ Orange ON) -->
<i class="fa-solid fa-power-off"></i>
<!-- display DCCID or '-' if Analogique or Marklin -->
<i class="fa-solid fa-train"></i><span id="DCCID">34</span>
<!-- display mode (Analogique or Marklin or DCC) -->
<i class="fa-solid fa-wave-square"></i><span id="Mode">Analogique</span>
<!-- display direction (Forward or Reverse) -->
<i class="fa-solid fa-forward"></i>
<!-- Program CV -->
<i class="fa-solid fa-cogs"></i>
<!-- Accessories switch to accessories page -->
<i class="fa-solid fa-traffic-light"></i>
</div>
<div id="SelectLoco">
<!-- display a view of scale model -->
<img src="img/locos/loco.png" alt="Loco" width="300" height="50" onClick="SelectLoco();" style="cursor:pointer; margin-right:20px;">
</div>
<div id="speedometer">
<!-- Inline SVG for speedometer -->
<svg width="300" height="200" viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="150" cy="120" r="120" fill="black" />
<!-- <image href="img/Speed.png" x="0" y="0" width="300" height="200"/> -->
<g id="ticks" stroke="white" stroke-width="3" stroke-linecap="round" transform="rotate(-90 150 120)">
<line x1="120" y1="68.038" x2="110" y2="50.718" />
<line x1="143.728" y1="60.329" x2="141.638" y2="40.438" />
<line x1="168.541" y1="62.936" x2="174.721" y2="43.915" />
<line x1="190.148" y1="75.411" x2="203.531" y2="60.548" />
<line x1="204.813" y1="95.596" x2="223.084" y2="87.461" />
<line x1="210" y1="120" x2="230" y2="120" />
<line x1="204.813" y1="144.404" x2="223.084" y2="152.539" />
<line x1="190.148" y1="164.589" x2="203.531" y2="179.452" />
<line x1="168.541" y1="177.064" x2="174.721" y2="196.085" />
<line x1="143.728" y1="179.671" x2="141.638" y2="199.562" />
<line x1="120" y1="171.962" x2="110" y2="189.282" />
</g>
<line id="needle" x1="150" y1="120" x2="150" y2="70" stroke="#e74c3c" stroke-width="6" stroke-linecap="round" />
<text id="TotalKm" x="190" y="190" font-size="20" text-anchor="end" fill="#AAA">0.0</text>
</svg>
</div>
<div style="text-align:center; margin-top:20px;">
<!-- slider-->
<input type="range" id="speedSlider" min="0" max="128" value="0" oninput="updateSpeedometer(this.value);" style="width:80%;">
</div>
<div id="Functions">
<!-- Display F0 to F7 -->
<div class="function" id="F0">F0</div>
<div class="function" id="F1">F1</div>
<div class="function" id="F2">F2</div>
<div class="function" id="F3">F3</div>
<div class="function" id="F4">F4</div>
<div class="function" id="F5">F5</div>
<div class="function" id="F6">F6</div>
<div class="function" id="F7">F7</div>
</div>
</div>
<script type="text/javascript" src="js/mouse.js"></script>
</body>
</html>