Spaces:
Running
Running
Create a website of a website inside a website
Browse files
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Infinite Webception
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Infinite Webception ๐
|
| 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).
|
index.html
CHANGED
|
@@ -1,19 +1,61 @@
|
|
| 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>Infinite Webception ๐</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<style>
|
| 10 |
+
.web-frame {
|
| 11 |
+
border: 2px solid #333;
|
| 12 |
+
border-radius: 8px;
|
| 13 |
+
overflow: hidden;
|
| 14 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.2);
|
| 15 |
+
transition: all 0.3s ease;
|
| 16 |
+
}
|
| 17 |
+
.web-frame:hover {
|
| 18 |
+
box-shadow: 0 0 30px rgba(0,0,0,0.3);
|
| 19 |
+
}
|
| 20 |
+
.frame-title {
|
| 21 |
+
background: #333;
|
| 22 |
+
color: white;
|
| 23 |
+
padding: 8px;
|
| 24 |
+
font-family: monospace;
|
| 25 |
+
font-size: 14px;
|
| 26 |
+
}
|
| 27 |
+
</style>
|
| 28 |
+
</head>
|
| 29 |
+
<body class="bg-gray-100 min-h-screen p-8">
|
| 30 |
+
<div class="max-w-6xl mx-auto">
|
| 31 |
+
<h1 class="text-4xl font-bold text-center mb-8 text-gray-800">Infinite Webception ๐</h1>
|
| 32 |
+
|
| 33 |
+
<div class="web-frame mb-8">
|
| 34 |
+
<div class="frame-title">index.html</div>
|
| 35 |
+
<div class="bg-white p-4">
|
| 36 |
+
<div class="web-frame">
|
| 37 |
+
<div class="frame-title">index.html</div>
|
| 38 |
+
<div class="bg-white p-4">
|
| 39 |
+
<div class="web-frame">
|
| 40 |
+
<div class="frame-title">index.html</div>
|
| 41 |
+
<div class="bg-white p-4 h-64 flex items-center justify-center">
|
| 42 |
+
<p class="text-gray-500">And so on... infinitely</p>
|
| 43 |
+
</div>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<div class="text-center">
|
| 51 |
+
<p class="text-gray-600 mb-4">A website inside a website inside a website...</p>
|
| 52 |
+
<button id="addFrame" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded">
|
| 53 |
+
Add Another Layer
|
| 54 |
+
</button>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<script src="script.js"></script>
|
| 59 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 60 |
+
</body>
|
| 61 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 2 |
+
const addFrameBtn = document.getElementById('addFrame');
|
| 3 |
+
const mainFrame = document.querySelector('.web-frame');
|
| 4 |
+
|
| 5 |
+
addFrameBtn.addEventListener('click', () => {
|
| 6 |
+
const deepestFrame = findDeepestFrame(mainFrame);
|
| 7 |
+
const newFrame = createNestedFrame();
|
| 8 |
+
deepestFrame.querySelector('div:not(.web-frame)').appendChild(newFrame);
|
| 9 |
+
});
|
| 10 |
+
|
| 11 |
+
function findDeepestFrame(frame) {
|
| 12 |
+
let current = frame;
|
| 13 |
+
while (current.querySelector('.web-frame .web-frame')) {
|
| 14 |
+
current = current.querySelector('.web-frame');
|
| 15 |
+
}
|
| 16 |
+
return current;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
function createNestedFrame() {
|
| 20 |
+
const frame = document.createElement('div');
|
| 21 |
+
frame.className = 'web-frame';
|
| 22 |
+
frame.innerHTML = `
|
| 23 |
+
<div class="frame-title">index.html</div>
|
| 24 |
+
<div class="bg-white p-4">
|
| 25 |
+
<div class="web-frame">
|
| 26 |
+
<div class="frame-title">index.html</div>
|
| 27 |
+
<div class="bg-white p-4 h-64 flex items-center justify-center">
|
| 28 |
+
<p class="text-gray-500">And so on... infinitely</p>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</div>
|
| 32 |
+
`;
|
| 33 |
+
return frame;
|
| 34 |
+
}
|
| 35 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,25 @@
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
-
}
|
|
|
|
| 1 |
body {
|
| 2 |
+
font-family: 'Inter', sans-serif;
|
| 3 |
+
background-color: #f5f5f5;
|
| 4 |
}
|
| 5 |
|
| 6 |
+
.web-frame {
|
| 7 |
+
position: relative;
|
| 8 |
+
margin: 20px auto;
|
| 9 |
+
width: 90%;
|
| 10 |
}
|
| 11 |
|
| 12 |
+
.frame-title {
|
| 13 |
+
font-family: 'Courier New', monospace;
|
| 14 |
+
font-weight: bold;
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
+
@keyframes pulse {
|
| 18 |
+
0% { transform: scale(1); }
|
| 19 |
+
50% { transform: scale(1.02); }
|
| 20 |
+
100% { transform: scale(1); }
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
|
| 23 |
+
.web-frame:hover {
|
| 24 |
+
animation: pulse 2s infinite;
|
| 25 |
+
}
|