forked from ayorishy/Nosky-Typecho-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphoto.php
87 lines (74 loc) · 2.81 KB
/
photo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/**
* 图库模板
*
* @package custom
*/
?>
<?php $this->need('public/secheader.php'); ?>
<div id="main-container" class="animate__animated animate__fadeIn">
<div id="photos" class="clear">
<div class='image-item' data-src='<?php $this->options->photo1() ?>' style='background-image:url(<?php $this->options->photo1() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo2() ?>' style='background-image:url(<?php $this->options->photo2() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo3() ?>' style='background-image:url(<?php $this->options->photo3() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo4() ?>' style='background-image:url(<?php $this->options->photo4() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo5() ?>' style='background-image:url(<?php $this->options->photo5() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo6() ?>' style='background-image:url(<?php $this->options->photo6() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo7() ?>' style='background-image:url(<?php $this->options->photo7() ?>)'>
</div>
<div class='image-item' data-src='<?php $this->options->photo8() ?>' style='background-image:url(<?php $this->options->photo8() ?>)'>
</div>
<div id="photo-cover">
<div id="photo-cover-container">
<img src=""></img>
</div>
</div>
</div>
<script>
$('.image-item').click(function(){
$("#photo-cover img").attr("src",$(this).attr("data-src"));
$("#photo-cover").fadeIn();
})
$("#photo-cover").click(function(){
$(this).fadeOut();
})
</script>
</div>
<div class="footer-text">all done~</div>
<script>
//手机端导航栏控制函数
$("#m-nav-switch").click(function(){
if($("#header-nav-m").css("display")=='none'){
$("#header-nav-m").slideDown();
$(this).animate(
{opacity:'toggle'},
200,
null,
function(){
$("#m-nav-switch").attr("src","<?php $this->options->siteUrl(); ?>/usr/themes/nosky/assets/img/x.svg");
$("#m-nav-switch").animate({opacity:'toggle'},200);
}
);
}else{
$("#header-nav-m").slideUp();
$(this).animate(
{opacity:'toggle'},
200,
null,
function(){
$("#m-nav-switch").attr("src","<?php $this->options->siteUrl(); ?>/usr/themes/nosky/assets/img/menu.svg");
$("#m-nav-switch").animate({opacity:'toggle'},200);
}
);
}
});
</script>
</div>
</body>
</html>