JSFiddle - React, Tailwind, and code Playground

by velo_ninja

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TempManager + Pattern Manager (Stabilize Mode)</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: #f5f5f5; }
.wrapperTop, .wrapperCenter, .wrapperBottom { padding: 10px; }
.wrapperTop { background: #8f8; }
.wrapperCenter { background: #88f; }
.wrapperBottom {
  background: orange;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.control-section, .json-section, .pattern-section { padding: 10px; background: #fff; border-radius: 8px; box-shadow: 0 0 5px rgba(0,0,0,0.1);}
textarea { width: 100%; height: 150px; resize: vertical; font-family: monospace; }
button, input, select { margin: 3px; padding: 4px 6px; font-size: 0.9em; }
table { border-collapse: collapse; width: 100%; margin-top: 5px; }
th, td { border: 1px solid #aaa; padding: 4px 6px; text-align: center; vertical-align: top; }
th { background: #ddd; position: sticky; top: 0; z-index: 5; }
</style>
</head>
<body>

<!-- Top wrapper: controls -->
<div class="wrapperTop" id="wrapperTop"></div>

<!-- Center wrapper: table -->
<div class="wrapperCenter">
  <div id="tableContainer" class="control-section">
    <h3>Temperature Table</h3>
  </div>
</div>

<!-- Bottom wrapper: JSON + pattern manager -->
<div class="wrapperBottom">
  <div class="json-section">
    <h3>Dataset JSON Input</h3>
    <textarea id="datasetInput" placeholder="Paste JSON dataset here..."></textarea>
    <button id="applyJSONBtn">Apply JSON</button>
    <button id="resetManualBtn">Reset Manual Mode</button>
  </div>

  <div class="json-section">
    <h3>Live JSON Preview</h3>
    <textarea id="jsonPreview" readonly></textarea>
  </div>

  <div class="pattern-section">
    <h3>Pattern Manager</h3>
    <textarea id="patternInput" placeholder="Enter new pattern JSON here..."></textarea>
    <label>Assign Function:</label>
    <select id="functionSelect"></select>
  ...