diff --git a/static/js/index.js b/static/js/index.js index 21f6642..1dd1325 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -70,4 +70,34 @@ document.addEventListener("DOMContentLoaded", function () { breedingIframe.src = breedingIframeSrc; } + +//I was trying to get rid of the scroll bars but h-auto/fit wasn't working +// This works to resize but still leaves some scrollbar +//to-do:fix + + // Function to resize iframe + //function resizeIframe(iframe) { + // const body = iframe.contentDocument.body; + // const html = iframe.contentDocument.documentElement; + // + // const height = Math.max( + // body.scrollHeight, + // body.offsetHeight, + // html.clientHeight, + // html.scrollHeight, + // html.offsetHeight + // ); + // + // iframe.style.height = height + "px"; + //} + + + // Add event listeners for iframe load + monsterIframe.addEventListener("load", function () { + resizeIframe(monsterIframe); + }); + + breedingIframe.addEventListener("load", function () { + resizeIframe(breedingIframe); + }); }); diff --git a/static/style/output.css b/static/style/output.css index 5020404..b5792f4 100644 --- a/static/style/output.css +++ b/static/style/output.css @@ -548,6 +548,14 @@ video { grid-column: span 1 / span 1; } +.float-right { + float: right; +} + +.float-left { + float: left; +} + .m-4 { margin: 1rem; } @@ -568,6 +576,18 @@ video { margin-top: 1rem; } +.mt-6 { + margin-top: 1.5rem; +} + +.mt-8 { + margin-top: 2rem; +} + +.mt-20 { + margin-top: 5rem; +} + .flex { display: flex; } @@ -580,10 +600,52 @@ video { height: auto; } +.h-fit { + height: -moz-fit-content; + height: fit-content; +} + +.h-10 { + height: 2.5rem; +} + +.h-96 { + height: 24rem; +} + +.h-1\/2 { + height: 50%; +} + +.h-3\/4 { + height: 75%; +} + +.h-max { + height: -moz-max-content; + height: max-content; +} + .w-auto { width: auto; } +.flex-1 { + flex: 1 1 0%; +} + +.flex-auto { + flex: 1 1 auto; +} + +.flex-initial { + flex: 0 1 auto; +} + +.resize { + resize: both; +} + .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } @@ -596,6 +658,14 @@ video { gap: 0.25rem; } +.gap-4 { + gap: 1rem; +} + +.overflow-hidden { + overflow: hidden; +} + .rounded-md { border-radius: 0.375rem; } @@ -636,6 +706,16 @@ video { line-height: 2rem; } +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} + .font-black { font-weight: 900; } diff --git a/templates/breeding.html b/templates/breeding.html index 94c748d..fc022e9 100644 --- a/templates/breeding.html +++ b/templates/breeding.html @@ -8,17 +8,15 @@