bana android studio gibi bir uygulama hazırlamnı istiyorum
Browse files- README.md +8 -5
- components/navbar.js +68 -0
- components/sidebar.js +110 -0
- components/statusbar.js +75 -0
- index.html +125 -19
- script.js +35 -0
- style.css +32 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CodeNest - Android Studio Clone 🚀
|
| 3 |
+
colorFrom: red
|
| 4 |
+
colorTo: green
|
| 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).
|
components/navbar.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.navbar {
|
| 7 |
+
height: 48px;
|
| 8 |
+
display: flex;
|
| 9 |
+
align-items: center;
|
| 10 |
+
padding: 0 16px;
|
| 11 |
+
background-color: var(--navbar-bg, #1E293B);
|
| 12 |
+
color: var(--navbar-text, #F8FAFC);
|
| 13 |
+
border-bottom: 1px solid var(--navbar-border, #334155);
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.nav-item {
|
| 17 |
+
padding: 8px 12px;
|
| 18 |
+
border-radius: 4px;
|
| 19 |
+
transition: background-color 0.2s;
|
| 20 |
+
cursor: pointer;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.nav-item:hover {
|
| 24 |
+
background-color: var(--navbar-hover, #334155);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.logo {
|
| 28 |
+
font-weight: 600;
|
| 29 |
+
display: flex;
|
| 30 |
+
align-items: center;
|
| 31 |
+
gap: 8px;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.logo-icon {
|
| 35 |
+
color: #3DDC84;
|
| 36 |
+
}
|
| 37 |
+
</style>
|
| 38 |
+
<div class="navbar">
|
| 39 |
+
<div class="flex items-center space-x-6">
|
| 40 |
+
<div class="logo">
|
| 41 |
+
<i data-feather="code" class="logo-icon"></i>
|
| 42 |
+
<span>CodeNest</span>
|
| 43 |
+
</div>
|
| 44 |
+
<div class="flex space-x-1">
|
| 45 |
+
<div class="nav-item">File</div>
|
| 46 |
+
<div class="nav-item">Edit</div>
|
| 47 |
+
<div class="nav-item">View</div>
|
| 48 |
+
<div class="nav-item">Navigate</div>
|
| 49 |
+
<div class="nav-item">Code</div>
|
| 50 |
+
<div class="nav-item">Run</div>
|
| 51 |
+
<div class="nav-item">Tools</div>
|
| 52 |
+
<div class="nav-item">Help</div>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
<div class="ml-auto flex items-center space-x-4">
|
| 56 |
+
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-700">
|
| 57 |
+
<i data-feather="moon"></i>
|
| 58 |
+
</button>
|
| 59 |
+
<button id="build-button" class="px-3 py-1 rounded-md bg-primary-500 hover:bg-primary-600 text-white text-sm flex items-center gap-2">
|
| 60 |
+
<i data-feather="play" class="w-4 h-4"></i>
|
| 61 |
+
Run
|
| 62 |
+
</button>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
`;
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
customElements.define('custom-navbar', CustomNavbar);
|
components/sidebar.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomSidebar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.sidebar {
|
| 7 |
+
width: 250px;
|
| 8 |
+
height: 100%;
|
| 9 |
+
background-color: var(--sidebar-bg, #1E293B);
|
| 10 |
+
color: var(--sidebar-text, #F8FAFC);
|
| 11 |
+
border-right: 1px solid var(--sidebar-border, #334155);
|
| 12 |
+
overflow-y: auto;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.sidebar-header {
|
| 16 |
+
padding: 12px 16px;
|
| 17 |
+
font-weight: 600;
|
| 18 |
+
border-bottom: 1px solid var(--sidebar-border, #334155);
|
| 19 |
+
display: flex;
|
| 20 |
+
align-items: center;
|
| 21 |
+
justify-content: space-between;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.sidebar-item {
|
| 25 |
+
padding: 8px 16px 8px 32px;
|
| 26 |
+
cursor: pointer;
|
| 27 |
+
display: flex;
|
| 28 |
+
align-items: center;
|
| 29 |
+
gap: 8px;
|
| 30 |
+
user-select: none;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.sidebar-item:hover {
|
| 34 |
+
background-color: var(--sidebar-hover, #334155);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.sidebar-item.active {
|
| 38 |
+
background-color: var(--sidebar-active, #3B82F6);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.sidebar-group {
|
| 42 |
+
margin: 8px 0;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.sidebar-group-title {
|
| 46 |
+
padding: 8px 16px;
|
| 47 |
+
font-size: 0.75rem;
|
| 48 |
+
text-transform: uppercase;
|
| 49 |
+
letter-spacing: 0.05em;
|
| 50 |
+
color: var(--sidebar-group-text, #94A3B8);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.folder-icon {
|
| 54 |
+
color: #F59E0B;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.file-icon {
|
| 58 |
+
color: #60A5FA;
|
| 59 |
+
}
|
| 60 |
+
</style>
|
| 61 |
+
<div class="sidebar">
|
| 62 |
+
<div class="sidebar-header">
|
| 63 |
+
<span>Project</span>
|
| 64 |
+
<i data-feather="chevron-down" class="w-4 h-4"></i>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<div class="sidebar-group">
|
| 68 |
+
<div class="sidebar-group-title">MyApplication</div>
|
| 69 |
+
<div class="sidebar-item active">
|
| 70 |
+
<i data-feather="file" class="file-icon"></i>
|
| 71 |
+
<span>MainActivity.kt</span>
|
| 72 |
+
</div>
|
| 73 |
+
<div class="sidebar-item">
|
| 74 |
+
<i data-feather="file" class="file-icon"></i>
|
| 75 |
+
<span>AndroidManifest.xml</span>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
|
| 79 |
+
<div class="sidebar-group">
|
| 80 |
+
<div class="sidebar-group-title">res</div>
|
| 81 |
+
<div class="sidebar-item">
|
| 82 |
+
<i data-feather="folder" class="folder-icon"></i>
|
| 83 |
+
<span>layout</span>
|
| 84 |
+
</div>
|
| 85 |
+
<div class="sidebar-item">
|
| 86 |
+
<i data-feather="folder" class="folder-icon"></i>
|
| 87 |
+
<span>values</span>
|
| 88 |
+
</div>
|
| 89 |
+
<div class="sidebar-item">
|
| 90 |
+
<i data-feather="folder" class="folder-icon"></i>
|
| 91 |
+
<span>drawable</span>
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
|
| 95 |
+
<div class="sidebar-group">
|
| 96 |
+
<div class="sidebar-group-title">Gradle Scripts</div>
|
| 97 |
+
<div class="sidebar-item">
|
| 98 |
+
<i data-feather="file" class="file-icon"></i>
|
| 99 |
+
<span>build.gradle (Module)</span>
|
| 100 |
+
</div>
|
| 101 |
+
<div class="sidebar-item">
|
| 102 |
+
<i data-feather="file" class="file-icon"></i>
|
| 103 |
+
<span>build.gradle (Project)</span>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
`;
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
customElements.define('custom-sidebar', CustomSidebar);
|
components/statusbar.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomStatusbar extends HTMLElement {
|
| 2 |
+
static get observedAttributes() {
|
| 3 |
+
return ['message'];
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
constructor() {
|
| 7 |
+
super();
|
| 8 |
+
this._message = 'Ready';
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
attributeChangedCallback(name, oldValue, newValue) {
|
| 12 |
+
if (name === 'message') {
|
| 13 |
+
this._message = newValue;
|
| 14 |
+
this.render();
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
connectedCallback() {
|
| 19 |
+
this.render();
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
render() {
|
| 23 |
+
this.attachShadow({ mode: 'open' });
|
| 24 |
+
this.shadowRoot.innerHTML = `
|
| 25 |
+
<style>
|
| 26 |
+
.statusbar {
|
| 27 |
+
height: 24px;
|
| 28 |
+
background-color: var(--statusbar-bg, #1E293B);
|
| 29 |
+
color: var(--statusbar-text, #F8FAFC);
|
| 30 |
+
border-top: 1px solid var(--statusbar-border, #334155);
|
| 31 |
+
display: flex;
|
| 32 |
+
align-items: center;
|
| 33 |
+
padding: 0 16px;
|
| 34 |
+
font-size: 0.75rem;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.status-item {
|
| 38 |
+
margin-right: 16px;
|
| 39 |
+
display: flex;
|
| 40 |
+
align-items: center;
|
| 41 |
+
gap: 4px;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.status-icon {
|
| 45 |
+
width: 12px;
|
| 46 |
+
height: 12px;
|
| 47 |
+
}
|
| 48 |
+
</style>
|
| 49 |
+
<div class="statusbar">
|
| 50 |
+
<div class="status-item">
|
| 51 |
+
<i data-feather="info" class="status-icon"></i>
|
| 52 |
+
<span>${this._message}</span>
|
| 53 |
+
</div>
|
| 54 |
+
<div class="status-item ml-auto">
|
| 55 |
+
<i data-feather="git-branch" class="status-icon"></i>
|
| 56 |
+
<span>main</span>
|
| 57 |
+
</div>
|
| 58 |
+
<div class="status-item">
|
| 59 |
+
<i data-feather="cpu" class="status-icon"></i>
|
| 60 |
+
<span>0 errors</span>
|
| 61 |
+
</div>
|
| 62 |
+
<div class="status-item">
|
| 63 |
+
<i data-feather="clock" class="status-icon"></i>
|
| 64 |
+
<span>UTF-8</span>
|
| 65 |
+
</div>
|
| 66 |
+
<div class="status-item">
|
| 67 |
+
<i data-feather="corner-right-down" class="status-icon"></i>
|
| 68 |
+
<span>LF</span>
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
`;
|
| 72 |
+
feather.replace();
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
customElements.define('custom-statusbar', CustomStatusbar);
|
index.html
CHANGED
|
@@ -1,19 +1,125 @@
|
|
| 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" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>CodeNest - Android Studio Clone</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 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
darkMode: 'class',
|
| 14 |
+
theme: {
|
| 15 |
+
extend: {
|
| 16 |
+
colors: {
|
| 17 |
+
primary: {
|
| 18 |
+
500: '#3DDC84',
|
| 19 |
+
600: '#2BB673'
|
| 20 |
+
},
|
| 21 |
+
secondary: {
|
| 22 |
+
500: '#4285F4',
|
| 23 |
+
600: '#3367D6'
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
</script>
|
| 30 |
+
</head>
|
| 31 |
+
<body class="bg-gray-100 dark:bg-gray-900 h-screen flex flex-col">
|
| 32 |
+
<custom-navbar></custom-navbar>
|
| 33 |
+
|
| 34 |
+
<div class="flex flex-1 overflow-hidden">
|
| 35 |
+
<custom-sidebar></custom-sidebar>
|
| 36 |
+
|
| 37 |
+
<main class="flex-1 overflow-auto bg-white dark:bg-gray-800">
|
| 38 |
+
<div class="flex h-full">
|
| 39 |
+
<!-- Editor Section -->
|
| 40 |
+
<div class="flex-1 flex flex-col border-r border-gray-200 dark:border-gray-700">
|
| 41 |
+
<div class="border-b border-gray-200 dark:border-gray-700 p-2 flex items-center justify-between bg-gray-50 dark:bg-gray-700">
|
| 42 |
+
<div class="flex space-x-2">
|
| 43 |
+
<span class="px-3 py-1 text-xs rounded-full bg-primary-500 text-white">MainActivity.kt</span>
|
| 44 |
+
<span class="px-3 py-1 text-xs rounded-full bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300">Manifest.xml</span>
|
| 45 |
+
</div>
|
| 46 |
+
<div class="flex space-x-2">
|
| 47 |
+
<button class="p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600">
|
| 48 |
+
<i data-feather="minimize-2" class="w-4 h-4"></i>
|
| 49 |
+
</button>
|
| 50 |
+
<button class="p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600">
|
| 51 |
+
<i data-feather="maximize-2" class="w-4 h-4"></i>
|
| 52 |
+
</button>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
|
| 56 |
+
<div class="flex-1 overflow-auto p-4 font-mono text-sm">
|
| 57 |
+
<pre class="text-gray-800 dark:text-gray-200">
|
| 58 |
+
package com.example.myapplication
|
| 59 |
+
|
| 60 |
+
import androidx.appcompat.app.AppCompatActivity
|
| 61 |
+
import android.os.Bundle
|
| 62 |
+
import android.widget.Button
|
| 63 |
+
import android.widget.Toast
|
| 64 |
+
|
| 65 |
+
class MainActivity : AppCompatActivity() {
|
| 66 |
+
override fun onCreate(savedInstanceState: Bundle?) {
|
| 67 |
+
super.onCreate(savedInstanceState)
|
| 68 |
+
setContentView(R.layout.activity_main)
|
| 69 |
+
|
| 70 |
+
val button = findViewById<Button>(R.id.button)
|
| 71 |
+
button.setOnClickListener {
|
| 72 |
+
Toast.makeText(this, "Hello from CodeNest!", Toast.LENGTH_SHORT).show()
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}</pre>
|
| 76 |
+
</div>
|
| 77 |
+
|
| 78 |
+
<div class="border-t border-gray-200 dark:border-gray-700 p-2 bg-gray-50 dark:bg-gray-700 flex justify-between items-center">
|
| 79 |
+
<div class="text-xs text-gray-500 dark:text-gray-400">Ln 10, Col 12</div>
|
| 80 |
+
<div class="flex space-x-2">
|
| 81 |
+
<span class="text-xs text-gray-500 dark:text-gray-400">UTF-8</span>
|
| 82 |
+
<span class="text-xs text-gray-500 dark:text-gray-400">LF</span>
|
| 83 |
+
<span class="text-xs text-gray-500 dark:text-gray-400">Kotlin</span>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
|
| 88 |
+
<!-- Preview Section -->
|
| 89 |
+
<div class="w-1/3 flex flex-col border-l border-gray-200 dark:border-gray-700">
|
| 90 |
+
<div class="border-b border-gray-200 dark:border-gray-700 p-2 bg-gray-50 dark:bg-gray-700 flex items-center justify-between">
|
| 91 |
+
<h3 class="font-medium text-gray-700 dark:text-gray-300">Design Preview</h3>
|
| 92 |
+
<div class="flex space-x-2">
|
| 93 |
+
<button class="p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600">
|
| 94 |
+
<i data-feather="refresh-cw" class="w-4 h-4"></i>
|
| 95 |
+
</button>
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
|
| 99 |
+
<div class="flex-1 overflow-auto p-4 bg-gray-100 dark:bg-gray-900 flex items-center justify-center">
|
| 100 |
+
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg w-full max-w-md">
|
| 101 |
+
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
|
| 102 |
+
<h3 class="text-lg font-medium text-gray-900 dark:text-white">My Application</h3>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="p-4">
|
| 105 |
+
<button class="w-full py-2 px-4 bg-primary-500 hover:bg-primary-600 text-white rounded-md transition-colors">
|
| 106 |
+
Click Me!
|
| 107 |
+
</button>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
</main>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<custom-statusbar></custom-statusbar>
|
| 117 |
+
|
| 118 |
+
<script src="components/navbar.js"></script>
|
| 119 |
+
<script src="components/sidebar.js"></script>
|
| 120 |
+
<script src="components/statusbar.js"></script>
|
| 121 |
+
<script src="script.js"></script>
|
| 122 |
+
<script>feather.replace();</script>
|
| 123 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 124 |
+
</body>
|
| 125 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
// Theme switcher functionality
|
| 3 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 4 |
+
if (themeToggle) {
|
| 5 |
+
themeToggle.addEventListener('click', function() {
|
| 6 |
+
const html = document.querySelector('html');
|
| 7 |
+
if (html.classList.contains('dark')) {
|
| 8 |
+
html.classList.remove('dark');
|
| 9 |
+
localStorage.setItem('theme', 'light');
|
| 10 |
+
} else {
|
| 11 |
+
html.classList.add('dark');
|
| 12 |
+
localStorage.setItem('theme', 'dark');
|
| 13 |
+
}
|
| 14 |
+
});
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
// Check for saved theme preference
|
| 18 |
+
if (localStorage.getItem('theme') === 'light') {
|
| 19 |
+
document.querySelector('html').classList.remove('dark');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
// Simulate build process
|
| 23 |
+
const buildButton = document.getElementById('build-button');
|
| 24 |
+
if (buildButton) {
|
| 25 |
+
buildButton.addEventListener('click', function() {
|
| 26 |
+
const statusbar = document.querySelector('custom-statusbar');
|
| 27 |
+
if (statusbar) {
|
| 28 |
+
statusbar.setAttribute('message', 'Building...');
|
| 29 |
+
setTimeout(() => {
|
| 30 |
+
statusbar.setAttribute('message', 'Build successful');
|
| 31 |
+
}, 2000);
|
| 32 |
+
}
|
| 33 |
+
});
|
| 34 |
+
}
|
| 35 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-size: 15px;
|
| 14 |
-
margin-bottom: 10px;
|
| 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=Fira+Code:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', sans-serif;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
pre, code {
|
| 8 |
+
font-family: 'Fira Code', monospace;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
/* Custom scrollbar */
|
| 12 |
+
::-webkit-scrollbar {
|
| 13 |
+
width: 8px;
|
| 14 |
+
height: 8px;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
::-webkit-scrollbar-track {
|
| 18 |
+
background: #f1f1f1;
|
| 19 |
+
border-radius: 4px;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
::-webkit-scrollbar-thumb {
|
| 23 |
+
background: #c1c1c1;
|
| 24 |
+
border-radius: 4px;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
.dark ::-webkit-scrollbar-track {
|
| 28 |
+
background: #374151;
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
+
.dark ::-webkit-scrollbar-thumb {
|
| 32 |
+
background: #6B7280;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
+
/* Animation for buttons */
|
| 36 |
+
.button-press {
|
| 37 |
+
transition: transform 0.1s ease;
|
| 38 |
}
|
| 39 |
+
|
| 40 |
+
.button-press:active {
|
| 41 |
+
transform: scale(0.95);
|
| 42 |
+
}
|