client/posts: add border around tagless posts

This commit is contained in:
rr- 2016-09-10 11:34:11 +02:00
parent 19eea226a6
commit 0f0e6c4e24
3 changed files with 11 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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 %>