frame-template.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Brainstorm Companion</title>
  5. <style>
  6. /*
  7. * BRAINSTORM COMPANION FRAME TEMPLATE
  8. *
  9. * This template provides a consistent frame with:
  10. * - OS-aware light/dark theming
  11. * - Fixed header and feedback footer
  12. * - Scrollable main content area
  13. * - CSS helpers for common UI patterns
  14. *
  15. * CLAUDE: Replace the contents of #claude-content with your content.
  16. * Keep the header, main wrapper, and feedback-footer intact.
  17. */
  18. * { box-sizing: border-box; margin: 0; padding: 0; }
  19. html, body { height: 100%; overflow: hidden; }
  20. /* ===== THEME VARIABLES ===== */
  21. :root {
  22. --bg-primary: #f5f5f7;
  23. --bg-secondary: #ffffff;
  24. --bg-tertiary: #e5e5e7;
  25. --border: #d1d1d6;
  26. --text-primary: #1d1d1f;
  27. --text-secondary: #86868b;
  28. --text-tertiary: #aeaeb2;
  29. --accent: #0071e3;
  30. --accent-hover: #0077ed;
  31. --success: #34c759;
  32. --warning: #ff9f0a;
  33. --error: #ff3b30;
  34. --selected-bg: #e8f4fd;
  35. --selected-border: #0071e3;
  36. }
  37. @media (prefers-color-scheme: dark) {
  38. :root {
  39. --bg-primary: #1d1d1f;
  40. --bg-secondary: #2d2d2f;
  41. --bg-tertiary: #3d3d3f;
  42. --border: #424245;
  43. --text-primary: #f5f5f7;
  44. --text-secondary: #86868b;
  45. --text-tertiary: #636366;
  46. --accent: #0a84ff;
  47. --accent-hover: #409cff;
  48. --selected-bg: rgba(10, 132, 255, 0.15);
  49. --selected-border: #0a84ff;
  50. }
  51. }
  52. body {
  53. font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  54. background: var(--bg-primary);
  55. color: var(--text-primary);
  56. display: flex;
  57. flex-direction: column;
  58. line-height: 1.5;
  59. }
  60. /* ===== FRAME STRUCTURE ===== */
  61. .header {
  62. background: var(--bg-secondary);
  63. padding: 0.5rem 1.5rem;
  64. display: flex;
  65. justify-content: space-between;
  66. align-items: center;
  67. border-bottom: 1px solid var(--border);
  68. flex-shrink: 0;
  69. }
  70. .header h1 { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
  71. .header .status { font-size: 0.7rem; color: var(--success); display: flex; align-items: center; gap: 0.4rem; }
  72. .header .status::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
  73. .main { flex: 1; overflow-y: auto; }
  74. #claude-content { padding: 2rem; min-height: 100%; }
  75. .feedback-footer {
  76. background: var(--bg-secondary);
  77. border-top: 1px solid var(--border);
  78. padding: 0.75rem 1.5rem;
  79. flex-shrink: 0;
  80. }
  81. .feedback-footer label { display: block; font-size: 0.65rem; color: var(--text-secondary); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
  82. .feedback-row { display: flex; gap: 0.5rem; }
  83. .feedback-footer textarea {
  84. flex: 1;
  85. background: var(--bg-primary);
  86. border: 1px solid var(--border);
  87. border-radius: 6px;
  88. padding: 0.5rem 0.75rem;
  89. color: var(--text-primary);
  90. font-family: inherit;
  91. font-size: 0.85rem;
  92. resize: none;
  93. height: 36px;
  94. }
  95. .feedback-footer textarea:focus { outline: none; border-color: var(--accent); }
  96. .feedback-footer button {
  97. background: var(--accent);
  98. color: white;
  99. border: none;
  100. padding: 0 1rem;
  101. border-radius: 6px;
  102. font-size: 0.8rem;
  103. cursor: pointer;
  104. }
  105. .feedback-footer button:hover { background: var(--accent-hover); }
  106. /* ===== TYPOGRAPHY ===== */
  107. h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
  108. h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
  109. .subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
  110. .section { margin-bottom: 2rem; }
  111. .label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
  112. /* ===== OPTIONS (for A/B/C choices) ===== */
  113. .options { display: flex; flex-direction: column; gap: 0.75rem; }
  114. .option {
  115. background: var(--bg-secondary);
  116. border: 2px solid var(--border);
  117. border-radius: 12px;
  118. padding: 1rem 1.25rem;
  119. cursor: pointer;
  120. transition: all 0.15s ease;
  121. display: flex;
  122. align-items: flex-start;
  123. gap: 1rem;
  124. }
  125. .option:hover { border-color: var(--accent); }
  126. .option.selected { background: var(--selected-bg); border-color: var(--selected-border); }
  127. .option .letter {
  128. background: var(--bg-tertiary);
  129. color: var(--text-secondary);
  130. width: 1.75rem; height: 1.75rem;
  131. border-radius: 6px;
  132. display: flex; align-items: center; justify-content: center;
  133. font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
  134. }
  135. .option.selected .letter { background: var(--accent); color: white; }
  136. .option .content { flex: 1; }
  137. .option .content h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
  138. .option .content p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }
  139. /* ===== CARDS (for showing designs/mockups) ===== */
  140. .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
  141. .card {
  142. background: var(--bg-secondary);
  143. border: 1px solid var(--border);
  144. border-radius: 12px;
  145. overflow: hidden;
  146. cursor: pointer;
  147. transition: all 0.15s ease;
  148. }
  149. .card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
  150. .card.selected { border-color: var(--selected-border); border-width: 2px; }
  151. .card-image { background: var(--bg-tertiary); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
  152. .card-body { padding: 1rem; }
  153. .card-body h3 { margin-bottom: 0.25rem; }
  154. .card-body p { color: var(--text-secondary); font-size: 0.85rem; }
  155. /* ===== MOCKUP CONTAINER ===== */
  156. .mockup {
  157. background: var(--bg-secondary);
  158. border: 1px solid var(--border);
  159. border-radius: 12px;
  160. overflow: hidden;
  161. margin-bottom: 1.5rem;
  162. }
  163. .mockup-header {
  164. background: var(--bg-tertiary);
  165. padding: 0.5rem 1rem;
  166. font-size: 0.75rem;
  167. color: var(--text-secondary);
  168. border-bottom: 1px solid var(--border);
  169. }
  170. .mockup-body { padding: 1.5rem; }
  171. /* ===== SPLIT VIEW (side-by-side comparison) ===== */
  172. .split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  173. @media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
  174. /* ===== PROS/CONS ===== */
  175. .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
  176. .pros, .cons { background: var(--bg-secondary); border-radius: 8px; padding: 1rem; }
  177. .pros h4 { color: var(--success); font-size: 0.85rem; margin-bottom: 0.5rem; }
  178. .cons h4 { color: var(--error); font-size: 0.85rem; margin-bottom: 0.5rem; }
  179. .pros ul, .cons ul { margin-left: 1.25rem; font-size: 0.85rem; color: var(--text-secondary); }
  180. .pros li, .cons li { margin-bottom: 0.25rem; }
  181. /* ===== PLACEHOLDER (for mockup areas) ===== */
  182. .placeholder {
  183. background: var(--bg-tertiary);
  184. border: 2px dashed var(--border);
  185. border-radius: 8px;
  186. padding: 2rem;
  187. text-align: center;
  188. color: var(--text-tertiary);
  189. }
  190. /* ===== INLINE MOCKUP ELEMENTS ===== */
  191. .mock-nav { background: var(--accent); color: white; padding: 0.75rem 1rem; display: flex; gap: 1.5rem; font-size: 0.9rem; }
  192. .mock-sidebar { background: var(--bg-tertiary); padding: 1rem; min-width: 180px; }
  193. .mock-content { padding: 1.5rem; flex: 1; }
  194. .mock-button { background: var(--accent); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; }
  195. .mock-input { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; width: 100%; }
  196. </style>
  197. </head>
  198. <body>
  199. <div class="header">
  200. <h1>Brainstorm Companion</h1>
  201. <div class="status">Connected</div>
  202. </div>
  203. <div class="main">
  204. <div id="claude-content">
  205. <!-- CLAUDE: Replace this content -->
  206. <h2>Visual Brainstorming</h2>
  207. <p class="subtitle">Claude will show mockups and options here.</p>
  208. </div>
  209. </div>
  210. <div class="feedback-footer">
  211. <label>Feedback for Claude</label>
  212. <div class="feedback-row">
  213. <textarea id="feedback" placeholder="Add notes (optional)..." onkeydown="if(event.key==='Enter'&&!event.shiftKey){event.preventDefault();send()}"></textarea>
  214. <button onclick="send()">Send</button>
  215. </div>
  216. </div>
  217. <script>
  218. let selectedChoice = null;
  219. function toggleSelect(el) {
  220. const container = el.closest('.options') || el.closest('.cards');
  221. if (container) {
  222. container.querySelectorAll('.option, .card').forEach(o => o.classList.remove('selected'));
  223. }
  224. el.classList.add('selected');
  225. selectedChoice = el.dataset.choice;
  226. }
  227. function send() {
  228. const feedbackEl = document.getElementById('feedback');
  229. const feedback = feedbackEl.value.trim();
  230. const payload = {};
  231. if (selectedChoice) payload.choice = selectedChoice;
  232. if (feedback) payload.feedback = feedback;
  233. if (Object.keys(payload).length === 0) return;
  234. brainstorm.sendToClaude(payload);
  235. feedbackEl.value = '';
  236. }
  237. </script>
  238. </body>
  239. </html>