Anpassat till den nya designen där Flask skapar websidor m.h.a. mallar. Webfiler (html, css, js) har flyttats till egna kataloger.
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Frontend</title>
|
||||
<!-- <title>Frontend</title> -->
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
<!-- This iframe will hold the content from client.html -->
|
||||
<iframe id="client-frame" style="width: 100%; height: 100vh;" srcdoc="{{ client_content }}"></iframe>
|
||||
|
||||
<!-- Responsive scaling and some padding -->
|
||||
<script>
|
||||
const clientFrame = document.getElementById('client-frame');
|
||||
|
||||
function resizeIframe() {
|
||||
clientFrame.style.height = window.innerHeight - 50 + 'px'; // Adjust the subtraction for padding/margins if needed
|
||||
}
|
||||
|
||||
window.addEventListener('resize', resizeIframe);
|
||||
resizeIframe(); // Call it once on page load
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const apiEndpoint = '<%= api_endpoint %>'; // Templating syntax (Jinja2)
|
||||
console.log("API Endpoint:", apiEndpoint);
|
||||
|
||||
// Use apiEndpoint in your frontend code...
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user