|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
| 6 | + <title>TaskBeacon</title> |
| 7 | + <link rel="stylesheet" href="styles/main.css"/> |
| 8 | + <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet"> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | + <div class="container"> |
| 12 | + <header> |
| 13 | + <h1>🟡 TASKBEACON</h1> |
| 14 | + <button class="btn">Browse Tasks</button> |
| 15 | + </header> |
| 16 | + |
| 17 | + <section class="hero"> |
| 18 | + <h2>STANDARDIZING COGNITIVE TASKS</h2> |
| 19 | + <p>A platform for visioning and sharing standard cognitive tasks</p> |
| 20 | + </section> |
| 21 | + |
| 22 | + <section class="features"> |
| 23 | + <div class="card" id="taps-section"> |
| 24 | + <span class="icon" role="img" aria-label="TAPS icon">📝</span> |
| 25 | + <h3>STANDARD STRUCTURE</h3> |
| 26 | + <div class="content" data-src="content/taps.md">Loading...</div> |
| 27 | + </div> |
| 28 | + <div class="card" id="psyflow-section"> |
| 29 | + <span class="icon" role="img" aria-label="Psyflow icon">🧠</span> |
| 30 | + <h3>PSYFLOW FRAMEWORK</h3> |
| 31 | + <div class="content" data-src="content/psyflow.md">Loading...</div> |
| 32 | + </div> |
| 33 | + <div class="card" id="library-section"> |
| 34 | + <span class="icon" role="img" aria-label="Library icon">📚</span> |
| 35 | + <h3>BROWSE TASK LIBRARY</h3> |
| 36 | + <div class="content" data-src="content/library.md">Loading...</div> |
| 37 | + </div> |
| 38 | + </section> |
| 39 | + |
| 40 | + <section class="task-library"> |
| 41 | + <h2>TASK LIBRARY</h2> |
| 42 | + <ul class="content" data-src="content/task-list.md"></ul> |
| 43 | + </section> |
| 44 | + |
| 45 | + <footer> |
| 46 | + <button class="btn">GET STARTED</button> |
| 47 | + </footer> |
| 48 | + </div> |
| 49 | + |
| 50 | + <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js" ></script> |
| 51 | + <script> |
| 52 | + const converter = new showdown.Converter(); |
| 53 | + document.querySelectorAll('.content').forEach(async element => { |
| 54 | + const src = element.getAttribute('data-src'); |
| 55 | + if (src) { |
| 56 | + try { |
| 57 | + const response = await fetch(src); |
| 58 | + const text = await response.text(); |
| 59 | + if (element.tagName.toLowerCase() === 'ul') { |
| 60 | + // convert lines to list items |
| 61 | + const items = text.split(/\r?\n/).filter(Boolean).map(t => `<li>${converter.makeHtml(t)}</li>`).join(''); |
| 62 | + element.innerHTML = items; |
| 63 | + } else { |
| 64 | + element.innerHTML = converter.makeHtml(text); |
| 65 | + } |
| 66 | + } catch (err) { |
| 67 | + element.textContent = 'Content failed to load.'; |
| 68 | + } |
| 69 | + } |
| 70 | + }); |
| 71 | + </script> |
| 72 | +</body> |
| 73 | +</html> |
0 commit comments