diff --git a/bower.json b/bower.json index 0a997b7618143b177b2e00326720c861d9833721..ddec0832c332c39627198465a587fa7034e2362e 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,8 @@ "tests" ], "dependencies": { - "normalize-css": "normalize.css#^4.1.1" + "normalize-css": "normalize.css#^4.1.1", + "autosize": "^3.0.18" }, "install": { "path": "theme/static/lib" diff --git a/theme/static/css/style.css b/theme/static/css/style.css index d39917303e634b4e64ffc80e89762a1792c8289c..e33c1c738a1025221ca1ec2bcba51922c7782700 100644 --- a/theme/static/css/style.css +++ b/theme/static/css/style.css @@ -128,6 +128,17 @@ h6:first-child { margin-top: 0; } +/* Forms */ +form { + display: flex; + flex-wrap: wrap; +} +input { + flex: 1 0 10em; +} +textarea { + flex: 0 0 100%; +} /* Links */ a:link, diff --git a/theme/templates/base.html b/theme/templates/base.html index 651b1218176dbe4c16fd214934f09b15748aee0a..6450c32ef22d6d5a4fea1a1f5aa7f91cddec5ca6 100644 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -85,6 +85,10 @@ </footer> {% endif %} {% endblock %} + {% if "textarea" in self.content() %} + <script src="{{ SITEURL }}/theme/lib/autosize/autosize.js"></script> + <script>autosize(document.querySelectorAll('textarea'));</script> + {% endif %} <script src="{{ SITEURL }}/theme/js/script.js"></script> {% include 'analytics.html' %} </body>