From a3b8fc556704787d5481bcfc8607d658d6bdcb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Wed, 5 Aug 2026 18:38:10 +0200 Subject: [PATCH] responsive --- static/builder.js | 6 ++++++ static/style.css | 12 ++++++++---- templates/index.html | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/static/builder.js b/static/builder.js index 908c4b9..b00c310 100644 --- a/static/builder.js +++ b/static/builder.js @@ -298,6 +298,9 @@ document const iframe = document.getElementById("pdf_iframe"); + const pdflink = + document.getElementById("pdf_link"); + submitButton.disabled = true; loader.style.display = "block"; @@ -325,6 +328,9 @@ document iframe.src = url; iframe.style.display = "block"; + pdflink.href = url; + pdflink.style.display = "block"; + } catch (err) { console.error(err); diff --git a/static/style.css b/static/style.css index d464e98..ccfbcf1 100644 --- a/static/style.css +++ b/static/style.css @@ -170,9 +170,13 @@ #pdf_iframe { - width: 100%; - height: calc(100vh - 220px); - min-height: 500px; + width: min(100%, 1400px); + aspect-ratio: 297 / 210; border: 1px solid #ccc; - margin-top: 1rem; + margin: 1rem auto; +} + +footer { + margin-top: 2em; + text-align: center } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 34510ba..db06ba1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -237,6 +237,8 @@ Générer PDF + + @@ -245,6 +247,7 @@ Générer PDF + \ No newline at end of file