Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -1,11 +1,44 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
from fastapi.responses import HTMLResponse
|
3 |
|
4 |
+
app = FastAPI()
|
5 |
|
6 |
+
@app.get("/", response_class=HTMLResponse)
|
7 |
+
async def read_root():
|
8 |
+
html_content = """
|
9 |
+
<!DOCTYPE html>
|
10 |
+
<html>
|
11 |
+
<head>
|
12 |
+
<title>Fullscreen IFrame</title>
|
13 |
+
<style>
|
14 |
+
html, body {
|
15 |
+
margin: 0;
|
16 |
+
padding: 0;
|
17 |
+
width: 100%;
|
18 |
+
height: 100%;
|
19 |
+
overflow: hidden;
|
20 |
+
}
|
21 |
|
22 |
+
iframe {
|
23 |
+
position: fixed;
|
24 |
+
top: 0;
|
25 |
+
left: 0;
|
26 |
+
width: 100%;
|
27 |
+
height: 100%;
|
28 |
+
border: none;
|
29 |
+
margin: 0;
|
30 |
+
padding: 0;
|
31 |
+
overflow: hidden;
|
32 |
+
}
|
33 |
+
</style>
|
34 |
+
</head>
|
35 |
+
<body>
|
36 |
+
<iframe
|
37 |
+
src="YOUR_URL_HERE"
|
38 |
+
allowfullscreen
|
39 |
+
frameborder="0"
|
40 |
+
></iframe>
|
41 |
+
</body>
|
42 |
+
</html>
|
43 |
+
"""
|
44 |
+
return HTMLResponse(content=html_content)
|