Jenstatos commited on
Commit
6864f69
ยท
verified ยท
1 Parent(s): dd4572c

Create a website of a website inside a website

Browse files
Files changed (4) hide show
  1. README.md +8 -5
  2. index.html +61 -19
  3. script.js +35 -0
  4. style.css +16 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Infinite Webception
3
- emoji: ๐Ÿš€
4
- colorFrom: pink
5
- colorTo: red
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: 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
- <!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>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
- 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
  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
+ }