From d4d356a040c0787b2062c686ee8f02f7b63f0660 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 18 Oct 2010 09:10:54 +0200 Subject: [PATCH] =?utf8?q?Hide=20all=20reply=20input=20fields,=20add=20?= =?utf8?q?=E2=80=9Ccomment=E2=80=9D=20button.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/css/sone.css | 14 +++++++++++++- src/main/resources/templates/index.html | 6 ++++++ 2 files changed, 19 insertions(+), 1 deletion(-) 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"); }); -- 2.7.4