Update index.html
Browse files- index.html +83 -128
index.html
CHANGED
@@ -3,152 +3,107 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<
|
7 |
-
<meta name="description" content="Full screen iframe implementation">
|
8 |
-
<title>Full Screen Iframe</title>
|
9 |
<style>
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
margin: 0;
|
16 |
-
padding: 0;
|
17 |
}
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
}
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
width: 100%;
|
33 |
-
height: 100%;
|
34 |
-
background-color: #f5f5f5;
|
35 |
}
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
top: 0;
|
41 |
-
left: 0;
|
42 |
-
width: 100%;
|
43 |
-
height: 100%;
|
44 |
-
border: none;
|
45 |
-
overflow: hidden;
|
46 |
-
/* Enable hardware acceleration */
|
47 |
-
transform: translateZ(0);
|
48 |
-
-webkit-transform: translateZ(0);
|
49 |
-
/* Improve scrolling performance */
|
50 |
-
-webkit-overflow-scrolling: touch;
|
51 |
}
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
top: 50%;
|
58 |
-
left: 50%;
|
59 |
-
transform: translate(-50%, -50%);
|
60 |
-
text-align: center;
|
61 |
-
padding: 20px;
|
62 |
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
63 |
}
|
64 |
-
|
65 |
-
|
66 |
-
.iframe-error .fallback-message {
|
67 |
-
display: block;
|
68 |
}
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
</style>
|
74 |
</head>
|
75 |
<body>
|
76 |
-
<
|
77 |
-
<
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
></iframe>
|
87 |
-
<div class="fallback-message">
|
88 |
-
<h2>Unable to load content</h2>
|
89 |
-
<p>Please check your internet connection and try again.</p>
|
90 |
</div>
|
91 |
-
</div>
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
114 |
});
|
115 |
-
</script>
|
116 |
-
</body>
|
117 |
-
</html>
|
118 |
-
<!--
|
119 |
|
120 |
-
|
121 |
-
<html lang="en">
|
122 |
-
<head>
|
123 |
-
<meta charset="UTF-8">
|
124 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
125 |
-
<title>Full Screen Iframe</title>
|
126 |
-
<style>
|
127 |
-
/* Remove padding and margin for body and html */
|
128 |
-
html, body {
|
129 |
-
margin: 0;
|
130 |
-
padding: 0;
|
131 |
-
height: 100%;
|
132 |
-
}
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
overflow: hidden; /* Prevents scrollbars */
|
145 |
}
|
146 |
-
</style>
|
147 |
-
</head>
|
148 |
-
<body>
|
149 |
-
|
150 |
-
<iframe src="https://aidark.net/" frameborder="0" scrolling="no"></iframe>
|
151 |
|
|
|
|
|
|
|
|
|
152 |
</body>
|
153 |
</html>
|
154 |
-
-->
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Coder Space</title>
|
|
|
|
|
7 |
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
line-height: 1.6;
|
11 |
+
padding: 20px;
|
12 |
+
background-color: #f4f4f4;
|
|
|
|
|
13 |
}
|
14 |
+
.container {
|
15 |
+
max-width: 800px;
|
16 |
+
margin: auto;
|
17 |
+
background-color: #fff;
|
18 |
+
padding: 20px;
|
19 |
+
border-radius: 5px;
|
20 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
21 |
}
|
22 |
+
header {
|
23 |
+
background-color: #3498db;
|
24 |
+
color: white;
|
25 |
+
text-align: center;
|
26 |
+
padding: 20px 0;
|
27 |
+
border-radius: 5px 5px 0 0;
|
|
|
|
|
|
|
28 |
}
|
29 |
+
main {
|
30 |
+
display: flex;
|
31 |
+
flex-direction: column;
|
32 |
+
gap: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
+
.card {
|
35 |
+
background-color: #fff;
|
36 |
+
border-radius: 5px;
|
37 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.05);
|
38 |
+
transition: transform 0.3s ease-in-out;
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
+
.card:hover {
|
41 |
+
transform: translateY(-5px);
|
|
|
|
|
42 |
}
|
43 |
+
footer {
|
44 |
+
background-color: #3498db;
|
45 |
+
color: white;
|
46 |
+
text-align: center;
|
47 |
+
padding: 10px 0;
|
48 |
+
margin-top: auto;
|
49 |
+
border-radius: 0 0 5px 5px;
|
50 |
}
|
51 |
</style>
|
52 |
</head>
|
53 |
<body>
|
54 |
+
<header>
|
55 |
+
<h1>Coder Space</h1>
|
56 |
+
<p>Interactive coding environment powered by Hugging Face</p>
|
57 |
+
</header>
|
58 |
+
|
59 |
+
<main>
|
60 |
+
<!-- Add your main content here -->
|
61 |
+
<div class="card">
|
62 |
+
<h2>Code Editor</h2>
|
63 |
+
<textarea id="codeEditor" rows="10" cols="50"></textarea>
|
|
|
|
|
|
|
|
|
64 |
</div>
|
|
|
65 |
|
66 |
+
<div class="card">
|
67 |
+
<h2>Console Output</h2>
|
68 |
+
<pre id="consoleOutput"></pre>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="card">
|
72 |
+
<h2>Run Code</h2>
|
73 |
+
<button onclick="runCode()">Execute</button>
|
74 |
+
</div>
|
75 |
+
</main>
|
76 |
|
77 |
+
<footer>
|
78 |
+
<p>© 2023 Coder Space. All rights reserved.</p>
|
79 |
+
</footer>
|
80 |
+
|
81 |
+
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.34.2/min/vs/loader.js"></script>
|
82 |
+
<script>
|
83 |
+
// Initialize Monaco Editor
|
84 |
+
const editor = monaco.editor.create(document.getElementById('codeEditor'), {
|
85 |
+
value: '',
|
86 |
+
language: 'javascript',
|
87 |
+
theme: 'vs-dark'
|
88 |
});
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
let consoleOutput = document.getElementById('consoleOutput');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
function runCode() {
|
93 |
+
try {
|
94 |
+
const code = editor.getValue();
|
95 |
+
console.log(code);
|
96 |
+
// Here you would typically execute the code and update the console output
|
97 |
+
consoleOutput.textContent += `Output:\n${code}\n`;
|
98 |
+
} catch (error) {
|
99 |
+
console.error(error);
|
100 |
+
consoleOutput.textContent += `Error:\n${error.message}\n`;
|
101 |
+
}
|
|
|
102 |
}
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
+
// Example of using environment variables
|
105 |
+
const envVars = window.huggingface.variables;
|
106 |
+
console.log('Environment Variables:', JSON.stringify(envVars, null, 2));
|
107 |
+
</script>
|
108 |
</body>
|
109 |
</html>
|
|