2025-10-27 22:24:25 -07:00

119 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Printer Media Sizes</title>
<link rel="icon" type="image/x-icon" href="/static/images/favicon.ico">
<link rel="stylesheet" href="/static/css/styles.css">
<link rel="stylesheet" href="/static/fontawesome/css/all.min.css">
<script src="/static/js/jquery-3.7.1.js"></script>
<style>
.header-img {
margin-top: 30px; /* Adjust the margin as needed */
margin-bottom: 30px;
width: auto;
height: 70px; /* Adjust the height as needed */
}
.center-content {
display: flex;
flex-direction: column;
align-items: center;
}
h1 {
margin-bottom: 5px;
}
label, select, #media-sizes, button {
margin: 5px 0;
text-align: center;
font-size: larger;
font-weight: 200;
}
select {
padding: 3px;
font-size: 1.1em;
width: 250px;
}
#media-sizes ul {
list-style-type: none;
padding: 0;
}
#media-sizes li {
display: flex;
align-items: center;
margin-bottom: 5px;
}
#media-sizes input[type="checkbox"] {
transform: scale(1.5);
margin-right: 12px;
}
#media-sizes span {
font-size: 1.2em;
}
button {
background-color: red;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 1.2em;
cursor: pointer;
width: 150px;
margin-bottom: 30px;
}
button:hover {
background-color: darkblue;
}
</style>
</head>
<body>
<div id="navbar"></div>
<script>
fetch('/static/html/nav.html')
.then(response => response.text())
.then(data => {
document.getElementById('navbar').innerHTML = data;
});
</script>
<div class="content-wrapper">
<div class="content center-content">
<h1>Power Options</h1>
<img src="/static/images/switch-icon.png" alt="cards" class="header-img">
<button id="reboot-button">Reboot</button>
<button id="shutdown-button">Shutdown</button>
</div>
</div>
</body>
<script>
$(document).ready(function() {
$('#reboot-button').click(function() {
$.post('/reboot', function(response) {
alert("Reboot initiated");
}).fail(function() {
alert("Reboot failed");
});
});
$('#shutdown-button').click(function() {
$.post('/shutdown', function(response) {
alert("Shutdown initiated");
}).fail(function() {
alert("Shutdown failed");
});
});
});
</script>
</html>