From 0c4c2c0e58ef400a70b5301cc349ec24576fe80a Mon Sep 17 00:00:00 2001 From: fOuttaMyPaint Date: Tue, 24 Dec 2024 15:08:11 -0500 Subject: [PATCH] Refactor QR code component styles --- css/components/image-resizer.css | 303 ++++++++++++++++++++------- css/components/qr-code.css | 152 +++++++++----- css/styles.css | 340 ++++++++++++++++++++++--------- index.html | 152 ++++++++++++-- js/features/image-resizer.js | 338 +++++++++++++++++------------- js/features/qr-code.js | 111 +++++++--- pages/image-resizer.html | 125 ++++++++---- pages/qr-code.html | 157 +++++++------- 8 files changed, 1149 insertions(+), 529 deletions(-) diff --git a/css/components/image-resizer.css b/css/components/image-resizer.css index 60fdfe3..d57be7d 100644 --- a/css/components/image-resizer.css +++ b/css/components/image-resizer.css @@ -1,123 +1,284 @@ -.image-container { - width: 100%; - min-height: 200px; - border: 2px dashed var(--accent-color); +.resizer-controls { + background: var(--card-bg); border-radius: 10px; - margin: 1rem 0; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 1rem; - transition: all 0.3s ease; + padding: 2rem; + margin-top: 2rem; +} + +/* Drop Zone */ +.drop-zone { + border: 2px dashed rgba(255, 255, 255, 0.2); + border-radius: 10px; + padding: 2rem; + text-align: center; + cursor: pointer; + transition: var(--transition); position: relative; } -.image-container.drag-over { - background-color: var(--accent-color); +.drop-zone:hover, .drop-zone.drag-over { + border-color: var(--primary-color); + background: rgba(0, 255, 255, 0.05); +} + +.drop-zone-content { + pointer-events: none; +} + +.drop-zone-content i { + font-size: 3rem; + color: var(--primary-color); + margin-bottom: 1rem; +} + +.file-types { + font-size: 0.9rem; opacity: 0.7; + margin-top: 0.5rem; +} + +.file-input { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + opacity: 0; + cursor: pointer; +} + +/* Preview Container */ +.preview-container { + margin-top: 2rem; +} + +.preview-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1rem; } -.image-container img { +.file-info { + font-size: 0.9rem; + opacity: 0.8; +} + +.change-image { + background: none; + border: 1px solid var(--primary-color); + color: var(--primary-color); + padding: 0.5rem 1rem; +} + +.change-image:hover { + background: var(--primary-color); + color: var(--text-dark); +} + +.preview-image-container { + background: rgba(255, 255, 255, 0.05); + border-radius: 10px; + padding: 1rem; + text-align: center; +} + +#preview-image { max-width: 100%; max-height: 400px; - object-fit: contain; - margin: 1rem 0; + border-radius: 5px; } -.image-controls { +/* Settings Panel */ +.settings-panel { + margin-top: 2rem; + padding-top: 2rem; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} + +.settings-grid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - gap: 1rem; - width: 100%; - margin-top: 1rem; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1.5rem; + margin-bottom: 2rem; } .dimension-controls { - display: flex; + display: grid; + grid-template-columns: 1fr auto 1fr; gap: 1rem; - align-items: center; + align-items: end; } -.dimension-controls input[type="number"] { - width: 80px; +.input-group { + margin-bottom: 1rem; } +.input-group label { + display: block; + margin-bottom: 0.5rem; + color: var(--text-light); +} + +.input-group input, +.input-group select { + width: 100%; + padding: 0.75rem; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 5px; + background: rgba(255, 255, 255, 0.05); + color: var(--text-light); + font-family: inherit; + transition: var(--transition); +} + +.input-group input:focus, +.input-group select:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.1); +} + +/* Range Input Styling */ +input[type="range"] { + -webkit-appearance: none; + width: 100%; + height: 6px; + background: rgba(255, 255, 255, 0.1); + border-radius: 3px; + outline: none; +} + +input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + width: 20px; + height: 20px; + background: var(--primary-color); + border-radius: 50%; + cursor: pointer; + transition: var(--transition); +} + +input[type="range"]::-webkit-slider-thumb:hover { + transform: scale(1.1); +} + +/* Aspect Ratio Lock */ .aspect-ratio-lock { - color: var(--accent-color); + background: none; + border: none; + color: var(--text-light); + font-size: 1.2rem; cursor: pointer; - transition: all 0.3s ease; + padding: 0.5rem; + opacity: 0.7; + transition: var(--transition); +} + +.aspect-ratio-lock:hover { + opacity: 1; } .aspect-ratio-lock.locked { - color: var(--error-color); + color: var(--primary-color); + opacity: 1; } -.format-controls { +/* Action Buttons */ +.action-buttons { display: flex; gap: 1rem; - align-items: center; justify-content: center; - flex-wrap: wrap; } -.quality-slider { - width: 100%; - margin: 1rem 0; +.primary-button, +.secondary-button { + padding: 0.75rem 1.5rem; + border-radius: 5px; + font-weight: bold; + cursor: pointer; + transition: var(--transition); + display: flex; + align-items: center; + gap: 0.5rem; } -.preview-container { - position: relative; - width: 100%; - margin: 1rem 0; +.primary-button { + background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); + color: var(--text-dark); + border: none; } -.preview-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.5); - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - transition: opacity 0.3s ease; +.secondary-button { + background: none; + border: 1px solid var(--primary-color); + color: var(--primary-color); } -.preview-container:hover .preview-overlay { - opacity: 1; +.primary-button:hover, +.secondary-button:hover:not(:disabled) { + transform: translateY(-2px); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } -.file-info { - display: flex; - justify-content: space-between; - align-items: center; - width: 100%; - margin-top: 0.5rem; - font-size: 0.9rem; - color: var(--accent-color); +.primary-button:disabled, +.secondary-button:disabled { + opacity: 0.5; + cursor: not-allowed; + transform: none; } -.drop-message { - font-size: 1.2rem; - color: var(--accent-color); - text-align: center; - margin: 1rem 0; +/* Notification */ +.notification { + position: fixed; + bottom: 20px; + right: 20px; + padding: 1rem 2rem; + border-radius: 5px; + background: var(--card-bg); + color: var(--text-light); + display: none; + animation: slideIn 0.3s ease-out; + z-index: 1000; +} + +.notification.success { + background: #28a745; +} + +.notification.error { + background: #dc3545; +} + +@keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } } -@media (max-width: 480px) { +/* Responsive Design */ +@media (max-width: 768px) { .dimension-controls { - flex-direction: column; - align-items: stretch; + grid-template-columns: 1fr; + gap: 0.5rem; } - .dimension-controls input[type="number"] { - width: 100%; + .aspect-ratio-lock { + justify-self: center; + } + + .action-buttons { + flex-direction: column; } - .format-controls { + .preview-header { flex-direction: column; + gap: 1rem; + text-align: center; } } \ No newline at end of file diff --git a/css/components/qr-code.css b/css/components/qr-code.css index 6ea1ad2..f4b5109 100644 --- a/css/components/qr-code.css +++ b/css/components/qr-code.css @@ -1,91 +1,133 @@ .qr-controls { - display: flex; - flex-direction: column; - gap: 1.5rem; + background: var(--card-bg); + border-radius: 10px; + padding: 2rem; + margin-top: 2rem; +} + +.input-group { + margin-bottom: 1.5rem; +} + +.input-group label { + display: block; + margin-bottom: 0.5rem; + color: var(--text-light); +} + +.input-group input, +.input-group select, +.input-group textarea { + width: 100%; + padding: 0.75rem; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 5px; + background: rgba(255, 255, 255, 0.05); + color: var(--text-light); + font-family: inherit; + transition: var(--transition); +} + +.input-group input:focus, +.input-group select:focus, +.input-group textarea:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.1); +} + +.input-group input[type="color"] { + height: 40px; + padding: 0.25rem; + cursor: pointer; } .settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; + margin-bottom: 1.5rem; } -.qr-output { - display: flex; - justify-content: center; - align-items: center; - min-height: 256px; - background-color: var(--input-bg); - border-radius: 10px; - padding: 1rem; - overflow: hidden; -} - -.qr-output svg, .qr-output canvas { - max-width: 100%; - height: auto; +.output-container { + margin-top: 2rem; + text-align: center; } -.output-container { - display: flex; - flex-direction: column; - gap: 1rem; - align-items: center; +.qr-output { + background: white; + padding: 1rem; + border-radius: 10px; + display: inline-block; + margin-bottom: 1rem; + min-height: 256px; + min-width: 256px; } .output-actions { - display: flex; - gap: 1rem; - justify-content: center; + margin-top: 1rem; } -/* Color input styling */ -input[type="color"] { - -webkit-appearance: none; - width: 100%; - height: 40px; +button { + background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); + color: var(--text-dark); border: none; + padding: 0.75rem 1.5rem; border-radius: 5px; - padding: 0; cursor: pointer; + font-weight: bold; + transition: var(--transition); } -input[type="color"]::-webkit-color-swatch-wrapper { - padding: 0; +button:hover { + opacity: 0.9; + transform: translateY(-2px); } -input[type="color"]::-webkit-color-swatch { - border: none; - border-radius: 5px; +button:disabled { + opacity: 0.5; + cursor: not-allowed; + transform: none; } -input[type="color"]::-moz-color-swatch { - border: none; +.notification { + position: fixed; + bottom: 20px; + right: 20px; + padding: 1rem 2rem; border-radius: 5px; + background: var(--card-bg); + color: var(--text-light); + display: none; + animation: slideIn 0.3s ease-out; + z-index: 1000; } -/* Responsive adjustments */ -@media (max-width: 768px) { - .settings-grid { - grid-template-columns: 1fr; +.notification.success { + background: #28a745; +} + +.notification.error { + background: #dc3545; +} + +@keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; } - - .output-actions { - flex-direction: column; - } - - .qr-output { - min-height: 200px; + to { + transform: translateX(0); + opacity: 1; } } -@media (max-width: 480px) { - input[type="color"] { - height: 32px; +@media (max-width: 768px) { + .settings-grid { + grid-template-columns: 1fr; } - + .qr-output { - min-height: 150px; - padding: 0.5rem; + max-width: 100%; } } \ No newline at end of file diff --git a/css/styles.css b/css/styles.css index e2aeca9..15b7289 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1,140 +1,290 @@ -/* Theme variables */ -@import 'themes/theme-variables.css'; - -/* Components */ -@import 'components/buttons.css'; -@import 'components/inputs.css'; -@import 'components/progress.css'; -@import 'components/navigation.css'; -@import 'components/image-resizer.css'; -@import 'components/color-palette.css'; -@import 'components/ascii-art.css'; -@import 'components/qr-code.css'; -@import 'components/about.css'; - -/* Utils */ -@import 'utils/animations.css'; - -/* Base styles */ -body { - font-family: 'Roboto', sans-serif; - background-color: var(--bg-color); - color: var(--text-color); +:root { + --primary-color: #00ffff; + --secondary-color: #ff00de; + --bg-dark: #0c0c0c; + --bg-light: #ffffff; + --text-dark: #1a1a1a; + --text-light: #ffffff; + --card-bg: #1a1a1a; + --card-hover: #2a2a2a; + --transition: all 0.3s ease; +} + +/* Base Styles */ +* { margin: 0; padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Roboto', sans-serif; + background-color: var(--bg-dark); + color: var(--text-light); + line-height: 1.6; +} + +h1, h2, h3, h4 { + font-family: 'Orbitron', sans-serif; + margin-bottom: 1rem; +} + +a { + color: var(--primary-color); + text-decoration: none; + transition: var(--transition); +} + +a:hover { + color: var(--secondary-color); +} + +/* Header & Navigation */ +.hero { + background: linear-gradient(135deg, var(--bg-dark), #1a1a1a); + padding: 2rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +.nav-container { display: flex; - justify-content: center; + justify-content: space-between; align-items: center; - min-height: 100vh; - transition: all 0.3s ease; + padding: 0 2rem; + max-width: 1200px; + margin: 0 auto; +} + +.logo h1 { + font-size: 2rem; + margin: 0; + background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.theme-toggle button { + background: none; + border: none; + color: var(--text-light); + font-size: 1.5rem; + cursor: pointer; + padding: 0.5rem; + transition: var(--transition); +} + +.theme-toggle button:hover { + color: var(--primary-color); +} + +.hero-content { + padding: 4rem 2rem; + max-width: 800px; + margin: 0 auto; } +.hero-title { + font-size: 3rem; + margin-bottom: 1rem; + text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); +} + +.hero-subtitle { + font-size: 1.5rem; + opacity: 0.9; +} + +/* Main Content */ .container { - background-color: var(--container-bg); - padding: 2rem; + max-width: 1200px; + margin: 0 auto; + padding: 4rem 2rem; +} + +/* Tools Grid */ +.tools-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + gap: 2rem; + margin-bottom: 4rem; +} + +.tool-card { + background: var(--card-bg); border-radius: 10px; - box-shadow: 0 0 20px var(--shadow-color); - max-width: 800px; - width: 100%; - margin: 1rem; - transition: all 0.3s ease; + padding: 2rem; + text-align: center; + transition: var(--transition); + cursor: pointer; position: relative; + overflow: hidden; +} + +.tool-card:hover { + transform: translateY(-5px); + background: var(--card-hover); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); +} + +.tool-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 4px; + background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); + opacity: 0; + transition: var(--transition); +} + +.tool-card:hover::before { + opacity: 1; +} + +.tool-icon { + font-size: 2.5rem; + margin-bottom: 1rem; + color: var(--primary-color); +} + +.tool-card h3 { + font-size: 1.5rem; + margin-bottom: 1rem; } -.content { +.tool-card p { + margin-bottom: 1.5rem; + opacity: 0.9; +} + +.tool-features { display: flex; - flex-direction: column; + justify-content: center; gap: 1rem; } -/* Text-to-Speech specific layouts */ -.controls-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 1rem; - margin: 1rem 0; +.tool-features span { + background: rgba(255, 255, 255, 0.1); + padding: 0.25rem 0.75rem; + border-radius: 15px; + font-size: 0.9rem; } -.text-controls { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 0.5rem; +/* Features Section */ +.features { + text-align: center; + padding: 4rem 0; } -.text-actions { - display: flex; - gap: 0.5rem; +.features h2 { + margin-bottom: 3rem; } -.history-section, .templates-section { - margin-top: 2rem; - padding-top: 1rem; - border-top: 1px solid var(--input-border); +.features-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; } -.history-list { - max-height: 200px; - overflow-y: auto; - margin-top: 1rem; +.feature { + padding: 2rem; } -.history-item { - padding: 0.5rem; - margin-bottom: 0.5rem; - background-color: var(--input-bg); - border-radius: 5px; - cursor: pointer; - transition: all 0.3s ease; +.feature i { + font-size: 2.5rem; + color: var(--primary-color); + margin-bottom: 1rem; } -.history-item:hover { - background-color: var(--accent-color); - color: var(--bg-color); +/* Footer */ +.footer { + background: var(--card-bg); + padding: 4rem 2rem 2rem; } -.template-buttons { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-top: 1rem; +.footer-content { + max-width: 1200px; + margin: 0 auto; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 2rem; + margin-bottom: 2rem; } -#language-detect { - margin-top: 0.5rem; - font-size: 0.9rem; - color: var(--accent-color); +.footer-section h4 { + color: var(--primary-color); + margin-bottom: 1rem; } -.theme-toggle { - position: absolute; - top: 1rem; - right: 1rem; +.footer-section ul { + list-style: none; } -/* Responsive adjustments */ +.footer-section ul li { + margin-bottom: 0.5rem; +} + +.footer-bottom { + text-align: center; + padding-top: 2rem; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} + +/* Responsive Design */ @media (max-width: 768px) { + .hero-title { + font-size: 2rem; + } + + .hero-subtitle { + font-size: 1.2rem; + } + .container { - margin: 0.5rem; - padding: 1rem; + padding: 2rem 1rem; + } + + .tools-grid { + gap: 1rem; } - - .controls-grid { + + .footer-content { grid-template-columns: 1fr; + text-align: center; } } -@media (max-width: 480px) { - .neon-text { - font-size: 1.5rem; +/* Animations */ +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(20px); } - - .text-controls { - flex-direction: column; - align-items: stretch; - } - - .text-actions { - margin-top: 0.5rem; + to { + opacity: 1; + transform: translateY(0); } } + +.tool-card { + animation: fadeIn 0.5s ease-out forwards; +} + +.tool-card:nth-child(2) { + animation-delay: 0.1s; +} + +.tool-card:nth-child(3) { + animation-delay: 0.2s; +} + +.tool-card:nth-child(4) { + animation-delay: 0.3s; +} + +.tool-card:nth-child(5) { + animation-delay: 0.4s; +} diff --git a/index.html b/index.html index 62ed25c..621f135 100644 --- a/index.html +++ b/index.html @@ -3,30 +3,146 @@ - Digital Services Hub + Digital Services Hub - Web Tools for Digital Tasks + - - + + -
-

Digital Services Hub

-