FourLabs-UN2 commited on
Commit
281d07a
·
verified ·
1 Parent(s): 88c952e

Monte com sidebar e essas cores:

Browse files

colors: {
primary: '#21223a',
secondary: '#ff580f',
}v

Monte uma aplicação onde terá um botão e o usuário irá clicar para iniciar um novo teste assim abrindo um modal para ele selecionar um emulador android rodando e enviar o aplicativo .apk

Faça de forma bonita e profissional a página e o modal.

Files changed (5) hide show
  1. README.md +8 -5
  2. components/sidebar.js +107 -0
  3. index.html +116 -19
  4. script.js +14 -0
  5. style.css +23 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Android Emu Tester Pro
3
- emoji: 📈
4
- colorFrom: pink
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Android Emu Tester Pro 🚀
3
+ colorFrom: red
4
+ colorTo: red
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://deepsite.hf.co).
components/sidebar.js ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomSidebar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ :host {
7
+ display: block;
8
+ width: 280px;
9
+ height: 100vh;
10
+ background-color: #21223a;
11
+ color: white;
12
+ position: fixed;
13
+ box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
14
+ }
15
+
16
+ .sidebar-header {
17
+ padding: 1.5rem;
18
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
19
+ }
20
+
21
+ .logo {
22
+ font-size: 1.25rem;
23
+ font-weight: 700;
24
+ display: flex;
25
+ align-items: center;
26
+ }
27
+
28
+ .logo i {
29
+ margin-right: 0.75rem;
30
+ color: #ff580f;
31
+ }
32
+
33
+ .nav-item {
34
+ padding: 0.75rem 1.5rem;
35
+ display: flex;
36
+ align-items: center;
37
+ cursor: pointer;
38
+ transition: all 0.2s;
39
+ border-left: 3px solid transparent;
40
+ }
41
+
42
+ .nav-item:hover {
43
+ background-color: rgba(255, 255, 255, 0.05);
44
+ }
45
+
46
+ .nav-item.active {
47
+ background-color: rgba(255, 255, 255, 0.1);
48
+ border-left-color: #ff580f;
49
+ }
50
+
51
+ .nav-item i {
52
+ margin-right: 0.75rem;
53
+ width: 20px;
54
+ text-align: center;
55
+ }
56
+
57
+ .nav-item span {
58
+ font-size: 0.9rem;
59
+ }
60
+
61
+ .divider {
62
+ height: 1px;
63
+ background-color: rgba(255, 255, 255, 0.1);
64
+ margin: 1rem 1.5rem;
65
+ }
66
+ </style>
67
+
68
+ <div class="sidebar-header">
69
+ <div class="logo">
70
+ <i data-feather="box"></i>
71
+ <span>Emu Tester</span>
72
+ </div>
73
+ </div>
74
+
75
+ <nav class="py-4">
76
+ <div class="nav-item active">
77
+ <i data-feather="home"></i>
78
+ <span>Dashboard</span>
79
+ </div>
80
+
81
+ <div class="nav-item">
82
+ <i data-feather="list"></i>
83
+ <span>Test History</span>
84
+ </div>
85
+
86
+ <div class="nav-item">
87
+ <i data-feather="settings"></i>
88
+ <span>Settings</span>
89
+ </div>
90
+
91
+ <div class="divider"></div>
92
+
93
+ <div class="nav-item">
94
+ <i data-feather="help-circle"></i>
95
+ <span>Help & Support</span>
96
+ </div>
97
+ </nav>
98
+ `;
99
+
100
+ // Initialize feather icons
101
+ this.shadowRoot.querySelectorAll('[data-feather]').forEach(el => {
102
+ feather.replace(el);
103
+ });
104
+ }
105
+ }
106
+
107
+ customElements.define('custom-sidebar', CustomSidebar);
index.html CHANGED
@@ -1,19 +1,116 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Android Emu Tester Pro</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
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: '#21223a',
17
+ secondary: '#ff580f',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-100 font-sans">
25
+ <div class="flex h-screen">
26
+ <custom-sidebar></custom-sidebar>
27
+ <main class="flex-1 overflow-auto">
28
+ <div class="container mx-auto px-4 py-8">
29
+ <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-8">
30
+ <div class="text-center mb-10">
31
+ <h1 class="text-3xl font-bold text-primary mb-2">Android Emulator Tester</h1>
32
+ <p class="text-gray-600">Test your APK on running Android emulators with ease</p>
33
+ </div>
34
+
35
+ <div class="flex justify-center">
36
+ <button id="startTestBtn" class="bg-secondary hover:bg-orange-600 text-white font-bold py-3 px-8 rounded-full flex items-center transition-all transform hover:scale-105">
37
+ <i data-feather="play" class="mr-2"></i> Start New Test
38
+ </button>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </main>
43
+ </div>
44
+
45
+ <!-- Modal -->
46
+ <div id="testModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
47
+ <div class="bg-white rounded-xl w-full max-w-2xl mx-4">
48
+ <div class="flex justify-between items-center border-b p-4">
49
+ <h3 class="text-xl font-bold text-primary">Start New Test</h3>
50
+ <button id="closeModalBtn" class="text-gray-500 hover:text-gray-700">
51
+ <i data-feather="x"></i>
52
+ </button>
53
+ </div>
54
+ <div class="p-6">
55
+ <div class="mb-6">
56
+ <label class="block text-gray-700 font-medium mb-2">Select Running Emulator</label>
57
+ <select class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-secondary focus:border-transparent">
58
+ <option>Pixel 4 API 30 (Android 11)</option>
59
+ <option>Pixel 5 API 31 (Android 12)</option>
60
+ <option>Nexus 6 API 29 (Android 10)</option>
61
+ </select>
62
+ </div>
63
+
64
+ <div class="mb-8">
65
+ <label class="block text-gray-700 font-medium mb-2">Upload APK File</label>
66
+ <div class="border-2 border-dashed border-gray-300 rounded-xl p-8 text-center cursor-pointer hover:bg-gray-50 transition">
67
+ <div class="flex flex-col items-center">
68
+ <i data-feather="upload" class="text-secondary w-12 h-12 mb-3"></i>
69
+ <p class="text-gray-600 mb-1">Drag & drop your APK file here</p>
70
+ <p class="text-sm text-gray-500">or click to browse files</p>
71
+ </div>
72
+ <input type="file" class="hidden" accept=".apk">
73
+ </div>
74
+ </div>
75
+
76
+ <div class="flex justify-end space-x-3">
77
+ <button id="cancelBtn" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50">Cancel</button>
78
+ <button class="px-6 py-2 bg-secondary hover:bg-orange-600 text-white rounded-lg font-medium transition">Start Test</button>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <script src="components/sidebar.js"></script>
85
+ <script src="script.js"></script>
86
+ <script>
87
+ feather.replace();
88
+ document.addEventListener('DOMContentLoaded', function() {
89
+ const modal = document.getElementById('testModal');
90
+ const startBtn = document.getElementById('startTestBtn');
91
+ const closeBtn = document.getElementById('closeModalBtn');
92
+ const cancelBtn = document.getElementById('cancelBtn');
93
+
94
+ startBtn.addEventListener('click', () => {
95
+ modal.classList.remove('hidden');
96
+ });
97
+
98
+ closeBtn.addEventListener('click', () => {
99
+ modal.classList.add('hidden');
100
+ });
101
+
102
+ cancelBtn.addEventListener('click', () => {
103
+ modal.classList.add('hidden');
104
+ });
105
+
106
+ // Close modal when clicking outside
107
+ modal.addEventListener('click', (e) => {
108
+ if (e.target === modal) {
109
+ modal.classList.add('hidden');
110
+ }
111
+ });
112
+ });
113
+ </script>
114
+ <script src="https://deepsite.hf.co/deepsite-badge.js"></script>
115
+ </body>
116
+ </html>
script.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Shared functions
2
+ function showToast(message, type = 'success') {
3
+ const toast = document.createElement('div');
4
+ toast.className = `fixed top-4 right-4 px-4 py-2 rounded-lg shadow-lg text-white ${
5
+ type === 'success' ? 'bg-green-500' : 'bg-red-500'
6
+ }`;
7
+ toast.textContent = message;
8
+ document.body.appendChild(toast);
9
+
10
+ setTimeout(() => {
11
+ toast.classList.add('opacity-0', 'transition-opacity', 'duration-300');
12
+ setTimeout(() => toast.remove(), 300);
13
+ }, 3000);
14
+ }
style.css CHANGED
@@ -1,28 +1,33 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
28
  }
 
 
 
 
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
+ /* Custom scrollbar */
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
  }
11
 
12
+ ::-webkit-scrollbar-track {
13
+ background: #f1f1f1;
 
14
  }
15
 
16
+ ::-webkit-scrollbar-thumb {
17
+ background: #21223a;
18
+ border-radius: 4px;
 
 
19
  }
20
 
21
+ ::-webkit-scrollbar-thumb:hover {
22
+ background: #1a1b2f;
 
 
 
 
23
  }
24
 
25
+ /* Animation for modal */
26
+ @keyframes fadeIn {
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
  }
30
+
31
+ #testModal {
32
+ animation: fadeIn 0.3s ease-out;
33
+ }