Skip to content

Commit

Permalink
improve the addCollection overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuther committed Nov 4, 2017
1 parent ba6f4a1 commit 37e359e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
8 changes: 7 additions & 1 deletion scss/theme/_plugin-fixes.scss
Expand Up @@ -107,6 +107,7 @@ ul#thumbnails .gthumb a img.thumbnail {

.card-thumbnail .addCollection {
opacity: 0;
transition: opacity 0.25s ease-in;
z-index: 1;
width: 100%;
position: absolute;
Expand All @@ -115,10 +116,15 @@ ul#thumbnails .gthumb a img.thumbnail {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
background-color: rgba(0, 0, 0, 0.5);
color: $yellow;
background-color: rgba(0, 0, 0, 0.6);
&:hover {
opacity: 0.9;
}
> span {
color: #fff;
font-size: 0.9rem;
}
}
.card-thumbnail a:hover {
.addCollection {
Expand Down
2 changes: 1 addition & 1 deletion template/thumbnails.tpl
Expand Up @@ -28,7 +28,7 @@
<a href="{$thumbnail.URL}" data-index="{$idx}" class="ripple{if $smarty.cookies.view != 'list'} d-block{/if}">
<img class="{if $smarty.cookies.view == 'list'}card-img-left{else}card-img-top{/if}" {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}themes/bootstrap_darkroom/img/transparent.png" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
{if isset($loaded_plugins['UserCollections']) && !isset($U_LOGIN)}
<div class="fa fa-star-o addCollection" data-id="{$thumbnail.id}" data-cols="[{$thumbnail.COLLECTIONS}]"><span class="text-muted ml-2">{'Collections'|@translate}</span></div>
<div class="fa fa-star addCollection" data-id="{$thumbnail.id}" data-cols="[{$thumbnail.COLLECTIONS}]"><span class="ml-2">{'Collections'|@translate}</span></div>
{/if}
</a>
{assign var=idx value=$idx+1}
Expand Down
9 changes: 8 additions & 1 deletion theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions theme.css.map

Large diffs are not rendered by default.

0 comments on commit 37e359e

Please sign in to comment.