Retro Heatmap - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Heatmap</title> <style> body { font-family: 'Courier New', monospace; background-color: #fffbf0; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; height: 100vh; } .retro-table { width: 100%; max-width: 700px; border-collapse: collapse; background-color: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.2); } .retro-table th, .retro-table td { padding: 15px; text-align: center; border-bottom: 1px solid #ddd; } .retro-table th { background-color: #ff6f61; color: white; } .retro-table td { transition: background-color 0.3s ease; } .retro-table td[data-value="low"] { background-color: #ffe6e6; } .retro-table td[data-value="medium"] { background-color: #fff5e6; } .retro-table td[data-value="high"] { background-color: #e6ffe6; } .retro-table td[data-value="very-high"] { background-color: #e6f7ff; } .retro-table td:hover { background-color: #ff6f61; color: white; } .retro-table td::before { content: attr(data-value); font-size: 0.75em; color: #999; } </style> </head> <body> <table class="retro-table"> <thead> <tr> <th>Category</th> <th>Item 1</th> <th>Item 2</th> <th>Item 3</th> <th>Item 4</th> </tr> </thead> <tbody> <tr> <td>Category 1</td> <td data-value="low">😟</td> <td data-value="medium">😐</td> <td data-value="high">😊</td> <td data-value="very-high">😁</td> </tr> <tr> <td>Category 2</td> <td data-value="high">😊</td> <td data-value="very-high">😁</td> <td data-value="low">😟</td> <td data-value="medium">😐</td> </tr> <tr> <td>Category 3</td> <td data-value="medium">😐</td> <td data-value="low">😟</td> <td data-value="very-high">😁</td> <td data-value="high">😊</td> </tr> </tbody> </table> <script> document.querySelectorAll('.retro-table td').forEach(cell => { cell.addEventListener('click', () => { const value = cell.getAttribute('data-value'); alert(`You clicked on a cell with value: ${value}`); }); }); </script> </body> </html>