diff --git a/static/theme.css b/static/theme.css index 01308fc..f1baaa5 100644 --- a/static/theme.css +++ b/static/theme.css @@ -35,6 +35,11 @@ a { text-decoration: none; } +p { + margin-top: 0.7em; + margin-bottom: 0.7em; +} + table { border-collapse: collapse; width: 100%; @@ -80,6 +85,8 @@ table.form > * > tr > td, th { .comment { margin-left: 20px; + margin-top: 15px; + margin-bottom: 15px; padding-left: 10px; border-left: 1px dotted; } @@ -103,3 +110,21 @@ table.form > * > tr > td, th { .login input[type=text], .login input[type=password] { width: 90%; } + +/* Abuse checkboxes to collapse comments */ +.collapse { + appearance: none; +} +.collapse:checked + * { + display: none +} +.collapse:after { + content: '[-]'; +} +.collapse:checked:after { + content: '[+]'; +} + +.small { + font-size: 85%; +} diff --git a/templates/comment.html b/templates/comment.html index c52cef9..d67ca67 100644 --- a/templates/comment.html +++ b/templates/comment.html @@ -3,36 +3,37 @@ {%- endmacro -%} {%- macro comment_author(comment, thread_id, can_delete) -%} -
- {{- author(comment.author_id, comment.author, comment.create_time, comment.modify_time) }} | - {# Suffixing a # prevents unnecessary reloads #} - thread - {%- if comment.parent_id is not none -%} - parent - {%- endif -%} - {%- if user is not none and (comment.author_id == user.id or user.is_moderator()) and not user.is_banned() -%} - edit - {%- if can_delete -%} - delete - {%- endif -%} - {%- endif -%} -
+ +{{- author(comment.author_id, comment.author, comment.create_time, comment.modify_time) }} | +{# Suffixing a # prevents unnecessary reloads #} + thread +{%- if comment.parent_id is not none -%} + parent +{%- endif -%} +{%- if user is not none and (comment.author_id == user.id or user.is_moderator()) and not user.is_banned() -%} + edit +{%- if can_delete -%} + delete +{%- endif -%} +{%- endif -%} + {%- endmacro -%} {%- macro thread_author(author_id, name, ctime, mtime) -%} -- {{- author(author_id, name, ctime, mtime) -}} - {%- if user is not none and (author_id == user.id or user.is_moderator()) and not user.is_banned() -%} - edit - delete - {%- endif -%} -
+ +{{- author(author_id, name, ctime, mtime) -}} +{%- if user is not none and (author_id == user.id or user.is_moderator()) and not user.is_banned() -%} + edit + delete +{%- endif -%} + {%- endmacro -%} {%- macro render_comment_pre(comment, thread_id, can_delete) -%}
{{- minimd(comment.text) | safe -}}
+{{- comment_author(comment, thread_id, can_delete) -}} + +