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