Spaces:
Running
<!doctype html>
Browse files<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Espace Codage</title>
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<div class="app">
<!-- COLONNE 1 : Sidebar -->
<aside class="sidebar">
<div class="brand">
<span class="dot"></span>
<span class="brand-title">Espace Codage</span>
</div>
<div class="searchbox">
<button class="icon-btn" title="Nouveau">
✎
</button>
<input type="text" placeholder="Rechercher..." />
</div>
<div class="section-title">PROJETS</div>
<button class="nav-item active">Espace Codage - Projet 1</button>
<button class="nav-item">Espace Codage - Projet 2</button>
<div class="section-title">RACCOURCIS</div>
<button class="nav-item">Bibliothèque</button>
<button class="nav-item">Paramètres</button>
<div class="footer-left">
<span class="badge">Made with DeepSite</span>
<span class="profile">profil</span>
</div>
</aside>
<!-- COLONNE 2 : Zone centrale (vide) + input en bas -->
<main class="center">
<div class="top-tabs">
<button class="pill active">Aperçu</button>
<button class="pill">Projet</button>
<button class="pill">/</button>
</div>
<div class="center-content">
<div class="empty-title">Zone centrale vide</div>
<div class="empty-sub">La barre de recherche / saisie reste en bas, comme demandé.</div>
</div>
<div class="composer">
<button id="btnPlus" class="compose-btn" title="Ajouter">
+
</button>
<label class="compose-btn" title="Joindre un fichier">
📎
<input id="fileInput" type="file" hidden />
</label>
<input id="prompt" class="compose-input" placeholder="Rechercher / écrire..." />
<button id="btnMic" class="compose-btn mic" title="Micro">
🎤
</button>
<button id="btnSend" class="compose-btn send" title="Envoyer">
➤
</button>
</div>
</main>
<!-- COLONNE 3 : Aperçu (iframe) -->
<aside class="preview">
<div class="preview-top">
<div class="preview-title">Aperçu</div>
<div class="preview-actions">
<button id="btnBack" class="mini">‹</button>
<button id="btnForward" class="mini">›</button>
<button id="btnReload" class="mini">↻</button>
<button id="btnOpen" class="mini">⤢</button>
<button id="btnEdit" class="mini big">Modifier</button>
</div>
</div>
<div class="preview-frame-wrap">
<iframe id="previewFrame" title="preview" src="./preview.html"></iframe>
<!-- Overlay erreurs preview -->
<div id="previewError" class="preview-error hidden">
<div class="err-icon">!</div>
<div class="err-title">Échec du chargement de l’aperçu.</div>
<div class="err-sub">Vérifie l’URL / le serveur local, puis rafraîchis.</div>
</div>
</div>
<div class="statusbar">
<span>Statut : <b id="statusTxt">En ligne</b></span>
<span>Mode : <b>Preview</b></span>
</div>
</aside>
</div>
<script src="./app.js"></script>
</body>
</html>
B) styles.css
css
Copier le code
:root{
--bg:#0b1220;
--panel:#121c2c;
--panel2:#101a29;
--stroke:rgba(255,255,255,.08);
--text:rgba(255,255,255,.92);
--muted:rgba(255,255,255,.62);
--muted2:rgba(255,255,255,.45);
--accent:#2f6df6;
--radius:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0;
font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
background:radial-gradient(1200px 800px at 50% 30%, #111b2e 0%, #070d18 60%, #050a13 100%);
color:var(--text);
}
.app{
height:100vh;
display:grid;
grid-template-columns: 320px 1fr 420px;
gap:18px;
padding:16px;
}
.sidebar,.center,.preview{
background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
border:1px solid var(--stroke);
border-radius:var(--radius);
overflow:hidden;
}
.sidebar{
padding:18px 14px;
display:flex;
flex-direction:column;
}
.brand{
display:flex;
align-items:center;
gap:10px;
padding:6px 8px 18px 8px;
}
.dot{
width:10px;height:10px;border-radius:50%;
background:#2ed3b7;
box-shadow:0 0 0 4px rgba(46,211,183,.15);
}
.brand-title{font-weight:700}
.searchbox{
display:flex;
align-items:center;
gap:10px;
padding:10px;
border:1px solid var(--stroke);
border-radius:12px;
background:rgba(0,0,0,.15);
}
.searchbox input{
width:100%;
background:transparent;
border:0;
outline:0;
color:var(--text);
}
.icon-btn{
width:34px;height:34px;
border-radius:10px;
border:1px solid var(--stroke);
background:rgba(255,255,255,.04);
color:var(--text);
cursor:pointer;
}
.section-title{
margin:18px 10px 8px;
font-size:12px;
letter-spacing:.12em;
color:var(--muted2);
}
.nav-item{
text-align:left;
margin:6px 6px;
padding:12px 12px;
border-radius:12px;
border:1px solid var(--stroke);
background:rgba(0,0,0,.12);
color:var(--text);
cursor:pointer;
}
.nav-item.active{
background:rgba(47,109,246,.18);
border-color:rgba(47,109,246,.35);
}
.footer-left{
margin-top:auto;
display:flex;
justify-content:space-between;
align-items:center;
padding:10px 8px 6px;
color:var(--muted2);
font-size:12px;
}
.badge{
border:1px solid var(--stroke);
border-radius:999px;
padding:6px 10px;
background:rgba(0,0,0,.12);
}
/* CENTRE */
.center{
position:relative;
display:flex;
flex-direction:column;
}
.top-tabs{
padding:12px 14px;
display:flex;
gap:10px;
}
.pill{
border:1px solid var(--stroke);
border-radius:999px;
padding:8px 12px;
background:rgba(0,0,0,.12);
color:var(--muted);
cursor:pointer;
}
.pill.active{
background:rgba(255,255,255,.06);
color:var(--text);
}
.center-content{
flex:1;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
text-align:center;
padding:30px;
}
.empty-title{font-size:18px;font-weight:700}
.empty-sub{margin-top:8px;color:var(--muted)}
/* BARRE EN BAS */
.composer{
display:flex;
gap:10px;
align-items:center;
padding:12px;
border-top:1px solid var(--stroke);
background:rgba(0,0,0,.12);
}
.compose-btn{
width:42px;height:42px;
display:grid;
place-items:center;
border-radius:12px;
border:1px solid var(--stroke);
background:rgba(255,255,255,.04);
color:var(--text);
cursor:pointer;
user-select:none;
}
.compose-btn.send{
background:rgba(47,109,246,.22);
border-color:rgba(47,109,246,.35);
}
.compose-btn.mic.listening{
outline:2px solid rgba(46,211,183,.45);
}
.compose-input{
flex:1;
height:42px;
border-radius:12px;
border:1px solid var(--stroke);
background:rgba(0,0,0,.14);
color:var(--text);
padding:0 12px;
outline:none;
}
/* PREVIEW */
.preview{
display:flex;
flex-direction:column;
}
.preview-top{
display:flex;
justify-content:space-between;
align-items:center;
padding:12px 12px;
border-bottom:1px solid var(--stroke);
}
.preview-title{font-weight:700}
.preview-actions{display:flex;gap:8px;align-items:center}
.mini{
height:34px;
padding:0 10px;
border-radius:10px;
border:1px solid var(--stroke);
background:rgba(255,255,255,.04);
color:var(--text);
cursor:pointer;
}
.mini.big{padding:0 12px}
.preview-frame-wrap{
position:relative;
flex:1;
background:rgba(0,0,0,.14);
}
iframe{
width:100%;
height:100%;
border:0;
background:white;
}
.preview-error{
position:absolute;
inset:0;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
gap:10px;
text-align:center;
background:rgba(6,10,19,.88);
}
.preview-error.hidden{display:none}
.err-icon{
width:58px;height:58px;border-radius:50%;
display:grid;place-items:center;
background:rgba(255,90,90,.18);
border:1px solid rgba(255,90,90,.35);
font-weight:900;
}
.err-title{font-weight:800}
.err-sub{color:var(--muted);max-width:280px}
.statusbar{
display:flex;
justify-content:space-between;
padding:10px 12px;
border-top:1px solid var(--stroke);
color:var(--muted);
}
C) app.js
javascript
Copier le code
// ========= Preview controls =========
const frame = document.getElementById("previewFrame");
const previewError = document.getElementById("previewError");
const statusTxt = document.getElementById("statusTxt");
function showError(on){
previewError.classList.toggle("hidden", !on);
statusTxt.textContent = on ? "Hors ligne" : "En ligne";
}
frame.addEventListener("load", () => {
// Si la page charge, on masque l’erreur
showError(false);
});
// Si le navigateur bloque/échec réseau, on n’a pas toujours d’event "error" sur iframe.
// Donc on fait un petit "ping" de preview.html.
async function pingPreview() {
try{
const res = await fetch("./preview.html", { cache: "no-store" });
if(!res.ok) throw new Error("bad status");
showError(false);
}catch(e){
showError(true);
}
}
pingPreview();
document.getElementById("btnReload").addEventListener("click", async () => {
await pingPreview();
frame.src = frame.src; // reload
});
document.getElementById("btnOpen").addEventListener("click", () => {
window.open("./preview.html", "_blank");
});
// ========= Composer / Input =========
const promptEl = document.getElementById("prompt");
const fileInput = document.getElementById("fileInput");
document.getElementById("btnPlus").addEventListener("click", () => {
// Ici tu peux ouvrir un menu. Pour le test : focus input.
promptEl.focus();
});
// Upload file (trombone)
fileInput.addEventListener("change", () => {
const f = fileInput.files?.[0];
if(!f) return;
alert(`Fichier ajouté : ${f.name} (${Math.round(f.size/1024)} Ko)`);
fileInput.value = "";
});
// Send button
document.getElementById("btnSend").addEventListener("click", () => {
const text = promptEl.value.trim();
if(!text) return;
// Test: on envoie le texte vers la preview via localStorage
localStorage.setItem("preview_prompt", tex
- README.md +8 -5
- components/footer.js +61 -0
- components/navbar.js +77 -0
- components/project-card.js +80 -0
- index.html +44 -19
- script.js +16 -0
- style.css +24 -20
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CodeCraft Studio 🚀
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: pink
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
padding: 3rem 0;
|
| 8 |
+
text-align: center;
|
| 9 |
+
margin-top: 4rem;
|
| 10 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
.social-links {
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: center;
|
| 16 |
+
gap: 1.5rem;
|
| 17 |
+
margin-bottom: 1.5rem;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.social-link {
|
| 21 |
+
display: flex;
|
| 22 |
+
align-items: center;
|
| 23 |
+
justify-content: center;
|
| 24 |
+
width: 40px;
|
| 25 |
+
height: 40px;
|
| 26 |
+
border-radius: 50%;
|
| 27 |
+
background: rgba(255, 255, 255, 0.05);
|
| 28 |
+
transition: all 0.3s ease;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.social-link:hover {
|
| 32 |
+
background: var(--primary);
|
| 33 |
+
transform: translateY(-3px);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.copyright {
|
| 37 |
+
color: rgba(255, 255, 255, 0.6);
|
| 38 |
+
font-size: 0.875rem;
|
| 39 |
+
}
|
| 40 |
+
</style>
|
| 41 |
+
<footer>
|
| 42 |
+
<div class="social-links">
|
| 43 |
+
<a href="#" class="social-link">
|
| 44 |
+
<i data-feather="github"></i>
|
| 45 |
+
</a>
|
| 46 |
+
<a href="#" class="social-link">
|
| 47 |
+
<i data-feather="twitter"></i>
|
| 48 |
+
</a>
|
| 49 |
+
<a href="#" class="social-link">
|
| 50 |
+
<i data-feather="linkedin"></i>
|
| 51 |
+
</a>
|
| 52 |
+
<a href="#" class="social-link">
|
| 53 |
+
<i data-feather="mail"></i>
|
| 54 |
+
</a>
|
| 55 |
+
</div>
|
| 56 |
+
<p class="copyright">© ${new Date().getFullYear()} CodeCraft Studio. All rights reserved.</p>
|
| 57 |
+
</footer>
|
| 58 |
+
`;
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
customElements.define('custom-footer', CustomFooter);
|
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
display: flex;
|
| 8 |
+
justify-content: space-between;
|
| 9 |
+
align-items: center;
|
| 10 |
+
padding: 1.5rem 2rem;
|
| 11 |
+
position: sticky;
|
| 12 |
+
top: 0;
|
| 13 |
+
z-index: 50;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.logo {
|
| 17 |
+
font-weight: 700;
|
| 18 |
+
font-size: 1.5rem;
|
| 19 |
+
background: linear-gradient(to right, var(--primary), var(--secondary));
|
| 20 |
+
-webkit-background-clip: text;
|
| 21 |
+
background-clip: text;
|
| 22 |
+
color: transparent;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.nav-links {
|
| 26 |
+
display: flex;
|
| 27 |
+
gap: 2rem;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.nav-link {
|
| 31 |
+
position: relative;
|
| 32 |
+
padding: 0.5rem 0;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.nav-link::after {
|
| 36 |
+
content: '';
|
| 37 |
+
position: absolute;
|
| 38 |
+
bottom: 0;
|
| 39 |
+
left: 0;
|
| 40 |
+
width: 0;
|
| 41 |
+
height: 2px;
|
| 42 |
+
background: var(--primary);
|
| 43 |
+
transition: width 0.3s ease;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.nav-link:hover::after {
|
| 47 |
+
width: 100%;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
@media (max-width: 768px) {
|
| 51 |
+
.nav-links {
|
| 52 |
+
display: none;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.mobile-menu-button {
|
| 56 |
+
display: block;
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
</style>
|
| 60 |
+
<nav class="glass-effect">
|
| 61 |
+
<a href="/" class="logo">CodeCraft</a>
|
| 62 |
+
<div class="nav-links">
|
| 63 |
+
<a href="/projects" class="nav-link">Projects</a>
|
| 64 |
+
<a href="/about" class="nav-link">About</a>
|
| 65 |
+
<a href="/contact" class="nav-link">Contact</a>
|
| 66 |
+
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-700">
|
| 67 |
+
<i data-feather="moon"></i>
|
| 68 |
+
</button>
|
| 69 |
+
</div>
|
| 70 |
+
<button class="mobile-menu-button hidden">
|
| 71 |
+
<i data-feather="menu"></i>
|
| 72 |
+
</button>
|
| 73 |
+
</nav>
|
| 74 |
+
`;
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class ProjectCard extends HTMLElement {
|
| 2 |
+
static get observedAttributes() {
|
| 3 |
+
return ['title', 'description', 'tech', 'image'];
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
connectedCallback() {
|
| 7 |
+
this.attachShadow({ mode: 'open' });
|
| 8 |
+
this.render();
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
attributeChangedCallback() {
|
| 12 |
+
this.render();
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
render() {
|
| 16 |
+
const title = this.getAttribute('title') || 'Project';
|
| 17 |
+
const description = this.getAttribute('description') || 'No description provided';
|
| 18 |
+
const tech = this.getAttribute('tech') || 'Various technologies';
|
| 19 |
+
const image = this.getAttribute('image') || 'http://static.photos/abstract/640x360/4';
|
| 20 |
+
|
| 21 |
+
this.shadowRoot.innerHTML = `
|
| 22 |
+
<style>
|
| 23 |
+
.card {
|
| 24 |
+
border-radius: 1rem;
|
| 25 |
+
overflow: hidden;
|
| 26 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.card:hover {
|
| 30 |
+
transform: translateY(-5px);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.card-image {
|
| 34 |
+
height: 200px;
|
| 35 |
+
background-size: cover;
|
| 36 |
+
background-position: center;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.card-content {
|
| 40 |
+
padding: 1.5rem;
|
| 41 |
+
background: rgba(30, 41, 59, 0.7);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.tech-badge {
|
| 45 |
+
display: inline-block;
|
| 46 |
+
padding: 0.25rem 0.5rem;
|
| 47 |
+
background: var(--primary);
|
| 48 |
+
color: white;
|
| 49 |
+
border-radius: 0.25rem;
|
| 50 |
+
font-size: 0.75rem;
|
| 51 |
+
margin-top: 0.5rem;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.animate-fade-in {
|
| 55 |
+
opacity: 0;
|
| 56 |
+
animation: fadeIn 0.5s ease forwards;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
@keyframes fadeIn {
|
| 60 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 61 |
+
to { opacity: 1; transform: translateY(0); }
|
| 62 |
+
}
|
| 63 |
+
</style>
|
| 64 |
+
<div class="card glass-effect hover-glow">
|
| 65 |
+
<div class="card-image" style="background-image: url('${image}')"></div>
|
| 66 |
+
<div class="card-content">
|
| 67 |
+
<h3 class="text-xl font-bold mb-2">${title}</h3>
|
| 68 |
+
<p class="text-gray-300 mb-4">${description}</p>
|
| 69 |
+
<span class="tech-badge">${tech}</span>
|
| 70 |
+
<div class="mt-4 flex justify-end">
|
| 71 |
+
<a href="#" class="text-primary-400 hover:text-primary-300 flex items-center">
|
| 72 |
+
View Project <i data-feather="arrow-right" class="ml-2" width="16"></i>
|
| 73 |
+
</a>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
`;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
customElements.define('project-card', ProjectCard);
|
|
@@ -1,19 +1,44 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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">
|
| 6 |
+
<title>CodeCraft Studio</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
</head>
|
| 12 |
+
<body class="bg-gray-900 text-gray-100">
|
| 13 |
+
<custom-navbar></custom-navbar>
|
| 14 |
+
<main class="container mx-auto px-4 py-8">
|
| 15 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 16 |
+
<project-card
|
| 17 |
+
title="Neon Dreams"
|
| 18 |
+
description="CSS animation showcase"
|
| 19 |
+
tech="HTML/CSS/JS"
|
| 20 |
+
image="http://static.photos/technology/640x360/1"
|
| 21 |
+
></project-card>
|
| 22 |
+
<project-card
|
| 23 |
+
title="Pixel Perfect"
|
| 24 |
+
description="Responsive UI components"
|
| 25 |
+
tech="React/Tailwind"
|
| 26 |
+
image="http://static.photos/minimal/640x360/2"
|
| 27 |
+
></project-card>
|
| 28 |
+
<project-card
|
| 29 |
+
title="Code Canvas"
|
| 30 |
+
description="Interactive coding playground"
|
| 31 |
+
tech="Vue/Node"
|
| 32 |
+
image="http://static.photos/abstract/640x360/3"
|
| 33 |
+
></project-card>
|
| 34 |
+
</div>
|
| 35 |
+
</main>
|
| 36 |
+
<custom-footer></custom-footer>
|
| 37 |
+
<script src="components/navbar.js"></script>
|
| 38 |
+
<script src="components/project-card.js"></script>
|
| 39 |
+
<script src="components/footer.js"></script>
|
| 40 |
+
<script src="script.js"></script>
|
| 41 |
+
<script>feather.replace();</script>
|
| 42 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 43 |
+
</body>
|
| 44 |
+
</html>
|
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
// Animation for project cards
|
| 3 |
+
const cards = document.querySelectorAll('project-card');
|
| 4 |
+
cards.forEach((card, index) => {
|
| 5 |
+
card.style.transitionDelay = `${index * 0.1}s`;
|
| 6 |
+
card.classList.add('animate-fade-in');
|
| 7 |
+
});
|
| 8 |
+
|
| 9 |
+
// Theme toggle functionality
|
| 10 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 11 |
+
if (themeToggle) {
|
| 12 |
+
themeToggle.addEventListener('click', () => {
|
| 13 |
+
document.documentElement.classList.toggle('dark');
|
| 14 |
+
});
|
| 15 |
+
}
|
| 16 |
+
});
|
|
@@ -1,28 +1,32 @@
|
|
| 1 |
-
|
| 2 |
-
padding: 2rem;
|
| 3 |
-
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
-
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
:root {
|
| 4 |
+
--primary: #6366f1;
|
| 5 |
+
--primary-dark: #4f46e5;
|
| 6 |
+
--secondary: #10b981;
|
| 7 |
+
--dark: #1e293b;
|
| 8 |
+
--darker: #0f172a;
|
| 9 |
+
--light: #f8fafc;
|
| 10 |
}
|
| 11 |
|
| 12 |
+
body {
|
| 13 |
+
font-family: 'Inter', sans-serif;
|
| 14 |
+
background: linear-gradient(to bottom right, var(--darker), var(--dark));
|
| 15 |
+
min-height: 100vh;
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
+
.container {
|
| 19 |
+
max-width: 1200px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
+
.glass-effect {
|
| 23 |
+
background: rgba(255, 255, 255, 0.05);
|
| 24 |
+
backdrop-filter: blur(10px);
|
| 25 |
+
-webkit-backdrop-filter: blur(10px);
|
| 26 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 27 |
}
|
| 28 |
+
|
| 29 |
+
.hover-glow:hover {
|
| 30 |
+
box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
|
| 31 |
+
transition: all 0.3s ease;
|
| 32 |
+
}
|