tune up the honk form
Ted Unangst tedu@tedunangst.com
Sun, 02 Jun 2019 14:51:02 -0400
2 files changed,
4 insertions(+),
5 deletions(-)
M
views/honkform.html
→
views/honkform.html
@@ -5,10 +5,11 @@ <p>
in reply to: <input type="text" name="rid" id="ridinput" value="" autocomplete=off> <input type="hidden" name="CSRF" value="{{ .HonkCSRF }}"> <p> +<label id="donker">attach: <input onchange="updatedonker();" type="file" name="donk"><span></span></label> +<p> <textarea name="noise" id="honknoise"></textarea> <p> <input type="submit" value="it's gonna be honked"> -<label id="donker" style="margin-left:4em;">attach: <input onchange="updatedonker();" type="file" name="donk"><span></span></label> </form> <script> function showhonkform(rid, hname) {@@ -27,6 +28,6 @@ document.getElementById("infobox").scrollIntoView()
} function updatedonker() { var el = document.getElementById("donker") - el.children[1].textContent = el.children[0].value + el.children[1].textContent = el.children[0].value.slice(-20) } </script>
M
views/style.css
→
views/style.css
@@ -82,6 +82,7 @@ width: 600px;
height: 8em; margin-bottom: 0.5em; box-sizing: border-box; + max-width: 100%; } .info input[type="checkbox"] { position: fixed;@@ -174,9 +175,6 @@ }
@media screen and (max-width: 740px) { body { font-size: 12px; - } - .info textarea { - width: 20em; } .honk header { height: 48px;