Skip to content

Commit d4ced2a

Browse files
authored
Create index.html
1 parent 1e9bae2 commit d4ced2a

1 file changed

Lines changed: 267 additions & 0 deletions

File tree

‎index.html‎

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
6+
<title>devtemDesign · Declarative UI Engine</title>
7+
<meta name="description" content="One configuration schema. Infinite animated synthesis. Lightweight zero-config page engine with glass-morphism and ambient motion.">
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/devtemdesign@0.0.1/style.css">
10+
<script src="https://cdn.jsdelivr.net/npm/devtemdesign@0.0.1/script.js"></script>
11+
<style>
12+
/* Template switcher additional styles */
13+
.template-switcher {
14+
position: fixed;
15+
bottom: 24px;
16+
right: 24px;
17+
z-index: 9997;
18+
display: flex;
19+
gap: 12px;
20+
background: rgba(0,0,0,0.6);
21+
backdrop-filter: blur(16px);
22+
padding: 10px 20px;
23+
border-radius: 60px;
24+
border: 1px solid rgba(255,255,255,0.15);
25+
font-family: monospace;
26+
font-size: 0.75rem;
27+
}
28+
.template-btn {
29+
background: transparent;
30+
border: none;
31+
color: var(--muted, #aaa);
32+
padding: 6px 14px;
33+
border-radius: 40px;
34+
cursor: pointer;
35+
transition: all 0.2s ease;
36+
font-family: monospace;
37+
font-size: 0.7rem;
38+
letter-spacing: 0.05em;
39+
}
40+
.template-btn:hover {
41+
background: rgba(255,255,255,0.1);
42+
color: white;
43+
}
44+
.template-btn.active {
45+
background: var(--accent, #0ff);
46+
color: #000;
47+
font-weight: bold;
48+
}
49+
@media (max-width: 680px) {
50+
.template-switcher { bottom: 16px; right: 16px; padding: 6px 12px; gap: 6px; }
51+
.template-btn { padding: 4px 10px; font-size: 0.6rem; }
52+
}
53+
.toast-notification {
54+
position: fixed;
55+
bottom: 100px;
56+
right: 24px;
57+
background: var(--accent);
58+
color: #000;
59+
padding: 10px 20px;
60+
border-radius: 40px;
61+
font-size: 0.8rem;
62+
font-weight: 600;
63+
z-index: 9999;
64+
opacity: 0;
65+
transform: translateY(20px);
66+
transition: all 0.3s ease;
67+
pointer-events: none;
68+
font-family: monospace;
69+
}
70+
.toast-notification.show {
71+
opacity: 1;
72+
transform: translateY(0);
73+
}
74+
</style>
75+
</head>
76+
<body>
77+
78+
<div id="app-root"></div>
79+
<div class="template-switcher">
80+
<span style="color: #888; margin-right: 4px;"><i class="fas fa-palette"></i></span>
81+
<button class="template-btn" data-template="figsh">FIGSH</button>
82+
<button class="template-btn" data-template="cyber">CYBER</button>
83+
<button class="template-btn" data-template="aurora">AURORA</button>
84+
<button class="template-btn" data-template="monochrome">MONO</button>
85+
</div>
86+
<div id="toast" class="toast-notification">✓ Copied to clipboard</div>
87+
88+
<script>
89+
// Current config storage
90+
let currentConfig = {
91+
template: "cyber",
92+
logo: "https://fscss.devtem.org/assets/images/fscss.png",
93+
94+
logoName: "DEVTEM",
95+
navLinks: ["Docs", "Sandbox", "Schema API", "npm Package"],
96+
ctaText: "CDN →",
97+
98+
heroTag: "Core Framework Alpha // devtemDesign@0.0.1",
99+
heroTitleLine1: "Declarative UI,",
100+
heroTitleLine2: "Zero-Config Motion",
101+
heroSubtitle: "One configuration schema. Infinite animated synthesis. Stop building standard UI boilerplate- let the engine paint the viewport.",
102+
103+
primaryBtnText: "Read Docs",
104+
secondaryBtnText: "Copy CDN",
105+
106+
brandsSubtitle: "Engine Architecture Utilities & Dependencies",
107+
footerCopy: "Figsh Labs • Open Source",
108+
brands: ["NPM", "FSCSS", "DEVTEMPLE", "ESBUILD", "CSS3", "HTML5", "WEBGL"],
109+
110+
featuresSectionLabel: "<i class='fas fa-code-branch'></i> CORE ENGINE MECHANICS",
111+
featuresSectionTitle: "Pass raw structural data. The canvas resolves itself dynamically.",
112+
113+
features: [
114+
{
115+
title: "Deterministic Engine Schema",
116+
desc: "Strict object parsing map transforms simple titles, tags, and matrices into hardware-accelerated layouts without HTML creation workflows.",
117+
icon: "<i class='fas fa-cube'></i>"
118+
},
119+
{
120+
title: "Ambient Micro-Interactions",
121+
desc: "Integrated magnet-ring cursor captures, fluid DOM reactive parallax, and canvas physics triggers ship bundled out-of-the-box.",
122+
icon: "<i class='fas fa-magic'></i>"
123+
},
124+
{
125+
title: "Adaptive Theme Synthesis",
126+
desc: "Switch between tokens dynamically. The runtime morphs variables across glassmorphic layers, backdrops, and active neon elements.",
127+
icon: "<i class='fas fa-palette'></i>"
128+
}
129+
],
130+
131+
panels: [
132+
{
133+
tag: "FRAMEWORK API",
134+
title: "devtemDesign(container, config)",
135+
desc: "The entire UI ecosystem initialized directly through a singular operational handler. Complete layout decoupling."
136+
},
137+
{
138+
tag: "PERFORMANCE LAYER",
139+
title: "Passive Inertia Transforms",
140+
desc: "No bulky execution bundles. Native multi-threaded Intersection Observers decouple scrolling routines from render cycles."
141+
}
142+
]
143+
};
144+
145+
// Function to re-render the page with new template
146+
function renderWithTemplate(templateName) {
147+
currentConfig.template = templateName;
148+
149+
// Re-call the engine with updated config
150+
if (typeof devtemDesign === 'function') {
151+
devtemDesign("app-root", currentConfig);
152+
153+
// Re-attach event listeners after re-render
154+
setTimeout(() => {
155+
attachButtonHandlers();
156+
highlightActiveTemplate(templateName);
157+
}, 100);
158+
} else {
159+
console.warn("devtemDesign engine not loaded yet");
160+
}
161+
}
162+
163+
// Attach copy and navigation handlers
164+
function attachButtonHandlers() {
165+
// Copy CDN functionality (both CSS and JS links)
166+
const copyCDN = (e) => {
167+
e.preventDefault();
168+
const cdnLinks = `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/devtemdesign@0.0.1/style.css">\n<script src="https://cdn.jsdelivr.net/npm/devtemdesign@0.0.1/script.js"><\/script>`;
169+
navigator.clipboard.writeText(cdnLinks);
170+
171+
const toast = document.getElementById('toast');
172+
if (toast) {
173+
toast.classList.add('show');
174+
setTimeout(() => toast.classList.remove('show'), 2000);
175+
}
176+
177+
// Temporary button text feedback
178+
if (e.target.classList && e.target.classList.contains('btn-ghost')) {
179+
const original = e.target.innerHTML;
180+
e.target.innerHTML = "✓ Copied!";
181+
setTimeout(() => { e.target.innerHTML = original; }, 1500);
182+
}
183+
};
184+
185+
// Primary button -> navigate to /docs
186+
const docsHandler = (e) => {
187+
e.preventDefault();
188+
window.location.href = '/docs';
189+
};
190+
191+
const primaryBtn = document.querySelector('.btn-primary');
192+
const secondaryBtn = document.querySelector('.btn-ghost');
193+
const navCta = document.querySelector('.nav-cta');
194+
195+
if (primaryBtn) primaryBtn.addEventListener('click', docsHandler);
196+
if (secondaryBtn) secondaryBtn.addEventListener('click', copyCDN);
197+
198+
// Nav CTA button (CDN)
199+
if (navCta) {
200+
navCta.addEventListener('click', (e) => {
201+
e.preventDefault();
202+
const cdnJs = `<script src="https://cdn.jsdelivr.net/npm/devtemdesign@0.0.1/script.js"><\/script>`;
203+
navigator.clipboard.writeText(cdnJs);
204+
const toast = document.getElementById('toast');
205+
if (toast) {
206+
toast.classList.add('show');
207+
setTimeout(() => toast.classList.remove('show'), 2000);
208+
}
209+
const original = navCta.innerHTML;
210+
navCta.innerHTML = "✓ Copied!";
211+
setTimeout(() => { navCta.innerHTML = original; }, 1500);
212+
});
213+
}
214+
215+
// Also handle any nav links pointing to /docs
216+
const docLinks = document.querySelectorAll('.nav-links a');
217+
docLinks.forEach(link => {
218+
if (link.innerText.toLowerCase() === 'docs') {
219+
link.addEventListener('click', (e) => {
220+
e.preventDefault();
221+
window.location.href = '/docs';
222+
});
223+
}
224+
});
225+
}
226+
227+
function highlightActiveTemplate(template) {
228+
const btns = document.querySelectorAll('.template-btn');
229+
btns.forEach(btn => {
230+
if (btn.getAttribute('data-template') === template) {
231+
btn.classList.add('active');
232+
} else {
233+
btn.classList.remove('active');
234+
}
235+
});
236+
}
237+
238+
// Template switcher event listeners
239+
function initTemplateSwitcher() {
240+
const btns = document.querySelectorAll('.template-btn');
241+
btns.forEach(btn => {
242+
btn.addEventListener('click', (e) => {
243+
const newTemplate = btn.getAttribute('data-template');
244+
renderWithTemplate(newTemplate);
245+
});
246+
});
247+
}
248+
249+
// Wait for DOM and engine
250+
document.addEventListener("DOMContentLoaded", () => {
251+
// Small delay to ensure engine is ready
252+
setTimeout(() => {
253+
if (typeof devtemDesign === 'function') {
254+
devtemDesign("app-root", currentConfig);
255+
setTimeout(() => {
256+
attachButtonHandlers();
257+
initTemplateSwitcher();
258+
highlightActiveTemplate('cyber');
259+
}, 150);
260+
} else {
261+
console.error("devtemDesign engine not found. Make sure /js/dev.js is loaded.");
262+
}
263+
}, 50);
264+
});
265+
</script>
266+
</body>
267+
</html>

0 commit comments

Comments
 (0)