From: David ‘Bombe’ Roden Date: Mon, 18 Oct 2010 07:10:54 +0000 (+0200) Subject: Hide all reply input fields, add “comment” button. X-Git-Tag: 0.1-RC1~253 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=d4d356a040c0787b2062c686ee8f02f7b63f0660 Hide all reply input fields, add “comment” button. --- diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 0947c72..9e44830 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -5,6 +5,10 @@ margin: auto; } +#sone .hidden { + display: none; +} + #sone a { color: inherit; text-decoration: none; @@ -83,7 +87,7 @@ padding: 1ex; } -#sone .post .reply div, #sone .post .time, #sone .post .delete { +#sone .post .reply div, #sone .post .time, #sone .post .delete, #sone .post .show-reply-form { font-size: inherit; /* or else fproxy's css rules will fuck us. */ } @@ -94,6 +98,14 @@ font-size: inherit; } +#sone .post .show-reply-form { + display: inline; +} + +#sone .post .show-reply-form:before { + content: ' ‧ '; +} + #sone .post .reply .status-line .delete { float: none; display: inline; diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 579281b..2b21e91 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,6 +5,12 @@ $(document).ready(function() { registerInputTextareaSwap("#sone input.createpost", "What are you doing?"); registerInputTextareaSwap("#sone input.create-reply", "Write a Reply…"); + + /* hide all the “create reply” forms until a link is clicked. */ + commentElement = $("
Comment
").addClass("show-reply-form").click(function() { + }); + $("#sone .post > .status-line .time").after(commentElement); + $("#sone .post .create-reply").addClass("hidden"); });