mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Remove linked hover states.
This commit is contained in:
parent
416848c79f
commit
707ae0547a
8 changed files with 8 additions and 73 deletions
|
@ -45,7 +45,7 @@
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
img {
|
img {
|
||||||
background-color: rgba(27,27,27,0.8);
|
background-color: rgba(27,27,27,0.8);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
.bar-button {
|
.bar-button {
|
||||||
.bar-label;
|
.bar-label;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
.bar-highlight;
|
.bar-highlight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 4px 0 rgba(0,0,0,0.4);
|
box-shadow: inset 0 0 4px 0 rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
box-shadow: inset 0 0 4px 0 rgba(0,0,0,0.4);
|
box-shadow: inset 0 0 4px 0 rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
.topbar-hover;
|
.topbar-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: @col;
|
color: @col;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
color: @col-hover;
|
color: @col-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
color: @item-col-hover;
|
color: @item-col-hover;
|
||||||
background: @item-background-col-hover;
|
background: @item-background-col-hover;
|
||||||
border-color: @item-border-col-hover;
|
border-color: @item-border-col-hover;
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
color: @item-col-sel;
|
color: @item-col-sel;
|
||||||
background: @item-background-col-sel;
|
background: @item-background-col-sel;
|
||||||
|
|
||||||
&:hover, &.hover {
|
&:hover {
|
||||||
color: @item-col-sel;
|
color: @item-col-sel;
|
||||||
background: @item-background-col-sel;
|
background: @item-background-col-sel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
modulejs.define('ext/link-hover-states', ['_', '$', 'core/settings', 'core/event'], function (_, $, allsettings, event) {
|
|
||||||
|
|
||||||
var settings = _.extend({
|
|
||||||
enabled: false
|
|
||||||
}, allsettings['link-hover-states']);
|
|
||||||
var selector = "a[href^='/']";
|
|
||||||
|
|
||||||
|
|
||||||
function selectLinks(href) {
|
|
||||||
|
|
||||||
return $(_.filter($(selector), function (el) {
|
|
||||||
|
|
||||||
return $(el).attr('href') === href;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
function onMouseEnter() {
|
|
||||||
|
|
||||||
var href = $(this).attr('href');
|
|
||||||
|
|
||||||
selectLinks(href).addClass('hover');
|
|
||||||
}
|
|
||||||
|
|
||||||
function onMouseLeave() {
|
|
||||||
|
|
||||||
var href = $(this).attr('href');
|
|
||||||
|
|
||||||
selectLinks(href).removeClass('hover');
|
|
||||||
}
|
|
||||||
|
|
||||||
function onLocationChanged() {
|
|
||||||
|
|
||||||
$('.hover').removeClass('hover');
|
|
||||||
}
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
|
|
||||||
if (!settings.enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('body')
|
|
||||||
.on('mouseenter', selector, onMouseEnter)
|
|
||||||
.on('mouseleave', selector, onMouseLeave);
|
|
||||||
|
|
||||||
event.sub('location.changed', onLocationChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
init();
|
|
||||||
});
|
|
|
@ -122,7 +122,6 @@ modulejs.define('ext/preview', ['_', '$', 'core/settings', 'core/resource', 'cor
|
||||||
function onKeydown(ev) {
|
function onKeydown(ev) {
|
||||||
|
|
||||||
var key = ev.which;
|
var key = ev.which;
|
||||||
var delay = 300;
|
|
||||||
|
|
||||||
if (key === 27) { // esc
|
if (key === 27) { // esc
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
@ -131,20 +130,14 @@ modulejs.define('ext/preview', ['_', '$', 'core/settings', 'core/resource', 'cor
|
||||||
} else if (key === 8 || key === 37) { // backspace, left
|
} else if (key === 8 || key === 37) { // backspace, left
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopImmediatePropagation();
|
ev.stopImmediatePropagation();
|
||||||
$('#pv-bar-prev').addClass('hover');
|
|
||||||
setTimeout(function () { $('#pv-bar-prev').removeClass('hover'); }, delay);
|
|
||||||
onPrevious();
|
onPrevious();
|
||||||
} else if (key === 13 || key === 32 || key === 39) { // enter, space, right
|
} else if (key === 13 || key === 32 || key === 39) { // enter, space, right
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopImmediatePropagation();
|
ev.stopImmediatePropagation();
|
||||||
$('#pv-bar-next').addClass('hover');
|
|
||||||
setTimeout(function () { $('#pv-bar-next').removeClass('hover'); }, delay);
|
|
||||||
onNext();
|
onNext();
|
||||||
} else if (key === 70) { // f
|
} else if (key === 70) { // f
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopImmediatePropagation();
|
ev.stopImmediatePropagation();
|
||||||
$('#pv-bar-fullscreen').addClass('hover');
|
|
||||||
setTimeout(function () { $('#pv-bar-fullscreen').removeClass('hover'); }, delay);
|
|
||||||
onFullscreen();
|
onFullscreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,13 +163,6 @@ Options
|
||||||
"useBrowserLang": true
|
"useBrowserLang": true
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
|
||||||
Link the hover effects between crumb, main view and tree.
|
|
||||||
*/
|
|
||||||
"link-hover-states": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Adds Piwik tracker javascript code.
|
Adds Piwik tracker javascript code.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue