Spaces:
Running
Running
Review revise and update with a comprehensive refactoring.
Browse files- components/footer.js +123 -44
- components/header.js +100 -50
- index.html +229 -31
- script.js +52 -88
- style.css +134 -29
components/footer.js
CHANGED
|
@@ -1,94 +1,173 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
| 5 |
<style>
|
| 6 |
:host {
|
| 7 |
display: block;
|
| 8 |
-
margin-top:
|
| 9 |
}
|
| 10 |
|
| 11 |
-
footer {
|
| 12 |
-
background-color: #
|
| 13 |
border-top: 1px solid #374151;
|
| 14 |
-
padding: 2rem 0;
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
.container {
|
| 18 |
-
max-width:
|
| 19 |
margin: 0 auto;
|
| 20 |
padding: 0 1rem;
|
| 21 |
}
|
| 22 |
|
| 23 |
.footer-content {
|
| 24 |
-
display:
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
.social-links {
|
| 31 |
display: flex;
|
| 32 |
-
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
.social-link {
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
.social-link:hover {
|
| 42 |
-
color: #
|
|
|
|
| 43 |
}
|
| 44 |
|
| 45 |
.copyright {
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
| 47 |
font-size: 0.875rem;
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
</style>
|
| 51 |
|
| 52 |
-
<footer>
|
| 53 |
<div class="container">
|
| 54 |
<div class="footer-content">
|
| 55 |
-
<div class="
|
| 56 |
-
<
|
| 57 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
</div>
|
| 59 |
|
| 60 |
-
<div class="
|
| 61 |
-
<
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
<
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
</a>
|
| 70 |
</div>
|
| 71 |
|
| 72 |
-
<
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
</div>
|
| 76 |
</div>
|
| 77 |
</footer>
|
| 78 |
`;
|
| 79 |
|
| 80 |
-
// Initialize
|
| 81 |
setTimeout(() => {
|
| 82 |
-
const
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
};
|
| 89 |
-
this.shadowRoot.appendChild(featherScript);
|
| 90 |
}, 0);
|
| 91 |
}
|
| 92 |
}
|
| 93 |
|
| 94 |
-
customElements.define('
|
|
|
|
| 1 |
+
|
| 2 |
+
class FluxFooter extends HTMLElement {
|
| 3 |
connectedCallback() {
|
| 4 |
this.attachShadow({ mode: 'open' });
|
| 5 |
this.shadowRoot.innerHTML = `
|
| 6 |
<style>
|
| 7 |
:host {
|
| 8 |
display: block;
|
| 9 |
+
margin-top: auto;
|
| 10 |
}
|
| 11 |
|
| 12 |
+
.footer {
|
| 13 |
+
background-color: #1F2937;
|
| 14 |
border-top: 1px solid #374151;
|
| 15 |
+
padding: 2rem 0 1rem;
|
| 16 |
+
margin-top: auto;
|
| 17 |
}
|
| 18 |
|
| 19 |
.container {
|
| 20 |
+
max-width: 1280px;
|
| 21 |
margin: 0 auto;
|
| 22 |
padding: 0 1rem;
|
| 23 |
}
|
| 24 |
|
| 25 |
.footer-content {
|
| 26 |
+
display: grid;
|
| 27 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 28 |
+
gap: 2rem;
|
| 29 |
+
margin-bottom: 2rem;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.footer-section h3 {
|
| 33 |
+
color: #F9FAFB;
|
| 34 |
+
margin-bottom: 1rem;
|
| 35 |
+
font-size: 1.125rem;
|
| 36 |
+
font-weight: 600;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.footer-links {
|
| 40 |
+
list-style: none;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.footer-links li {
|
| 44 |
+
margin-bottom: 0.5rem;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.footer-links a {
|
| 48 |
+
color: #9CA3AF;
|
| 49 |
+
text-decoration: none;
|
| 50 |
+
transition: color 0.2s;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.footer-links a:hover {
|
| 54 |
+
color: #10B981;
|
| 55 |
}
|
| 56 |
|
| 57 |
.social-links {
|
| 58 |
display: flex;
|
| 59 |
+
gap: 1rem;
|
| 60 |
+
margin-top: 1rem;
|
| 61 |
}
|
| 62 |
|
| 63 |
.social-link {
|
| 64 |
+
display: inline-flex;
|
| 65 |
+
align-items: center;
|
| 66 |
+
justify-content: center;
|
| 67 |
+
width: 36px;
|
| 68 |
+
height: 36px;
|
| 69 |
+
border-radius: 50%;
|
| 70 |
+
background-color: #374151;
|
| 71 |
+
color: #F9FAFB;
|
| 72 |
+
transition: all 0.2s;
|
| 73 |
}
|
| 74 |
|
| 75 |
.social-link:hover {
|
| 76 |
+
background-color: #10B981;
|
| 77 |
+
transform: translateY(-2px);
|
| 78 |
}
|
| 79 |
|
| 80 |
.copyright {
|
| 81 |
+
border-top: 1px solid #374151;
|
| 82 |
+
padding-top: 1rem;
|
| 83 |
+
text-align: center;
|
| 84 |
+
color: #9CA3AF;
|
| 85 |
font-size: 0.875rem;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
@media (max-width: 768px) {
|
| 89 |
+
.footer-content {
|
| 90 |
+
grid-template-columns: 1fr;
|
| 91 |
+
}
|
| 92 |
}
|
| 93 |
</style>
|
| 94 |
|
| 95 |
+
<footer class="footer">
|
| 96 |
<div class="container">
|
| 97 |
<div class="footer-content">
|
| 98 |
+
<div class="footer-section">
|
| 99 |
+
<h3>Flux Fusion Studio</h3>
|
| 100 |
+
<p style="color: #9CA3AF; margin-bottom: 1rem; line-height: 1.5;">
|
| 101 |
+
Advanced AI-powered creative tools for artists, designers, and creators.
|
| 102 |
+
Transform your imagination into reality with our cutting-edge generation platform.
|
| 103 |
+
</p>
|
| 104 |
+
<div class="social-links">
|
| 105 |
+
<a href="#" class="social-link">
|
| 106 |
+
<i data-feather="twitter" style="width: 16px; height: 16px;"></i>
|
| 107 |
+
</a>
|
| 108 |
+
<a href="#" class="social-link">
|
| 109 |
+
<i data-feather="github" style="width: 16px; height: 16px;"></i>
|
| 110 |
+
</a>
|
| 111 |
+
<a href="#" class="social-link">
|
| 112 |
+
<i data-feather="instagram" style="width: 16px; height: 16px;"></i>
|
| 113 |
+
</a>
|
| 114 |
+
<a href="#" class="social-link">
|
| 115 |
+
<i data-feather="discord" style="width: 16px; height: 16px;"></i>
|
| 116 |
+
</a>
|
| 117 |
+
</div>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
<div class="footer-section">
|
| 121 |
+
<h3>Product</h3>
|
| 122 |
+
<ul class="footer-links">
|
| 123 |
+
<li><a href="#">Features</a></li>
|
| 124 |
+
<li><a href="#">Pricing</a></li>
|
| 125 |
+
<li><a href="#">API Access</a></li>
|
| 126 |
+
<li><a href="#">Integrations</a></li>
|
| 127 |
+
<li><a href="#">Roadmap</a></li>
|
| 128 |
+
</ul>
|
| 129 |
</div>
|
| 130 |
|
| 131 |
+
<div class="footer-section">
|
| 132 |
+
<h3>Resources</h3>
|
| 133 |
+
<ul class="footer-links">
|
| 134 |
+
<li><a href="#">Documentation</a></li>
|
| 135 |
+
<li><a href="#">Tutorials</a></li>
|
| 136 |
+
<li><a href="#">Blog</a></li>
|
| 137 |
+
<li><a href="#">Community</a></li>
|
| 138 |
+
<li><a href="#">Support Center</a></li>
|
| 139 |
+
</ul>
|
|
|
|
| 140 |
</div>
|
| 141 |
|
| 142 |
+
<div class="footer-section">
|
| 143 |
+
<h3>Company</h3>
|
| 144 |
+
<ul class="footer-links">
|
| 145 |
+
<li><a href="#">About Us</a></li>
|
| 146 |
+
<li><a href="#">Careers</a></li>
|
| 147 |
+
<li><a href="#">Contact</a></li>
|
| 148 |
+
<li><a href="#">Privacy Policy</a></li>
|
| 149 |
+
<li><a href="#">Terms of Service</a></li>
|
| 150 |
+
</ul>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<div class="copyright">
|
| 155 |
+
<p>© 2023 Flux Fusion Studio. All rights reserved.</p>
|
| 156 |
</div>
|
| 157 |
</div>
|
| 158 |
</footer>
|
| 159 |
`;
|
| 160 |
|
| 161 |
+
// Initialize Feather Icons after rendering
|
| 162 |
setTimeout(() => {
|
| 163 |
+
const icons = this.shadowRoot.querySelectorAll('[data-feather]');
|
| 164 |
+
icons.forEach(icon => {
|
| 165 |
+
const iconName = icon.getAttribute('data-feather');
|
| 166 |
+
const svg = feather.icons[iconName].toSvg();
|
| 167 |
+
icon.outerHTML = svg;
|
| 168 |
+
});
|
|
|
|
|
|
|
| 169 |
}, 0);
|
| 170 |
}
|
| 171 |
}
|
| 172 |
|
| 173 |
+
customElements.define('flux-footer', FluxFooter);
|
components/header.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
class
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
|
@@ -7,100 +7,150 @@ class CustomHeader extends HTMLElement {
|
|
| 7 |
display: block;
|
| 8 |
}
|
| 9 |
|
| 10 |
-
header {
|
| 11 |
-
background-color: #
|
| 12 |
-
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
.container {
|
| 16 |
-
max-width:
|
| 17 |
margin: 0 auto;
|
| 18 |
padding: 0 1rem;
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
nav {
|
| 22 |
display: flex;
|
| 23 |
justify-content: space-between;
|
| 24 |
align-items: center;
|
| 25 |
-
padding: 1rem 0;
|
| 26 |
}
|
| 27 |
|
| 28 |
.logo {
|
| 29 |
display: flex;
|
| 30 |
align-items: center;
|
| 31 |
-
font-weight:
|
| 32 |
font-size: 1.5rem;
|
| 33 |
-
color: #
|
|
|
|
| 34 |
}
|
| 35 |
|
| 36 |
-
.logo
|
|
|
|
| 37 |
margin-right: 0.5rem;
|
| 38 |
}
|
| 39 |
|
| 40 |
-
|
| 41 |
display: flex;
|
| 42 |
list-style: none;
|
| 43 |
}
|
| 44 |
|
| 45 |
-
li {
|
| 46 |
margin-left: 2rem;
|
| 47 |
}
|
| 48 |
|
| 49 |
-
a {
|
| 50 |
-
color: #
|
| 51 |
text-decoration: none;
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
|
| 55 |
-
|
| 56 |
-
color: #
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
@media (max-width: 768px) {
|
| 60 |
-
nav {
|
| 61 |
-
|
| 62 |
}
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
li {
|
| 69 |
-
margin: 0 1rem;
|
| 70 |
}
|
| 71 |
}
|
| 72 |
</style>
|
| 73 |
|
| 74 |
-
<header>
|
| 75 |
<div class="container">
|
| 76 |
-
<
|
| 77 |
-
<
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
</div>
|
| 89 |
</header>
|
| 90 |
`;
|
| 91 |
|
| 92 |
-
// Initialize
|
| 93 |
setTimeout(() => {
|
| 94 |
-
const
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
};
|
| 101 |
-
this.shadowRoot.appendChild(featherScript);
|
| 102 |
}, 0);
|
| 103 |
}
|
| 104 |
}
|
| 105 |
|
| 106 |
-
customElements.define('
|
|
|
|
| 1 |
+
class FluxHeader extends HTMLElement {
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
|
|
|
| 7 |
display: block;
|
| 8 |
}
|
| 9 |
|
| 10 |
+
.header {
|
| 11 |
+
background-color: #1F2937;
|
| 12 |
+
border-bottom: 1px solid #374151;
|
| 13 |
+
padding: 1rem 0;
|
| 14 |
}
|
| 15 |
|
| 16 |
.container {
|
| 17 |
+
max-width: 1280px;
|
| 18 |
margin: 0 auto;
|
| 19 |
padding: 0 1rem;
|
|
|
|
|
|
|
|
|
|
| 20 |
display: flex;
|
| 21 |
justify-content: space-between;
|
| 22 |
align-items: center;
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
.logo {
|
| 26 |
display: flex;
|
| 27 |
align-items: center;
|
| 28 |
+
font-weight: 700;
|
| 29 |
font-size: 1.5rem;
|
| 30 |
+
color: #F9FAFB;
|
| 31 |
+
text-decoration: none;
|
| 32 |
}
|
| 33 |
|
| 34 |
+
.logo-icon {
|
| 35 |
+
color: #10B981;
|
| 36 |
margin-right: 0.5rem;
|
| 37 |
}
|
| 38 |
|
| 39 |
+
.nav-links {
|
| 40 |
display: flex;
|
| 41 |
list-style: none;
|
| 42 |
}
|
| 43 |
|
| 44 |
+
.nav-links li {
|
| 45 |
margin-left: 2rem;
|
| 46 |
}
|
| 47 |
|
| 48 |
+
.nav-links a {
|
| 49 |
+
color: #9CA3AF;
|
| 50 |
text-decoration: none;
|
| 51 |
+
font-weight: 500;
|
| 52 |
+
transition: color 0.2s;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.nav-links a:hover, .nav-links a.active {
|
| 56 |
+
color: #10B981;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.auth-buttons {
|
| 60 |
+
display: flex;
|
| 61 |
+
align-items: center;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.btn {
|
| 65 |
+
padding: 0.5rem 1rem;
|
| 66 |
+
border-radius: 0.5rem;
|
| 67 |
+
font-weight: 500;
|
| 68 |
+
cursor: pointer;
|
| 69 |
+
transition: all 0.2s;
|
| 70 |
+
border: none;
|
| 71 |
+
font-size: 0.875rem;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.btn-login {
|
| 75 |
+
background-color: transparent;
|
| 76 |
+
color: #9CA3AF;
|
| 77 |
+
margin-right: 0.5rem;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.btn-login:hover {
|
| 81 |
+
color: #F9FAFB;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.btn-signup {
|
| 85 |
+
background-color: #10B981;
|
| 86 |
+
color: white;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.btn-signup:hover {
|
| 90 |
+
background-color: #059669;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.theme-toggle {
|
| 94 |
+
background: none;
|
| 95 |
+
border: none;
|
| 96 |
+
color: #9CA3AF;
|
| 97 |
+
cursor: pointer;
|
| 98 |
+
margin-left: 1rem;
|
| 99 |
+
padding: 0.5rem;
|
| 100 |
+
border-radius: 0.5rem;
|
| 101 |
}
|
| 102 |
|
| 103 |
+
.theme-toggle:hover {
|
| 104 |
+
background-color: #374151;
|
| 105 |
+
color: #F9FAFB;
|
| 106 |
}
|
| 107 |
|
| 108 |
@media (max-width: 768px) {
|
| 109 |
+
.nav-links {
|
| 110 |
+
display: none;
|
| 111 |
}
|
| 112 |
|
| 113 |
+
.logo span {
|
| 114 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
}
|
| 116 |
}
|
| 117 |
</style>
|
| 118 |
|
| 119 |
+
<header class="header">
|
| 120 |
<div class="container">
|
| 121 |
+
<a href="#" class="logo">
|
| 122 |
+
<i data-feather="aperture" class="logo-icon"></i>
|
| 123 |
+
<span>Flux Fusion Studio</span>
|
| 124 |
+
</a>
|
| 125 |
+
|
| 126 |
+
<ul class="nav-links">
|
| 127 |
+
<li><a href="#" class="active">Create</a></li>
|
| 128 |
+
<li><a href="#">Gallery</a></li>
|
| 129 |
+
<li><a href="#">Models</a></li>
|
| 130 |
+
<li><a href="#">Community</a></li>
|
| 131 |
+
</ul>
|
| 132 |
+
|
| 133 |
+
<div class="auth-buttons">
|
| 134 |
+
<button class="btn btn-login">Log in</button>
|
| 135 |
+
<button class="btn btn-signup">Sign up</button>
|
| 136 |
+
<button class="theme-toggle" id="theme-toggle">
|
| 137 |
+
<i data-feather="moon"></i>
|
| 138 |
+
</button>
|
| 139 |
+
</div>
|
| 140 |
</div>
|
| 141 |
</header>
|
| 142 |
`;
|
| 143 |
|
| 144 |
+
// Initialize Feather Icons after rendering
|
| 145 |
setTimeout(() => {
|
| 146 |
+
const icons = this.shadowRoot.querySelectorAll('[data-feather]');
|
| 147 |
+
icons.forEach(icon => {
|
| 148 |
+
const iconName = icon.getAttribute('data-feather');
|
| 149 |
+
const svg = feather.icons[iconName].toSvg();
|
| 150 |
+
icon.outerHTML = svg;
|
| 151 |
+
});
|
|
|
|
|
|
|
| 152 |
}, 0);
|
| 153 |
}
|
| 154 |
}
|
| 155 |
|
| 156 |
+
customElements.define('flux-header', FluxHeader);
|
index.html
CHANGED
|
@@ -3,55 +3,253 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
</head>
|
| 13 |
<body class="bg-gray-900 text-white">
|
| 14 |
-
<
|
| 15 |
|
| 16 |
<main class="container mx-auto px-4 py-8">
|
| 17 |
-
<
|
| 18 |
-
|
| 19 |
-
<
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
<
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
</div>
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
</div>
|
| 34 |
-
|
| 35 |
-
<button id="unlockBtn" class="w-full bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded transition duration-300">
|
| 36 |
-
Unlock Models
|
| 37 |
-
</button>
|
| 38 |
</div>
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
</div>
|
| 46 |
-
</
|
| 47 |
</main>
|
| 48 |
-
|
| 49 |
-
<
|
| 50 |
|
| 51 |
<script src="components/header.js"></script>
|
| 52 |
<script src="components/footer.js"></script>
|
| 53 |
<script src="script.js"></script>
|
| 54 |
<script>feather.replace();</script>
|
| 55 |
-
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 56 |
</body>
|
| 57 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Flux Fusion Studio</title>
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
<script src="https://unpkg.com/feather-icons"></script>
|
| 12 |
+
<script>
|
| 13 |
+
tailwind.config = {
|
| 14 |
+
darkMode: 'class',
|
| 15 |
+
theme: {
|
| 16 |
+
extend: {
|
| 17 |
+
colors: {
|
| 18 |
+
primary: '#10B981',
|
| 19 |
+
secondary: '#F97316'
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
</script>
|
| 25 |
</head>
|
| 26 |
<body class="bg-gray-900 text-white">
|
| 27 |
+
<flux-header></flux-header>
|
| 28 |
|
| 29 |
<main class="container mx-auto px-4 py-8">
|
| 30 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 31 |
+
<!-- Left Panel - Controls -->
|
| 32 |
+
<div class="lg:col-span-1 space-y-6">
|
| 33 |
+
<!-- Prompt Input -->
|
| 34 |
+
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
| 35 |
+
<h2 class="text-xl font-bold mb-4 flex items-center">
|
| 36 |
+
<i data-feather="edit-3" class="mr-2 text-primary"></i>
|
| 37 |
+
Prompt
|
| 38 |
+
</h2>
|
| 39 |
+
<textarea
|
| 40 |
+
id="prompt-input"
|
| 41 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg p-4 text-white focus:outline-none focus:ring-2 focus:ring-primary resize-none"
|
| 42 |
+
rows="4"
|
| 43 |
+
placeholder="Describe your vision..."></textarea>
|
| 44 |
</div>
|
| 45 |
+
|
| 46 |
+
<!-- LORA Selection -->
|
| 47 |
+
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
| 48 |
+
<h2 class="text-xl font-bold mb-4 flex items-center">
|
| 49 |
+
<i data-feather="layers" class="mr-2 text-primary"></i>
|
| 50 |
+
LORA Models
|
| 51 |
+
</h2>
|
| 52 |
+
<div class="space-y-4">
|
| 53 |
+
<!-- LORA Slot 1 -->
|
| 54 |
+
<div class="flex items-center justify-between p-3 bg-gray-700 rounded-lg">
|
| 55 |
+
<div class="flex items-center">
|
| 56 |
+
<div class="w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center mr-3">
|
| 57 |
+
<span class="text-xs font-bold">1</span>
|
| 58 |
+
</div>
|
| 59 |
+
<div>
|
| 60 |
+
<p class="font-medium">Select LORA</p>
|
| 61 |
+
<p class="text-xs text-gray-400">None selected</p>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
<button class="bg-gray-600 hover:bg-gray-500 p-2 rounded-lg transition">
|
| 65 |
+
<i data-feather="settings" class="w-4 h-4"></i>
|
| 66 |
+
</button>
|
| 67 |
+
</div>
|
| 68 |
+
|
| 69 |
+
<!-- LORA Slot 2 -->
|
| 70 |
+
<div class="flex items-center justify-between p-3 bg-gray-700 rounded-lg">
|
| 71 |
+
<div class="flex items-center">
|
| 72 |
+
<div class="w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center mr-3">
|
| 73 |
+
<span class="text-xs font-bold">2</span>
|
| 74 |
+
</div>
|
| 75 |
+
<div>
|
| 76 |
+
<p class="font-medium">Select LORA</p>
|
| 77 |
+
<p class="text-xs text-gray-400">None selected</p>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
<button class="bg-gray-600 hover:bg-gray-500 p-2 rounded-lg transition">
|
| 81 |
+
<i data-feather="settings" class="w-4 h-4"></i>
|
| 82 |
+
</button>
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<!-- LORA Slot 3 -->
|
| 86 |
+
<div class="flex items-center justify-between p-3 bg-gray-700 rounded-lg">
|
| 87 |
+
<div class="flex items-center">
|
| 88 |
+
<div class="w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center mr-3">
|
| 89 |
+
<span class="text-xs font-bold">3</span>
|
| 90 |
+
</div>
|
| 91 |
+
<div>
|
| 92 |
+
<p class="font-medium">Select LORA</p>
|
| 93 |
+
<p class="text-xs text-gray-400">None selected</p>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
<button class="bg-gray-600 hover:bg-gray-500 p-2 rounded-lg transition">
|
| 97 |
+
<i data-feather="settings" class="w-4 h-4"></i>
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<!-- LORA Slot 4 -->
|
| 102 |
+
<div class="flex items-center justify-between p-3 bg-gray-700 rounded-lg">
|
| 103 |
+
<div class="flex items-center">
|
| 104 |
+
<div class="w-10 h-10 rounded-full bg-gray-600 flex items-center justify-center mr-3">
|
| 105 |
+
<span class="text-xs font-bold">4</span>
|
| 106 |
+
</div>
|
| 107 |
+
<div>
|
| 108 |
+
<p class="font-medium">Select LORA</p>
|
| 109 |
+
<p class="text-xs text-gray-400">None selected</p>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
<button class="bg-gray-600 hover:bg-gray-500 p-2 rounded-lg transition">
|
| 113 |
+
<i data-feather="settings" class="w-4 h-4"></i>
|
| 114 |
+
</button>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<button class="mt-4 w-full py-3 bg-primary hover:bg-green-600 rounded-lg font-semibold flex items-center justify-center transition">
|
| 119 |
+
<i data-feather="plus-circle" class="mr-2"></i>
|
| 120 |
+
Add Custom LORA
|
| 121 |
+
</button>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<!-- Generation Settings -->
|
| 125 |
+
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
| 126 |
+
<h2 class="text-xl font-bold mb-4 flex items-center">
|
| 127 |
+
<i data-feather="sliders" class="mr-2 text-primary"></i>
|
| 128 |
+
Settings
|
| 129 |
+
</h2>
|
| 130 |
+
<div class="space-y-4">
|
| 131 |
+
<div>
|
| 132 |
+
<label class="block text-sm font-medium mb-2">CFG Scale</label>
|
| 133 |
+
<input type="range" min="1" max="20" value="7" class="w-full accent-primary">
|
| 134 |
+
<div class="flex justify-between text-xs text-gray-400 mt-1">
|
| 135 |
+
<span>1</span>
|
| 136 |
+
<span>20</span>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<div>
|
| 141 |
+
<label class="block text-sm font-medium mb-2">Steps</label>
|
| 142 |
+
<input type="range" min="1" max="50" value="28" class="w-full accent-secondary">
|
| 143 |
+
<div class="flex justify-between text-xs text-gray-400 mt-1">
|
| 144 |
+
<span>1</span>
|
| 145 |
+
<span>50</span>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<div class="grid grid-cols-2 gap-4">
|
| 150 |
+
<div>
|
| 151 |
+
<label class="block text-sm font-medium mb-2">Width</label>
|
| 152 |
+
<select class="w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white">
|
| 153 |
+
<option>512</option>
|
| 154 |
+
<option selected>768</option>
|
| 155 |
+
<option>1024</option>
|
| 156 |
+
</select>
|
| 157 |
+
</div>
|
| 158 |
+
<div>
|
| 159 |
+
<label class="block text-sm font-medium mb-2">Height</label>
|
| 160 |
+
<select class="w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white">
|
| 161 |
+
<option>512</option>
|
| 162 |
+
<option>768</option>
|
| 163 |
+
<option selected>1024</option>
|
| 164 |
+
</select>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="flex items-center justify-between pt-2">
|
| 169 |
+
<div class="flex items-center">
|
| 170 |
+
<input type="checkbox" id="random-seed" class="accent-primary" checked>
|
| 171 |
+
<label for="random-seed" class="ml-2 text-sm">Random Seed</label>
|
| 172 |
+
</div>
|
| 173 |
+
<button class="text-sm bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded-lg transition">
|
| 174 |
+
<i data-feather="refresh-cw" class="w-4 h-4 inline mr-1"></i>
|
| 175 |
+
Randomize
|
| 176 |
+
</button>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
</div>
|
| 181 |
+
|
| 182 |
+
<!-- Right Panel - Preview & Gallery -->
|
| 183 |
+
<div class="lg:col-span-2">
|
| 184 |
+
<!-- Preview Area -->
|
| 185 |
+
<div class="bg-gray-800 rounded-xl p-6 shadow-lg mb-8">
|
| 186 |
+
<div class="flex justify-between items-center mb-4">
|
| 187 |
+
<h2 class="text-xl font-bold flex items-center">
|
| 188 |
+
<i data-feather="image" class="mr-2 text-primary"></i>
|
| 189 |
+
Preview
|
| 190 |
+
</h2>
|
| 191 |
+
<div class="flex space-x-2">
|
| 192 |
+
<button class="bg-gray-700 hover:bg-gray-600 p-2 rounded-lg transition">
|
| 193 |
+
<i data-feather="download" class="w-4 h-4"></i>
|
| 194 |
+
</button>
|
| 195 |
+
<button class="bg-gray-700 hover:bg-gray-600 p-2 rounded-lg transition">
|
| 196 |
+
<i data-feather="share-2" class="w-4 h-4"></i>
|
| 197 |
+
</button>
|
| 198 |
+
</div>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<div class="aspect-video bg-gray-900 rounded-lg flex items-center justify-center border-2 border-dashed border-gray-700">
|
| 202 |
+
<div class="text-center">
|
| 203 |
+
<i data-feather="camera" class="w-12 h-12 mx-auto text-gray-600 mb-2"></i>
|
| 204 |
+
<p class="text-gray-500">Generated image will appear here</p>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<div class="mt-6 flex space-x-4">
|
| 209 |
+
<button class="flex-1 py-3 bg-primary hover:bg-green-600 rounded-lg font-semibold flex items-center justify-center transition">
|
| 210 |
+
<i data-feather="play" class="mr-2"></i>
|
| 211 |
+
Generate Image
|
| 212 |
+
</button>
|
| 213 |
+
<button class="flex-1 py-3 bg-secondary hover:bg-orange-600 rounded-lg font-semibold flex items-center justify-center transition">
|
| 214 |
+
<i data-feather="film" class="mr-2"></i>
|
| 215 |
+
Generate Video
|
| 216 |
+
</button>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<!-- Gallery -->
|
| 221 |
+
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
|
| 222 |
+
<div class="flex justify-between items-center mb-4">
|
| 223 |
+
<h2 class="text-xl font-bold flex items-center">
|
| 224 |
+
<i data-feather="grid" class="mr-2 text-primary"></i>
|
| 225 |
+
LORA Gallery
|
| 226 |
+
</h2>
|
| 227 |
+
<button class="text-sm bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded-lg transition">
|
| 228 |
+
View All
|
| 229 |
+
</button>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4">
|
| 233 |
+
<!-- Gallery Items -->
|
| 234 |
+
<div class="aspect-square bg-gradient-to-br from-purple-900 to-blue-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 235 |
+
<div class="aspect-square bg-gradient-to-br from-pink-900 to-red-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 236 |
+
<div class="aspect-square bg-gradient-to-br from-yellow-900 to-orange-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 237 |
+
<div class="aspect-square bg-gradient-to-br from-green-900 to-teal-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 238 |
+
<div class="aspect-square bg-gradient-to-br from-indigo-900 to-purple-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 239 |
+
<div class="aspect-square bg-gradient-to-br from-red-900 to-pink-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 240 |
+
<div class="aspect-square bg-gradient-to-br from-blue-900 to-cyan-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 241 |
+
<div class="aspect-square bg-gradient-to-br from-emerald-900 to-green-800 rounded-lg cursor-pointer hover:opacity-90 transition"></div>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
</div>
|
| 245 |
+
</div>
|
| 246 |
</main>
|
| 247 |
+
|
| 248 |
+
<flux-footer></flux-footer>
|
| 249 |
|
| 250 |
<script src="components/header.js"></script>
|
| 251 |
<script src="components/footer.js"></script>
|
| 252 |
<script src="script.js"></script>
|
| 253 |
<script>feather.replace();</script>
|
|
|
|
| 254 |
</body>
|
| 255 |
</html>
|
script.js
CHANGED
|
@@ -1,99 +1,63 @@
|
|
|
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
-
|
| 3 |
-
const ageVerification = document.getElementById('ageVerification');
|
| 4 |
-
const unlockBtn = document.getElementById('unlockBtn');
|
| 5 |
-
const modelsSection = document.getElementById('modelsSection');
|
| 6 |
-
const modelsContainer = document.getElementById('modelsContainer');
|
| 7 |
|
| 8 |
-
//
|
| 9 |
-
const
|
| 10 |
-
if (
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
if (!isVerified) {
|
| 24 |
-
alert('Please verify your age to proceed');
|
| 25 |
-
return;
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
// Store API key in localStorage
|
| 29 |
-
localStorage.setItem('civitaiApiKey', apiKey);
|
| 30 |
-
|
| 31 |
-
// Show loading state
|
| 32 |
-
unlockBtn.innerHTML = '<svg class="animate-spin -ml-1 mr-2 h-4 w-4 text-white inline" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Loading...';
|
| 33 |
-
unlockBtn.disabled = true;
|
| 34 |
-
|
| 35 |
-
try {
|
| 36 |
-
// Fetch models from CivitAI API
|
| 37 |
-
const response = await fetch('https://civitai.com/api/v1/models?limit=6', {
|
| 38 |
-
headers: {
|
| 39 |
-
'Authorization': `Bearer ${apiKey}`
|
| 40 |
-
}
|
| 41 |
-
});
|
| 42 |
-
|
| 43 |
-
if (!response.ok) {
|
| 44 |
-
throw new Error('Invalid API key or network error');
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
const data = await response.json();
|
| 48 |
-
displayModels(data.items);
|
| 49 |
-
|
| 50 |
-
// Show models section
|
| 51 |
-
modelsSection.classList.remove('hidden');
|
| 52 |
-
|
| 53 |
-
// Scroll to models section
|
| 54 |
-
modelsSection.scrollIntoView({ behavior: 'smooth' });
|
| 55 |
-
} catch (error) {
|
| 56 |
-
alert('Error: ' + error.message);
|
| 57 |
-
} finally {
|
| 58 |
-
// Reset button
|
| 59 |
-
unlockBtn.textContent = 'Unlock Models';
|
| 60 |
-
unlockBtn.disabled = false;
|
| 61 |
-
}
|
| 62 |
-
});
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
|
| 71 |
-
//
|
| 72 |
-
|
| 73 |
-
model.images[0].url :
|
| 74 |
-
`http://static.photos/technology/320x240/${model.id}`;
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
<
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
<span>${model.favorites}</span>
|
| 86 |
</div>
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
});
|
| 95 |
-
|
| 96 |
-
// Reinitialize feather icons
|
| 97 |
-
feather.replace();
|
| 98 |
-
}
|
| 99 |
});
|
|
|
|
| 1 |
+
// Initialize Feather Icons
|
| 2 |
document.addEventListener('DOMContentLoaded', function() {
|
| 3 |
+
feather.replace();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
// Theme toggle functionality
|
| 6 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 7 |
+
if (themeToggle) {
|
| 8 |
+
themeToggle.addEventListener('click', function() {
|
| 9 |
+
document.documentElement.classList.toggle('dark');
|
| 10 |
+
localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light');
|
| 11 |
+
});
|
| 12 |
}
|
| 13 |
|
| 14 |
+
// Check for saved theme preference
|
| 15 |
+
if (localStorage.getItem('theme') === 'dark' ||
|
| 16 |
+
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
| 17 |
+
document.documentElement.classList.add('dark');
|
| 18 |
+
} else {
|
| 19 |
+
document.documentElement.classList.remove('dark');
|
| 20 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
// Gallery interaction
|
| 23 |
+
const galleryItems = document.querySelectorAll('.gallery-item');
|
| 24 |
+
galleryItems.forEach(item => {
|
| 25 |
+
item.addEventListener('click', function() {
|
| 26 |
+
// Remove active class from all items
|
| 27 |
+
galleryItems.forEach(i => i.classList.remove('ring-2', 'ring-primary'));
|
| 28 |
|
| 29 |
+
// Add active class to clicked item
|
| 30 |
+
this.classList.add('ring-2', 'ring-primary');
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
// Update preview area with selected item
|
| 33 |
+
const previewArea = document.querySelector('.preview-placeholder');
|
| 34 |
+
if (previewArea) {
|
| 35 |
+
previewArea.innerHTML = `
|
| 36 |
+
<div class="w-full h-full bg-gradient-to-br from-purple-900 to-blue-800 rounded-lg flex items-center justify-center">
|
| 37 |
+
<div class="text-center">
|
| 38 |
+
<i data-feather="check-circle" class="w-12 h-12 mx-auto text-white mb-2"></i>
|
| 39 |
+
<p class="text-white">Selected: ${this.querySelector('p').textContent}</p>
|
| 40 |
+
</div>
|
|
|
|
| 41 |
</div>
|
| 42 |
+
`;
|
| 43 |
+
feather.replace();
|
| 44 |
+
}
|
| 45 |
+
});
|
| 46 |
+
});
|
| 47 |
+
|
| 48 |
+
// Generate button animation
|
| 49 |
+
const generateButtons = document.querySelectorAll('button.flex.items-center.justify-center');
|
| 50 |
+
generateButtons.forEach(button => {
|
| 51 |
+
button.addEventListener('click', function() {
|
| 52 |
+
const originalText = this.innerHTML;
|
| 53 |
+
this.innerHTML = '<i data-feather="loader" class="mr-2 animate-spin"></i> Generating...';
|
| 54 |
+
feather.replace();
|
| 55 |
|
| 56 |
+
// Simulate processing time
|
| 57 |
+
setTimeout(() => {
|
| 58 |
+
this.innerHTML = originalText;
|
| 59 |
+
feather.replace();
|
| 60 |
+
}, 2000);
|
| 61 |
});
|
| 62 |
+
});
|
|
|
|
|
|
|
|
|
|
| 63 |
});
|
style.css
CHANGED
|
@@ -1,49 +1,154 @@
|
|
| 1 |
-
@
|
| 2 |
-
@tailwind components;
|
| 3 |
-
@tailwind utilities;
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
}
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
to {
|
| 25 |
-
transform: rotate(360deg);
|
| 26 |
-
}
|
| 27 |
}
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
width: 8px;
|
| 36 |
}
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
|
|
|
| 40 |
}
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
border-radius: 4px;
|
| 45 |
}
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
:root {
|
| 4 |
+
--primary: #10B981;
|
| 5 |
+
--secondary: #F97316;
|
| 6 |
}
|
| 7 |
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
font-family: 'Inter', sans-serif;
|
| 13 |
}
|
| 14 |
|
| 15 |
+
body {
|
| 16 |
+
background-color: #111827;
|
| 17 |
+
color: #F9FAFB;
|
| 18 |
+
min-height: 100vh;
|
| 19 |
+
display: flex;
|
| 20 |
+
flex-direction: column;
|
| 21 |
}
|
| 22 |
|
| 23 |
+
/* Scrollbar styling */
|
| 24 |
+
::-webkit-scrollbar {
|
| 25 |
+
width: 8px;
|
| 26 |
}
|
| 27 |
|
| 28 |
+
::-webkit-scrollbar-track {
|
| 29 |
+
background: #1F2937;
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
::-webkit-scrollbar-thumb {
|
| 33 |
+
background: #4B5563;
|
| 34 |
+
border-radius: 4px;
|
| 35 |
}
|
| 36 |
|
| 37 |
+
::-webkit-scrollbar-thumb:hover {
|
| 38 |
+
background: #6B7280;
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
+
/* Custom utility classes */
|
| 42 |
+
.bg-primary {
|
| 43 |
+
background-color: var(--primary);
|
| 44 |
}
|
| 45 |
|
| 46 |
+
.bg-secondary {
|
| 47 |
+
background-color: var(--secondary);
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
+
.text-primary {
|
| 51 |
+
color: var(--primary);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.text-secondary {
|
| 55 |
+
color: var(--secondary);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.border-primary {
|
| 59 |
+
border-color: var(--primary);
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.ring-primary {
|
| 63 |
+
--tw-ring-color: var(--primary);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
/* Button transitions */
|
| 67 |
+
button {
|
| 68 |
+
transition: all 0.2s ease-in-out;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/* Card shadows */
|
| 72 |
+
.shadow-lg {
|
| 73 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
/* Range input styling */
|
| 77 |
+
input[type="range"] {
|
| 78 |
+
-webkit-appearance: none;
|
| 79 |
+
height: 6px;
|
| 80 |
+
border-radius: 3px;
|
| 81 |
+
background: #374151;
|
| 82 |
+
outline: none;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 86 |
+
-webkit-appearance: none;
|
| 87 |
+
width: 18px;
|
| 88 |
+
height: 18px;
|
| 89 |
+
border-radius: 50%;
|
| 90 |
+
background: var(--primary);
|
| 91 |
+
cursor: pointer;
|
| 92 |
+
border: 2px solid #1F2937;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
input[type="range"]::-moz-range-thumb {
|
| 96 |
+
width: 18px;
|
| 97 |
+
height: 18px;
|
| 98 |
+
border-radius: 50%;
|
| 99 |
+
background: var(--primary);
|
| 100 |
+
cursor: pointer;
|
| 101 |
+
border: 2px solid #1F2937;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* Select dropdown styling */
|
| 105 |
+
select {
|
| 106 |
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
|
| 107 |
+
background-position: right 0.5rem center;
|
| 108 |
+
background-repeat: no-repeat;
|
| 109 |
+
background-size: 1.5em 1.5em;
|
| 110 |
+
padding-right: 2.5rem;
|
| 111 |
+
-webkit-print-color-adjust: exact;
|
| 112 |
+
print-color-adjust: exact;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/* Checkbox styling */
|
| 116 |
+
input[type="checkbox"] {
|
| 117 |
+
-webkit-appearance: none;
|
| 118 |
+
appearance: none;
|
| 119 |
+
width: 18px;
|
| 120 |
+
height: 18px;
|
| 121 |
+
border: 2px solid #4B5563;
|
| 122 |
+
border-radius: 4px;
|
| 123 |
+
background-color: #1F2937;
|
| 124 |
+
position: relative;
|
| 125 |
+
cursor: pointer;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
input[type="checkbox"]:checked {
|
| 129 |
+
background-color: var(--primary);
|
| 130 |
+
border-color: var(--primary);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
input[type="checkbox"]:checked::after {
|
| 134 |
+
content: '';
|
| 135 |
+
position: absolute;
|
| 136 |
+
left: 5px;
|
| 137 |
+
top: 1px;
|
| 138 |
+
width: 4px;
|
| 139 |
+
height: 8px;
|
| 140 |
+
border: solid white;
|
| 141 |
+
border-width: 0 2px 2px 0;
|
| 142 |
+
transform: rotate(45deg);
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/* Responsive adjustments */
|
| 146 |
+
@media (max-width: 1024px) {
|
| 147 |
+
.grid-cols-2 {
|
| 148 |
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.lg\:col-span-1, .lg\:col-span-2 {
|
| 152 |
+
grid-column: span 1 / span 1;
|
| 153 |
+
}
|
| 154 |
}
|