File tree 5 files changed +64
-3
lines changed
5 files changed +64
-3
lines changed Original file line number Diff line number Diff line change
1
+ img [data-action = "zoom" ] {
2
+ cursor : pointer;
3
+ cursor : -webkit-zoom-in;
4
+ cursor : -moz-zoom-in;
5
+ }
6
+ .zoom-img ,
7
+ .zoom-img-wrap {
8
+ position : relative;
9
+ z-index : 666 ;
10
+ -webkit-transition : all 300ms ;
11
+ -o-transition : all 300ms ;
12
+ transition : all 300ms ;
13
+ }
14
+ img .zoom-img {
15
+ cursor : pointer;
16
+ cursor : -webkit-zoom-out;
17
+ cursor : -moz-zoom-out;
18
+ }
19
+ .zoom-overlay {
20
+ z-index : 420 ;
21
+ background : # fff ;
22
+ position : fixed;
23
+ top : 0 ;
24
+ left : 0 ;
25
+ right : 0 ;
26
+ bottom : 0 ;
27
+ pointer-events : none;
28
+ filter : "alpha(opacity=0)" ;
29
+ opacity : 0 ;
30
+ -webkit-transition : opacity 300ms ;
31
+ -o-transition : opacity 300ms ;
32
+ transition : opacity 300ms ;
33
+ }
34
+ .zoom-overlay-open .zoom-overlay {
35
+ filter : "alpha(opacity=100)" ;
36
+ opacity : 1 ;
37
+ }
38
+ .zoom-overlay-open ,
39
+ .zoom-overlay-transitioning {
40
+ cursor : default;
41
+ }
Original file line number Diff line number Diff line change 160
160
var url = $ ( this ) . attr ( 'href' ) ;
161
161
$ ( this ) . attr ( 'target' , '_blank' ) ;
162
162
} ) ;
163
+
164
+ $ ( '.comment-list .markdown img' ) . attr ( 'data-action' , 'zoom' ) ;
165
+
166
+ $ ( '.comment-list .markdown img' ) . on ( 'click' , function ( ) {
167
+ $ ( this ) . parents ( '.box_white' ) . css ( 'overflow' , 'visible' ) ;
168
+ } ) ;
163
169
}
164
170
$ ( '.comment-list .words' ) . removeClass ( 'hide' ) ;
165
171
Original file line number Diff line number Diff line change @@ -459,8 +459,12 @@ jQuery(document).ready(function($) {
459
459
460
460
// 图片响应式
461
461
setTimeout ( function ( ) {
462
- $ ( '.page .content img' ) . addClass ( 'img-responsive' ) ;
463
- } , 2000 ) ;
462
+ $ ( '.page .content img' ) . addClass ( 'img-responsive' ) . attr ( 'data-action' , 'zoom' ) ;
463
+
464
+ $ ( '.page .content img' ) . on ( 'click' , function ( ) {
465
+ $ ( this ) . parents ( '.box_white' ) . css ( 'overflow' , 'visible' ) ;
466
+ } ) ;
467
+ } , 1000 ) ;
464
468
465
469
// 表格响应式
466
470
setTimeout ( function ( ) {
Original file line number Diff line number Diff line change 17
17
<!--<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">-->
18
18
< link rel ="stylesheet " href ="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css ">
19
19
< link href ="/static/css/main.css?v=1.4 " rel ="stylesheet "/>
20
+ < link href ="/static/css/zoom.css " rel ="stylesheet "/>
20
21
{{template "css" .}}
21
22
< style type ="text/css ">
22
23
# bottom .nav-content {
252
253
< script type ="text/javascript " src ="/static/js/libs/bootstrap-3.2.0.min.js "> </ script >
253
254
< script src ="/static/js/libs/jquery.timeago.js?v=1.5.4 "> </ script >
254
255
< script src ="/static/js/libs/jquery.timeago.zh-CN.js?v=1.5.4 "> </ script >
256
+ < script src ="/static/js/libs/zoom.min.js "> </ script >
255
257
< script src ="/static/js/libs/md5.js "> </ script >
256
258
< script type ="text/javascript ">
257
259
var uid = { { . me . Uid} } ;
264
266
}
265
267
var GLaunchTime = { { timestamp . app . LaunchTime } } * 1000 ;
266
268
</ script >
267
- < script src ="/static/js/common.js?v=1.2 "> </ script >
269
+ < script src ="/static/js/common.js?v=1.7 "> </ script >
268
270
< script src ="//cdn.bootcss.com/lscache/1.1.0/lscache.min.js "> </ script >
269
271
< script type ="text/javascript " src ="/static/js/libs/paste-upload-image.js "> </ script >
270
272
{{template "js" .}}
You can’t perform that action at this time.
0 commit comments