Spaces:
Running
Running
from fastapi import FastAPI | |
from fastapi.responses import HTMLResponse | |
app = FastAPI() | |
async def read_root(): | |
html_content = """ | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fullscreen IFrame</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
} | |
iframe { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
border: none; | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
} | |
</style> | |
</head> | |
<body> | |
<iframe | |
src="YOUR_URL_HERE" | |
allowfullscreen | |
frameborder="0" | |
></iframe> | |
</body> | |
</html> | |
""" | |
return HTMLResponse(content=html_content) |