Upload files to "public"

This commit is contained in:
JoshBaneyCS 2025-04-29 01:22:41 +00:00
parent 1b084bcb18
commit 670f3239f8
2 changed files with 293 additions and 0 deletions

215
public/styles.css Normal file
View File

@ -0,0 +1,215 @@
/* ================= CSS VARIABLES ================= */
:root {
--square-size: 60px;
--gap: 8px;
--v-gap: 24px;
--warehouse-height: 200px;
}
/* ================= GLOBAL & LAYOUT ================= */
html, body {
height: 100%;
margin: 0;
padding: 0;
background: #f4f4f4;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
margin-bottom: 1rem;
}
.page-container {
margin-top: 70px; /* under fixed header */
width: 95%;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
padding: 1rem;
background: #fff;
border-radius: 6px;
box-sizing: border-box;
display: flex;
flex-direction: column;
min-height: calc(100vh - 70px);
}
/* ================= BINS HEADER & NAV BUTTONS ================= */
.main-header {
background-color: #232F3E;
display: flex;
align-items: center;
padding: 0.5rem 2rem;
position: fixed;
top: 0; left: 0; right: 0;
z-index: 1000;
}
.logo {
height: 40px;
margin-right: 1rem;
}
.header-title {
color: #fff;
font-size: 1.2rem;
font-weight: bold;
margin-right: auto;
}
.nav-btn {
background-color: #FF9900;
color: #111;
border: none;
border-radius: 5px;
padding: 0.5rem 1rem;
margin-left: 0.5rem;
cursor: pointer;
font-weight: bold;
}
.nav-btn:hover {
background-color: #e48f00;
}
/* ================= FORM STYLES ================= */
.form-input {
width: 80%;
max-width: 400px;
margin: 1rem auto;
display: block;
padding: 1rem;
font-size: 1rem;
border: 1px solid #ccc;
border-radius: 6px;
}
.big-button {
background-color: #28a745;
color: white;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
margin: 1rem auto;
display: block;
}
.big-button:hover {
background-color: #218838;
}
fieldset {
border: 1px solid #ccc;
border-radius: 6px;
padding: 1rem;
margin-bottom: 1.5rem;
}
legend {
font-weight: bold;
}
/* ================= TRENDS PAGE ================= */
/* Controls */
#trend-controls {
flex: 0 0 auto;
text-align: center;
margin-bottom: 1rem;
}
/* Chart */
.chart-container {
flex: 1 1 auto;
width: 100%;
position: relative;
}
.chart-container canvas {
width: 100% !important;
height: 100% !important;
}
/* Table */
.table-container {
margin-top: 2rem;
overflow-x: auto;
}
table.dataTable {
width: 100% !important;
}
/* ================= HEATMAP STYLES ================= */
/* Scroll & pan wrapper */
.heatmap-wrapper {
width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
display: flex;
justify-content: flex-start;
align-items: center;
}
/* Entire diagram */
.diagram-container {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--v-gap);
}
/* Dock-door row */
.dock-row {
display: flex;
gap: var(--gap);
}
/* Each dock square */
.dock-square {
width: var(--square-size);
height: var(--square-size);
background: #ddd;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
color: #333;
cursor: pointer;
user-select: none;
}
/* Regions below dock row */
.regions-container {
display: flex;
width: 100%;
gap: var(--gap);
}
.region {
flex: 1;
height: 120px;
border: 2px solid #666;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
user-select: none;
}
.region-amod { background: #eef; }
.region-preslam { background: #efe; }
.region-bmod { background: #fee; }
/* Warehouse rectangle */
.warehouse {
width: calc(
(var(--square-size) * 83) + /* adjust door count if needed */
(var(--gap) * 82)
);
height: var(--warehouse-height);
background: #ccc;
border-radius: 6px;
}
/* Hover tooltip */
.tooltip {
position: absolute;
pointer-events: none;
background: rgba(0,0,0,0.75);
color: #fff;
padding: 8px;
border-radius: 4px;
font-size: 0.9rem;
line-height: 1.2;
display: none;
z-index: 2000;
}
/* ================= UTILITY ================= */
.hidden {
display: none;
}

78
public/trends.html Normal file
View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="styles.css" />
<!-- DataTables CSS for table styling, sorting arrows, etc. -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" />
<title>Trend Graph & Table</title>
</head>
<body>
<header class="main-header">
<img src="/image/logo.png" class="logo" alt="Amazon Logo" />
<span class="header-title"> | Fuego - Heat Tracker</span>
<button class="nav-btn" onclick="location.href='/input.html'">Log Reading</button>
<button class="nav-btn" onclick="location.href='/heatmap.html'">Heat Map</button>
<button class="nav-btn" onclick="location.href='/trends.html'">Trends</button>
</header>
<div class="page-container">
<h1>Trend Analysis</h1>
<div id="trend-controls" style="text-align:center; margin-bottom:1rem;">
<!-- Interval slider -->
<label for="periodSlider">
Interval: <strong><span id="periodLabel">Daily</span></strong>
</label><br/>
<input type="range" id="periodSlider" min="0" max="4" step="1" value="1" />
<!-- Metric/stat toggles -->
<div id="metricToggles" style="margin-top:1rem;">
<label><input type="checkbox" data-metric="temp" data-stat="avg" checked /> Temp Avg</label>
<label><input type="checkbox" data-metric="temp" data-stat="min" checked /> Temp Min</label>
<label><input type="checkbox" data-metric="temp" data-stat="max" checked /> Temp Max</label>
<label><input type="checkbox" data-metric="hum" data-stat="avg" checked /> Hum Avg</label>
<label><input type="checkbox" data-metric="hum" data-stat="min" checked /> Hum Min</label>
<label><input type="checkbox" data-metric="hum" data-stat="max" checked /> Hum Max</label>
<label><input type="checkbox" data-metric="hi" data-stat="avg" checked /> HI Avg</label>
<label><input type="checkbox" data-metric="hi" data-stat="min" checked /> HI Min</label>
<label><input type="checkbox" data-metric="hi" data-stat="max" checked /> HI Max</label>
</div>
</div>
<div class="chart-container">
<canvas id="trendChart"></canvas>
</div>
<!-- Table container -->
<div class="table-container">
<table id="trendTable" class="display" style="width:100%">
<thead>
<tr>
<th>Date/Time</th>
<th>Temperature (°F)</th>
<th>Humidity (%)</th>
<th>Heat Index</th>
<th>Location</th>
<th>Direction</th>
</tr>
</thead>
<tbody>
<!-- populated dynamically -->
</tbody>
</table>
</div>
</div>
<!-- Chart.js and zoom plugin -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@2.0.1/dist/chartjs-plugin-zoom.min.js"></script>
<!-- jQuery + DataTables -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
<!-- Your trends logic -->
<script src="scripts/trends.js"></script>
</body>
</html>