Untitled

Anonymous
plain_text
02/21/2026 12:54 PM
13.3 KB
9
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kinesthetic Resonance Body Map</title>
    <style>
        :root {
            --bg-color: #ffffff;
            --text-main: #1a1a1a;
            --text-dim: #64748b;
            --border-color: #e2e8f0;
            --medical-accent: #2563eb;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', -apple-system, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            padding: 1.5rem;
        }

        header {
            text-align: center;
            margin-bottom: 2rem;
            max-width: 900px;
        }

        h1 {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            margin-bottom: 0.25rem;
            text-transform: uppercase;
        }

        .subtitle {
            color: var(--text-dim);
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .tool-layout {
            display: grid;
            grid-template-columns: 280px 1fr 280px;
            gap: 2rem;
            width: 100%;
            max-width: 1400px;
        }

        .panel-title {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            color: #94a3b8;
            margin-bottom: 1rem;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 0.5rem;
        }

        /* IMAGE CONTAINER SYSTEM */
        .map-wrapper {
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        #image-container {
            position: relative;
            cursor: crosshair;
            display: inline-block;
            border: 1px solid #f1f5f9;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            line-height: 0; /* Prevents tiny gap at bottom of image */
        }

        #body-image {
            max-width: 100%;
            height: auto;
            display: block;
            user-select: none;
            -webkit-user-drag: none;
        }

        /* MARKER STYLES */
        .marker {
            position: absolute;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            mix-blend-mode: multiply;
            z-index: 20;
            transition: all 0.2s ease-out;
        }

        .marker-core {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 6px;
            height: 6px;
            background: rgba(0,0,0,0.6);
            border: 1px solid white;
            border-radius: 50%;
            transform: translate(-50%, -50%);
        }

        @keyframes pulse {
            0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
            50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
            100% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
        }

        .marker.active {
            animation: pulse 2s infinite ease-in-out;
        }

        /* CONTROLS */
        .controls-panel {
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            display: none;
        }

        .val-display {
            font-size: 3rem;
            font-weight: 900;
            text-align: center;
            margin: 0.5rem 0;
        }

        input[type=range] {
            width: 100%;
            accent-color: #000;
            cursor: pointer;
        }

        .btn {
            display: block;
            width: 100%;
            padding: 0.9rem;
            margin-top: 1rem;
            border: 1px solid #000;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.7rem;
            letter-spacing: 0.1em;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .btn-black { background: #000; color: #fff; }
        .btn-white { background: #fff; color: #000; }
        .btn:hover { opacity: 0.8; }

        #toast {
            position: fixed;
            top: 1.5rem;
            background: #ef4444;
            color: #fff;
            padding: 0.75rem 1.5rem;
            border-radius: 4px;
            font-weight: 700;
            display: none;
            z-index: 1000;
        }

        .instructions {
            font-size: 0.75rem;
            color: var(--text-dim);
            margin-top: 1rem;
            line-height: 1.4;
        }
    </style>
</head>
<body>

<div id="toast">MAXIMUM 5 DATA POINTS REACHED</div>

<header>
    <h1>Kinesthetic Resonance</h1>
    <p class="subtitle">Somatic Mapping Interface</p>
</header>

<div class="tool-layout">
    <aside>
        <div class="panel-title">Protocol</div>
        <p class="instructions">
            1. Click on the body map to identify a resonance point.<br><br>
            2. Use the slider on the right to grade intensity.<br><br>
            3. Points are color-coded based on severity.
        </p>
    </aside>

    <main class="map-wrapper">
        <div id="image-container">
            <!-- 
                 REPLACE THE SRC BELOW WITH YOUR SPECIFIC IMAGE FILE PATH 
                 Example: src="my-custom-outline.png" or src="assets/body.jpg"
            -->
            <img src="body-outline.png" id="body-image" alt="Anatomical Outline">
        </div>
    </main>

    <aside>
        <div class="panel-title">Intensity Grading</div>
        <div id="controls" class="controls-panel">
            <div class="val-display" id="val-display">5</div>
            <input type="range" id="intensity" min="1" max="10" value="5">
            <p style="font-size: 0.6rem; text-align: center; margin-top: 1rem; color: #94a3b8; font-weight: 800;">ADJUST INTENSITY</p>
        </div>
        
        <div style="margin-top: 1.5rem;">
            <button class="btn btn-black" id="download">Export Findings</button>
            <button class="btn btn-white" id="clear">Clear All Points</button>
        </div>
    </aside>
</div>

<script>
    const imageContainer = document.getElementById('image-container');
    const controls = document.getElementById('controls');
    const intensityInput = document.getElementById('intensity');
    const valDisplay = document.getElementById('val-display');
    const toast = document.getElementById('toast');

    let points = [];
    let activePoint = null;

    imageContainer.onclick = (e) => {
        // Only allow clicking the container or the image itself
        if (e.target !== imageContainer && e.target.id !== 'body-image') return;
        
        if (points.length >= 5) {
            toast.style.display = 'block';
            setTimeout(() => toast.style.display = 'none', 3000);
            return;
        }

        // Get coordinates relative to the container
        const rect = imageContainer.getBoundingClientRect();
        const x = e.clientX - rect.left;
        const y = e.clientY - rect.top;

        // Convert to percentage for better responsiveness if needed
        const xPercent = (x / rect.width) * 100;
        const yPercent = (y / rect.height) * 100;

        const point = {
            id: Date.now(),
            x: xPercent,
            y: yPercent,
            intensity: 5,
            el: document.createElement('div')
        };

        point.el.className = 'marker active';
        point.el.innerHTML = '<div class="marker-core"></div>';
        
        // Use percentages for positioning so it stays put on resize
        point.el.style.left = `${xPercent}%`;
        point.el.style.top = `${yPercent}%`;

        imageContainer.appendChild(point.el);
        points.push(point);
        activePoint = point;
        
        updateMarkerStyle(point);
        controls.style.display = 'block';
        intensityInput.value = 5;
        valDisplay.innerText = 5;
    };

    intensityInput.oninput = (e) => {
        if (!activePoint) return;
        activePoint.intensity = parseInt(e.target.value);
        valDisplay.innerText = activePoint.intensity;
        updateMarkerStyle(activePoint);
    };

    function updateMarkerStyle(p) {
        const i = p.intensity;
        const size = 40 + (i * 12);
        
        // Heat Map Logic: Yellow (low) -> Orange (mid) -> Red (high)
        let color;
        if (i <= 3) {
            color = `rgba(255, 230, 0, ${0.4 + (i * 0.1)})`; // Yellowish
        } else if (i <= 7) {
            color = `rgba(255, 120, 0, ${0.5 + (i * 0.05)})`; // Orange
        } else {
            color = `rgba(220, 20, 60, ${0.6 + (i * 0.04)})`; // Deep Red
        }

        p.el.style.width = `${size}px`;
        p.el.style.height = `${size}px`;
        p.el.style.background = `radial-gradient(circle, ${color} 0%, rgba(255,255,255,0) 75%)`;
        p.el.style.filter = `blur(${i * 1.5}px)`;
    }

    document.getElementById('clear').onclick = () => {
        points.forEach(p => p.el.remove());
        points = [];
        activePoint = null;
        controls.style.display = 'none';
    };

    document.getElementById('download').onclick = () => {
        if (!points.length) return;
        const data = points.map(p => ({
            x_percent: p.x.toFixed(2),
            y_percent: p.y.toFixed(2),
            intensity: p.intensity
        }));
        
        const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
        const url = URL.createObjectURL(blob);
        const a = document.createElement('a');
        a.href = url;
        a.download = `resonance_map_${Date.now()}.json`;
        a.click();
    };
</script>

</body>
</html>
Editor is loading...
Leave a Comment