Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
feat: increase opacity for the floating play button, and now it can b…
Browse files Browse the repository at this point in the history
…e activated by hovering on the title.
  • Loading branch information
TerryGeng committed Apr 18, 2020
1 parent 81bfe92 commit 9640324
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 2 additions & 5 deletions static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,10 @@
margin-left: 15px;
transition: left 300ms;
border-radius: 5px;
opacity: 0.6;
opacity: 0.7;
font-weight: 300;
}
.library-thumb-img:hover + .library-thumb-grp {
left: -15px;
}
.library-thumb-grp:hover {
.library-thumb-grp-hover {
left: -15px;
}
.library-thumb-btn-up {
Expand Down
12 changes: 11 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ <h4 class="alert-heading">Filters</h4>
</div>
</div>
</div>
<div class="library-info-col col-5" style="padding: 12px 0;">
<div class="library-info-col library-info-title col-5" style="padding: 12px 0;">
<div>
<span class="library-item-type lead text-muted btn-space">[File]</span>
<span class="library-item-title lead btn-space">This is my title</span>
Expand Down Expand Up @@ -836,6 +836,16 @@ <h5 class="modal-title" id="addTagModalTitle">Edit tags for ?</h5>
var item_template = $("#library-item");

function bindLibraryResultEvent() {
$(".library-thumb-col").unbind().hover(
function (e) { $(e.currentTarget).find(".library-thumb-grp").addClass("library-thumb-grp-hover"); },
function (e) { $(e.currentTarget).find(".library-thumb-grp").removeClass("library-thumb-grp-hover"); }
);

$(".library-info-title").unbind().hover(
function (e) { $(e.currentTarget).parent().find(".library-thumb-grp").addClass("library-thumb-grp-hover"); },
function (e) { $(e.currentTarget).parent().find(".library-thumb-grp").removeClass("library-thumb-grp-hover"); }
);

$(".library-item-play").unbind().click(
function (e) {
request('post', {
Expand Down

0 comments on commit 9640324

Please sign in to comment.