diff --git a/public/css/classes.css b/public/css/classes.css index 7da4042..d1fbc34 100644 --- a/public/css/classes.css +++ b/public/css/classes.css @@ -59,9 +59,8 @@ border-radius: 10px; } -input, -select { - width: 50%; +textarea { + width: 85%; appearance: none; outline: none; font-family: inherit; @@ -71,8 +70,4 @@ select { -webkit-box-shadow: 0 0 20px #f5a97f; -moz-box-shadow: 0 0 20px #f5a97f; box-shadow: 0 0 20px #f5a97f; -} - -select { - width: unset } \ No newline at end of file diff --git a/public/scripts/limepot.js b/public/scripts/limepot.js index 0fa7818..41390c4 100644 --- a/public/scripts/limepot.js +++ b/public/scripts/limepot.js @@ -22,4 +22,16 @@ let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test( let disclaimer = `
`; if (chromium) window.location.replace("/nochrome"); +} + +// Resizable textarea +const tx = document.getElementsByTagName("textarea"); +for (let i = 0; i < tx.length; i++) { + tx[i].setAttribute("style", "height:" + (tx[i].scrollHeight) + "px;overflow-y:hidden;"); + tx[i].addEventListener("input", OnInput, false); +} + +function OnInput() { + this.style.height = 'auto'; + this.style.height = (this.scrollHeight) + "px"; } \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 0e26d47..b5771df 100755 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -66,8 +66,8 @@ import Layout from "../layouts/Layout.astro";

==> Youtube


-

send me a notification! put word and press send

- send +

send me a notification! type words and press send

+ send