-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMini03.html
More file actions
172 lines (152 loc) · 7.42 KB
/
Mini03.html
File metadata and controls
172 lines (152 loc) · 7.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nexus | Next-Gen Browser</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.157.0/three.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #050505;
color: #e5e5e5;
overflow: hidden;
}
.glass {
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.browser-container {
height: calc(100vh - 70px);
margin: 10px;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
background: #111;
}
iframe {
width: 100%;
height: 100%;
border: none;
background: white;
}
.toast {
transform: translateY(100px);
transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.toast.active { transform: translateY(0); }
/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
</style>
</head>
<body>
<canvas id="bg-canvas" class="fixed inset-0 -z-10"></canvas>
<nav class="glass flex items-center justify-between px-6 py-3 gap-4 sticky top-0 z-50">
<div class="flex items-center gap-4">
<div class="flex gap-1.5">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
<div class="h-6 w-[1px] bg-white/10 mx-2"></div>
<h1 class="text-sm font-semibold tracking-tighter text-yellow-400 italic">NEXUS</h1>
</div>
<div class="flex-1 max-w-3xl relative group">
<div class="absolute inset-y-0 left-3 flex items-center pointer-events-none text-neutral-500">
<i data-lucide="globe" class="w-4 h-4"></i>
</div>
<input
id="urlInput"
type="text"
placeholder="Search Google or enter URL..."
class="w-full bg-white/5 border border-white/10 rounded-full py-2 pl-10 pr-4 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400/50 transition-all"
onkeydown="if(event.key === 'Enter') goToSite()"
/>
</div>
<div class="flex items-center gap-3">
<button onclick="goToSite()" class="bg-yellow-400 hover:bg-yellow-500 text-black px-5 py-2 rounded-full text-xs font-bold transition-transform active:scale-95 flex items-center gap-2">
GO <i data-lucide="arrow-right" class="w-3 h-3"></i>
</button>
<div class="relative group">
<button class="p-2 hover:bg-white/10 rounded-lg transition-colors">
<i data-lucide="more-vertical" class="w-5 h-5"></i>
</button>
<div class="absolute right-0 mt-2 w-48 glass border border-white/10 rounded-xl py-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all transform origin-top-right scale-95 group-hover:scale-100">
<a href="#" onclick="showToast('History cleared!')" class="flex items-center gap-3 px-4 py-2 text-xs hover:bg-white/10"><i data-lucide="history" class="w-4 h-4"></i> History</a>
<a href="#" onclick="showToast('Incognito Mode Enabled')" class="flex items-center gap-3 px-4 py-2 text-xs hover:bg-white/10"><i data-lucide="shield" class="w-4 h-4"></i> Private Window</a>
<div class="h-[1px] bg-white/10 my-1"></div>
<a href="#" class="flex items-center gap-3 px-4 py-2 text-xs text-red-400 hover:bg-red-400/10"><i data-lucide="settings" class="w-4 h-4"></i> Settings</a>
</div>
</div>
</div>
</nav>
<main class="browser-container border border-white/10">
<iframe id="browserFrame" src="https://www.bing.com"></iframe>
</main>
<div id="toast" class="toast fixed bottom-8 right-8 glass border border-yellow-400/30 px-6 py-3 rounded-2xl flex items-center gap-3 shadow-2xl z-[100]">
<div class="bg-yellow-400 p-1 rounded-full text-black">
<i data-lucide="check" class="w-3 h-3"></i>
</div>
<span id="toastMsg" class="text-sm font-medium text-white">Navigation Successful</span>
</div>
<script>
// Initialize Lucide Icons
lucide.createIcons();
// Browser Logic
const frame = document.getElementById("browserFrame");
const urlInput = document.getElementById("urlInput");
const toast = document.getElementById("toast");
function showToast(msg) {
document.getElementById("toastMsg").innerText = msg;
toast.classList.add('active');
setTimeout(() => toast.classList.remove('active'), 3000);
}
function goToSite() {
let input = urlInput.value.trim();
if(!input) return;
showToast("Loading site...");
const isUrl = input.startsWith("http://") || input.startsWith("https://");
let finalUrl = "";
if (!isUrl && input.includes(".")) {
finalUrl = "https://" + input;
} else if (!isUrl) {
// Using Bing because Google often blocks iframe embedding
finalUrl = "https://www.bing.com/search?q=" + encodeURIComponent(input);
} else {
finalUrl = input;
}
frame.src = finalUrl;
}
// --- THREE.JS BACKGROUND ---
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('bg-canvas'), antialias: true, alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
const starGeometry = new THREE.BufferGeometry();
const starMaterial = new THREE.PointsMaterial({ color: 0xffffff, size: 0.1 });
const starVertices = [];
for (let i = 0; i < 5000; i++) {
starVertices.push((Math.random() - 0.5) * 2000, (Math.random() - 0.5) * 2000, -Math.random() * 2000);
}
starGeometry.setAttribute('position', new THREE.Float32BufferAttribute(starVertices, 3));
const stars = new THREE.Points(starGeometry, starMaterial);
scene.add(stars);
function animate() {
requestAnimationFrame(animate);
stars.rotation.z += 0.0005;
renderer.render(scene, camera);
}
animate();
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
</script>
</body>
</html>