aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorrr-2016-09-10 11:34:11 +0200
committerrr-2016-09-10 11:36:51 +0200
commit0f0e6c4e2434a89b84a345129225f7ff0720531c (patch)
tree6cae65af9b9686e4a64f5cca528d16523e88e811 /client
parent19eea226a654a6dc96c0556301ec880303632dad (diff)
client/posts: add border around tagless posts
Diffstat (limited to 'client')
-rw-r--r--client/css/colors.styl2
-rw-r--r--client/css/post-list-view.styl9
-rw-r--r--client/html/posts_page.tpl8
3 files changed, 11 insertions, 8 deletions
diff --git a/client/css/colors.styl b/client/css/colors.styl
index d2f8e94..ed68e41 100644
--- a/client/css/colors.styl
+++ b/client/css/colors.styl
@@ -28,6 +28,8 @@ $button-enabled-text-color = white
$button-enabled-background-color = $main-color
$button-disabled-text-color = #666
$button-disabled-background-color = #CCC
+$post-thumbnail-border-color = $main-color
+$post-thumbnail-no-tags-border-color = #F44
$default-tag-category-background-color = $active-tab-background-color
$new-tag-background-color = #DFC
$new-tag-text-color = black
diff --git a/client/css/post-list-view.styl b/client/css/post-list-view.styl
index f8da90a..b18fa64 100644
--- a/client/css/post-list-view.styl
+++ b/client/css/post-list-view.styl
@@ -88,15 +88,18 @@
height: 100%
outline-offset: -3px
+ .thumbnail-wrapper.no-tags
+ .thumbnail
+ outline: 4px solid $post-thumbnail-no-tags-border-color
+
&:hover
- background: $main-color
+ background: $post-thumbnail-border-color
.thumbnail
opacity: .9
&:hover a, a:active, a:focus
- box-shadow: 0 0 0 1px $main-color
.thumbnail
- outline: 3px solid $main-color
+ outline: 4px solid $main-color !important
.post-list-header
white-space: nowrap
diff --git a/client/html/posts_page.tpl b/client/html/posts_page.tpl
index 438ba5a..e6e5612 100644
--- a/client/html/posts_page.tpl
+++ b/client/html/posts_page.tpl
@@ -3,11 +3,9 @@
<ul>
<% for (let post of ctx.results) { %>
<li>
- <% if (ctx.canViewPosts) { %>
- <a class='thumbnail-wrapper' href='<%= ctx.getPostUrl(post.id, ctx.parameters) %>' title='@<%- post.id %> (<%- post.type %>)&#10;&#10;Tags: <%- post.tags.map(tag => '#' + tag).join(' ') %>'>
- <% } else { %>
- <a class='thumbnail-wrapper'>
- <% } %>
+ <a class='thumbnail-wrapper <%= post.tags.length > 0 ? "tags" : "no-tags" %>'
+ title='@<%- post.id %> (<%- post.type %>)&#10;&#10;Tags: <%- post.tags.map(tag => '#' + tag).join(' ') || 'none' %>'
+ href='<%= ctx.canViewPosts ? ctx.getPostUrl(post.id, ctx.parameters) : "" %>'>
<%= ctx.makeThumbnail(post.thumbnailUrl) %>
<span class='type' data-type='<%- post.type %>'>
<%- post.type %>

© 2015 - 2026 Jakob L. Kreuze