-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(content): remove generic tool and home padding #972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/product-value-20260912-02
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ | |
| import { respondHTML, respondJSON } from "../utils/respond.js"; | ||
| import { createPageTemplate, createToolHeader } from "../utils/common-ui.js"; | ||
| import { | ||
| createEducationalSection, | ||
| createRelatedToolsSection, | ||
| } from "../utils/content-ui.js"; | ||
| import { TOOLS } from "../utils/tool-registry.js"; | ||
|
|
@@ -162,33 +161,7 @@ function renderColorConverterPage(lang = DEFAULT_LANGUAGE) { | |
| </div> | ||
| </main> | ||
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12"> | ||
| ${createEducationalSection( | ||
| [ | ||
| { | ||
| title: "Color Models Explained (HEX/RGB/HSL)", | ||
| content: | ||
| "<p>Color models are mathematical systems for representing colors. <strong>HEX</strong> (Hexadecimal) is a 6-digit code used in HTML and CSS, representing Red, Green, and Blue components. <strong>RGB</strong> (Red, Green, Blue) uses decimal values from 0 to 255 for each channel, often used in digital imaging.</p><p><strong>HSL</strong> (Hue, Saturation, Lightness) is more intuitive for humans, as it describes color in terms of its base pigment (Hue), intensity (Saturation), and brightness (Lightness). Understanding these models helps in choosing the right format for your design and development needs, ensuring consistency across different platforms and devices.</p>", | ||
| }, | ||
| { | ||
| title: "How to Use This Tool", | ||
| content: | ||
| '<ol><li>Use the visual color picker to select a color by dragging the cursor in the saturation/brightness square and the hue slider.</li><li>Alternatively, enter a specific value in the "Manual Input" field (supports #hex, rgb, or hsl formats).</li><li>Observe the "Preview" box to see the selected color in real-time.</li><li>View the converted values in the HEX, RGB, HSL, and HSV cards below.</li><li>Click the "Copy" icon on any card to save that specific format to your clipboard.</li></ol>', | ||
| }, | ||
| { | ||
| title: "Common Use Cases", | ||
| content: | ||
| "<ul><li><strong>Web Design:</strong> Convert colors from design tools (often RGB/HSL) to HEX codes for use in CSS stylesheets.</li><li><strong>Brand Consistency:</strong> Ensure your brand colors are accurately represented across different digital formats and media.</li><li><strong>UI Development:</strong> Quickly generate lighter or darker variations of a base color by adjusting the Lightness value in HSL.</li><li><strong>Accessibility Testing:</strong> Use the preview to check if your chosen colors provide enough contrast for readable text and UI elements.</li></ul>", | ||
| }, | ||
| { | ||
| title: "Pro Tips", | ||
| content: | ||
| "<ul><li>Use HSL when designing UI components like buttons, as it makes it easy to create hover states by simply adjusting the lightness value.</li><li>When working with transparency in CSS, prefer <code>rgba()</code> or <code>hsla()</code> for better readability and control over the alpha channel.</li><li>Always check for color contrast ratios to ensure your designs are accessible to users with visual impairments.</li></ul>", | ||
| }, | ||
| ], | ||
| "color-converter", | ||
| currentLang, | ||
| )} | ||
| </div> | ||
| </div> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The removal leaves an empty Prompt for AI agents |
||
| ${createRelatedToolsSection(relatedToolsData)} | ||
| `; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The related-tools section is now rendered outside the page-width/padding wrapper, so its grid can span the full viewport and lose the horizontal padding used by the rest of the page. Keep
createRelatedToolsSection(relatedToolsData)inside themax-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12container, removing only the educational content.Prompt for AI agents