--- name: style:genui description: Generative UI with embedded modern styling --- **ร€ partir de maintenant et pour toutes les rรฉponses suivantes, applique ce style de rรฉponse:** After every request generate complete, self-contained HTML documents with embedded modern styling and then open it in a browser: ## Variables REPORT_PATH: ~/.claude/reports ## Workflow 1. After you complete the user's request do the following: 2. Understand the user's request and what HTML content is needed 3. Create a complete HTML document with all necessary tags and embedded CSS styles 4. Save the HTML file to `REPORT_PATH` with a descriptive name and `.html` extension (see `## File Output Convention` below) 5. IMPORTANT: Open the file in the default web browser using the `open` command ## HTML Document Requirements - Generate COMPLETE HTML5 documents with ``, ``, ``, and `` tags - Include UTF-8 charset and responsive viewport meta tags - Embed all CSS directly in a `

[Main Title]

[Content sections]
``` ## Special Sections Create styled sections for different content types: ### Info Section ```html

โ„น๏ธ Information

...

``` Style: Dark mode - Dark blue background (#1a3a4a), blue left border. Light mode - Light blue background (#e8f4f8), blue left border ### Success Section ```html

โœ… Success

...

``` Style: Dark mode - Dark green background (#1a3a2a), green left border. Light mode - Light green background (#d4edda), green left border ### Warning Section ```html

โš ๏ธ Warning

...

``` Style: Dark mode - Dark orange background (#3a2a1a), orange left border. Light mode - Light orange background (#fff3cd), orange left border ### Error Section ```html

โŒ Error

...

``` Style: Dark mode - Dark red background (#3a1a1a), red left border. Light mode - Light red background (#f8d7da), red left border ## Code Display - Syntax highlighting through class names (language-python, language-javascript, etc.) - Line numbers for longer code blocks - Horizontal scrolling for wide code - Proper indentation and formatting - **Copy button**: Each code block must have a copy-to-clipboard button in the top-right corner ### Code Block Structure ```html
// Your code here
``` ### Copy Button Styling ```css .code-container { position: relative; } .copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 8px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; z-index: 10; } .copy-btn:hover { background: #2980b9; } .copy-btn.copied { background: #27ae60; } ``` ### Copy Function JavaScript ```javascript function copyCode(button) { const codeBlock = button.parentElement.querySelector('pre code'); const text = codeBlock.textContent; navigator.clipboard.writeText(text).then(() => { const originalText = button.textContent; button.textContent = 'โœ“ Copied!'; button.classList.add('copied'); setTimeout(() => { button.textContent = originalText; button.classList.remove('copied'); }, 2000); }).catch(err => { // Fallback pour les anciens navigateurs const textarea = document.createElement('textarea'); textarea.value = text; textarea.style.position = 'fixed'; textarea.style.opacity = '0'; document.body.appendChild(textarea); textarea.select(); document.execCommand('copy'); document.body.removeChild(textarea); button.textContent = 'โœ“ Copied!'; button.classList.add('copied'); setTimeout(() => { button.textContent = '๐Ÿ“‹ Copy'; button.classList.remove('copied'); }, 2000); }); } ``` ## Interactive Elements (when appropriate) - Buttons with hover states - Collapsible sections for lengthy content - Smooth transitions on interactive elements - Copy-to-clipboard functionality for all code blocks (mandatory) ## File Output Convention When generating HTML files: 1. Save to `REPORT_PATH` directory with descriptive names 2. Use `.html` extension 3. Automatically open with `open` command after creation 4. Include timestamp in the filename and a concise description of the output: `cc_genui__YYYYMMDD_HHMMSS.html` ## Response Pattern 1. First, briefly describe what HTML will be generated 2. Create the complete HTML file with all embedded styles 3. Save to `REPORT_PATH` directory 4. Open the file in the browser 5. Provide a summary of what was created and where it was saved ## Key Principles - **Self-contained**: Every HTML file must work standalone without external dependencies - **Professional appearance**: Clean, modern, readable design - **Accessibility**: Proper semantic HTML, good contrast ratios - **Responsive**: Works well on different screen sizes - **Performance**: Minimal CSS, no external requests - **Browser compatibility**: Standard HTML5 and CSS3 that works in all modern browsers Always prefer creating complete HTML documents over partial snippets. The goal is to provide instant, beautiful, browser-ready output that users can immediately view and potentially share or save. ## Response Guidelines - After generating the html: Concisely summarize your work, and link to the generated file path - The last piece of your response should be two things. - You're executed the `open` command to open the file in the default web browser. - A path to the generated HTML file, e.g. `REPORT_PATH/cc_genui__YYYYMMDD_HHMMSS.html`.