Skip to content

Commit 046d4b8

Browse files
committed
Site updated: 2017-02-14 10:20:34
1 parent be012c2 commit 046d4b8

File tree

107 files changed

+4518
-17897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+4518
-17897
lines changed

2017/02/12/听听,一款优雅的开源音乐播放器/index.html

Lines changed: 276 additions & 899 deletions
Large diffs are not rendered by default.

archives/2017/02/index.html

Lines changed: 250 additions & 767 deletions
Large diffs are not rendered by default.

archives/2017/index.html

Lines changed: 250 additions & 767 deletions
Large diffs are not rendered by default.

archives/index.html

Lines changed: 250 additions & 767 deletions
Large diffs are not rendered by default.

css/fonts/fontawesome-webfont.eot

41.3 KB
Binary file not shown.

css/fonts/fontawesome-webfont.svg

Lines changed: 175 additions & 0 deletions
Loading

css/fonts/fontawesome-webfont.svgz

21.3 KB
Binary file not shown.

css/fonts/fontawesome-webfont.ttf

40.9 KB
Binary file not shown.

css/fonts/fontawesome-webfont.woff

22.9 KB
Binary file not shown.

css/main.css

Lines changed: 0 additions & 2770 deletions
This file was deleted.

css/style.css

Lines changed: 2294 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/fancybox/source/helpers/jquery.fancybox-buttons.js renamed to fancybox/helpers/jquery.fancybox-buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* });
1414
*
1515
*/
16-
(function ($) {
16+
;(function ($) {
1717
//Shortcut for fancyBox object
1818
var F = $.fancybox;
1919

lib/fancybox/source/helpers/jquery.fancybox-media.js renamed to fancybox/helpers/jquery.fancybox-media.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
6363
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
6464
*/
65-
(function ($) {
65+
;(function ($) {
6666
"use strict";
6767

6868
//Shortcut for fancyBox object

lib/fancybox/source/helpers/jquery.fancybox-thumbs.js renamed to fancybox/helpers/jquery.fancybox-thumbs.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* });
1515
*
1616
*/
17-
(function ($) {
17+
;(function ($) {
1818
//Shortcut for fancyBox object
1919
var F = $.fancybox;
2020

@@ -62,7 +62,8 @@
6262

6363
//Load each thumbnail
6464
$.each(obj.group, function (i) {
65-
var href = thumbSource( obj.group[ i ] );
65+
var el = obj.group[ i ],
66+
href = thumbSource( el );
6667

6768
if (!href) {
6869
return;
@@ -105,7 +106,9 @@
105106

106107
$(this).hide().appendTo(parent).fadeIn(300);
107108

108-
}).attr('src', href);
109+
})
110+
.attr('src', href)
111+
.attr('title', el.title);
109112
});
110113

111114
//Set initial width

lib/fancybox/source/jquery.fancybox.css renamed to fancybox/jquery.fancybox.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
}
7777

7878
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79-
background-image: url('fancybox_sprite.png');
79+
background-image: url(fancybox_sprite.png);
8080
}
8181

8282
#fancybox-loading {
@@ -94,7 +94,7 @@
9494
#fancybox-loading div {
9595
width: 44px;
9696
height: 44px;
97-
background: url('fancybox_loading.gif') center center no-repeat;
97+
background: url(fancybox_loading.gif) center center no-repeat;
9898
}
9999

100100
.fancybox-close {
@@ -114,7 +114,7 @@
114114
height: 100%;
115115
cursor: pointer;
116116
text-decoration: none;
117-
background: transparent url('blank.gif'); /* helps IE */
117+
background: transparent url(blank.gif); /* helps IE */
118118
-webkit-tap-highlight-color: rgba(0,0,0,0);
119119
z-index: 8040;
120120
}
@@ -156,7 +156,6 @@
156156
position: absolute;
157157
top: -99999px;
158158
left: -99999px;
159-
visibility: hidden;
160159
max-width: 99999px;
161160
max-height: 99999px;
162161
overflow: visible !important;
@@ -165,7 +164,7 @@
165164
/* Overlay helper */
166165

167166
.fancybox-lock {
168-
overflow: hidden !important;
167+
overflow: visible !important;
169168
width: auto;
170169
}
171170

@@ -184,7 +183,7 @@
184183
overflow: hidden;
185184
display: none;
186185
z-index: 8010;
187-
background: url('fancybox_overlay.png');
186+
background: url(fancybox_overlay.png);
188187
}
189188

190189
.fancybox-overlay-fixed {
@@ -234,7 +233,7 @@
234233
color: #FFF;
235234
font-weight: bold;
236235
line-height: 24px;
237-
white-space: nowrap;
236+
text-align: left;
238237
}
239238

240239
.fancybox-title-outside-wrap {
@@ -263,12 +262,12 @@
263262
only screen and (min-device-pixel-ratio: 1.5){
264263

265264
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
266-
background-image: url('[email protected]');
265+
background-image: url([email protected]);
267266
background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
268267
}
269268

270269
#fancybox-loading div {
271-
background-image: url('[email protected]');
270+
background-image: url([email protected]);
272271
background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
273272
}
274273
}

lib/fancybox/source/jquery.fancybox.js renamed to fancybox/jquery.fancybox.js

Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* fancyBox - jQuery Plugin
33
* version: 2.1.5 (Fri, 14 Jun 2013)
4-
* @requires jQuery v1.6 or later
4+
* requires jQuery v1.6 or later
55
*
66
* Examples at http://fancyapps.com/fancybox/
77
* License: www.fancyapps.com/fancybox/#license
@@ -10,7 +10,7 @@
1010
*
1111
*/
1212

13-
(function (window, document, $, undefined) {
13+
;(function (window, document, $, undefined) {
1414
"use strict";
1515

1616
var H = $("html"),
@@ -143,7 +143,8 @@
143143
error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
144144
closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
145145
next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
146-
prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
146+
prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
147+
loading : '<div id="fancybox-loading"><div></div></div>'
147148
},
148149

149150
// Properties for each animation type
@@ -261,7 +262,7 @@
261262
if (isQuery(element)) {
262263
obj = {
263264
href : element.data('fancybox-href') || element.attr('href'),
264-
title : element.data('fancybox-title') || element.attr('title'),
265+
title : $('<div/>').text( element.data('fancybox-title') || element.attr('title') || '' ).html(),
265266
isDom : true,
266267
element : element
267268
};
@@ -363,12 +364,16 @@
363364
cancel: function () {
364365
var coming = F.coming;
365366

366-
if (!coming || false === F.trigger('onCancel')) {
367+
if (coming && false === F.trigger('onCancel')) {
367368
return;
368369
}
369370

370371
F.hideLoading();
371372

373+
if (!coming) {
374+
return;
375+
}
376+
372377
if (F.ajaxLoad) {
373378
F.ajaxLoad.abort();
374379
}
@@ -546,7 +551,7 @@
546551
},
547552

548553
update: function (e) {
549-
var type = (e && e.type),
554+
var type = (e && e.originalEvent && e.originalEvent.type),
550555
anyway = !type || type === 'orientationchange';
551556

552557
if (anyway) {
@@ -610,7 +615,7 @@
610615

611616
F.hideLoading();
612617

613-
el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
618+
el = $(F.opts.tpl.loading).click(F.cancel).appendTo('body');
614619

615620
// If user will press the escape-button, the request will be canceled
616621
D.bind('keydown.loading', function(e) {
@@ -630,6 +635,8 @@
630635
left : (viewport.w * 0.5) + viewport.x
631636
});
632637
}
638+
639+
F.trigger('onLoading');
633640
},
634641

635642
getViewport: function () {
@@ -639,7 +646,7 @@
639646
y: W.scrollTop()
640647
};
641648

642-
if (locked) {
649+
if (locked && locked.length) {
643650
rez.w = locked[0].clientWidth;
644651
rez.h = locked[0].clientHeight;
645652

@@ -741,24 +748,22 @@
741748
trigger: function (event, o) {
742749
var ret, obj = o || F.coming || F.current;
743750

744-
if (!obj) {
745-
return;
746-
}
747-
748-
if ($.isFunction( obj[event] )) {
749-
ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
750-
}
751+
if (obj) {
752+
if ($.isFunction( obj[event] )) {
753+
ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
754+
}
751755

752-
if (ret === false) {
753-
return false;
754-
}
756+
if (ret === false) {
757+
return false;
758+
}
755759

756-
if (obj.helpers) {
757-
$.each(obj.helpers, function (helper, opts) {
758-
if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
759-
F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
760-
}
761-
});
760+
if (obj.helpers) {
761+
$.each(obj.helpers, function (helper, opts) {
762+
if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
763+
F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
764+
}
765+
});
766+
}
762767
}
763768

764769
D.trigger(event);
@@ -1117,7 +1122,7 @@
11171122
break;
11181123

11191124
case 'image':
1120-
content = current.tpl.image.replace('{href}', href);
1125+
content = current.tpl.image.replace(/\{href\}/g, href);
11211126
break;
11221127

11231128
case 'swf':
@@ -1426,7 +1431,7 @@
14261431

14271432
F.isOpen = F.isOpened = true;
14281433

1429-
F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
1434+
F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0);
14301435

14311436
F.update();
14321437

@@ -1465,12 +1470,13 @@
14651470

14661471
// Stop the slideshow if this is the last item
14671472
if (!current.loop && current.index === current.group.length - 1) {
1473+
14681474
F.play( false );
14691475

14701476
} else if (F.opts.autoPlay && !F.player.isActive) {
14711477
F.opts.autoPlay = false;
14721478

1473-
F.play();
1479+
F.play(true);
14741480
}
14751481
},
14761482

@@ -1703,13 +1709,17 @@
17031709

17041710
// Public methods
17051711
create : function(opts) {
1712+
var parent;
1713+
17061714
opts = $.extend({}, this.defaults, opts);
17071715

17081716
if (this.overlay) {
17091717
this.close();
17101718
}
17111719

1712-
this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
1720+
parent = F.coming ? F.coming.parent : opts.parent;
1721+
1722+
this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( parent && parent.length ? parent : 'body' );
17131723
this.fixed = false;
17141724

17151725
if (opts.fixed && F.defaults.fixed) {
@@ -1755,19 +1765,14 @@
17551765
},
17561766

17571767
close : function() {
1758-
var scrollV, scrollH;
1759-
17601768
W.unbind('resize.overlay');
17611769

17621770
if (this.el.hasClass('fancybox-lock')) {
17631771
$('.fancybox-margin').removeClass('fancybox-margin');
17641772

1765-
scrollV = W.scrollTop();
1766-
scrollH = W.scrollLeft();
1767-
17681773
this.el.removeClass('fancybox-lock');
17691774

1770-
W.scrollTop( scrollV ).scrollLeft( scrollH );
1775+
W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );
17711776
}
17721777

17731778
$('.fancybox-overlay').remove().hide();
@@ -1812,10 +1817,6 @@
18121817
}
18131818

18141819
if (opts.locked && this.fixed && obj.fixed) {
1815-
if (!overlay) {
1816-
this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
1817-
}
1818-
18191820
obj.locked = this.overlay.append( obj.wrap );
18201821
obj.fixed = false;
18211822
}
@@ -1826,23 +1827,21 @@
18261827
},
18271828

18281829
beforeShow : function(opts, obj) {
1829-
var scrollV, scrollH;
1830-
1831-
if (obj.locked) {
1832-
if (this.margin !== false) {
1830+
if (obj.locked && !this.el.hasClass('fancybox-lock')) {
1831+
if (this.fixPosition !== false) {
18331832
$('*').filter(function(){
18341833
return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
18351834
}).addClass('fancybox-margin');
1836-
1837-
this.el.addClass('fancybox-margin');
18381835
}
18391836

1840-
scrollV = W.scrollTop();
1841-
scrollH = W.scrollLeft();
1837+
this.el.addClass('fancybox-margin');
1838+
1839+
this.scrollV = W.scrollTop();
1840+
this.scrollH = W.scrollLeft();
18421841

18431842
this.el.addClass('fancybox-lock');
18441843

1845-
W.scrollTop( scrollV ).scrollLeft( scrollH );
1844+
W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );
18461845
}
18471846

18481847
this.open(opts);
@@ -1857,7 +1856,6 @@
18571856
afterClose: function (opts) {
18581857
// Remove overlay if exists and fancyBox is not opening
18591858
// (e.g., it is not being open using afterClose callback)
1860-
//if (this.overlay && !F.isActive) {
18611859
if (this.overlay && !F.coming) {
18621860
this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
18631861
}
@@ -2017,4 +2015,4 @@
20172015
$("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
20182016
});
20192017

2020-
}(window, document, jQuery));
2018+
}(window, document, jQuery));

0 commit comments

Comments
 (0)