소스 검색

auto-push

Coldiary 5 년 전
부모
커밋
4e8698da73

+ 6
- 2
app/View/Layouts/default.ctp 파일 보기

@@ -71,8 +71,12 @@
71 71
 			</div><!-- /.container-fluid -->
72 72
 		</nav>
73 73
 	</div>
74
-	<div class="pointmark current"></div>
75
-	<div class="pointmark next"></div>
74
+	<a class="scrollToTop"><i class="fa fa-arrow-circle-o-up"></i></a>
75
+	<div id="pointmark">
76
+		<a href="#" class="pointmark-trigger"><i class="fa fa-2x fa-play"></i></a>
77
+		<div class="pointmark current"></div>
78
+		<div class="pointmark next"></div>
79
+	</div>
76 80
 	<div id="content" class="container">
77 81
 		<?php echo $this->Session->flash(); ?>
78 82
 		<?php echo $this->fetch('content'); ?>

+ 0
- 2
app/tmp/cache/persistent/app_cake_core_cake_dev_en-us 파일 보기

@@ -1,2 +0,0 @@
1
-1447082594
2
-a:1:{s:11:"LC_MESSAGES";a:0:{}}

+ 1
- 1
app/tmp/cache/persistent/app_cake_core_file_map 파일 보기

@@ -1,2 +1,2 @@
1
-1447089381
1
+1447338679
2 2
 a:45:{s:9:"Configure";s:74:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Core/Configure.php";s:4:"Hash";s:72:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/Hash.php";s:5:"Cache";s:71:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Cache/Cache.php";s:10:"FileEngine";s:83:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Cache/Engine/FileEngine.php";s:11:"CacheEngine";s:77:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Cache/CacheEngine.php";s:9:"Inflector";s:77:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/Inflector.php";s:12:"ErrorHandler";s:78:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Error/ErrorHandler.php";s:7:"CakeLog";s:71:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Log/CakeLog.php";s:19:"LogEngineCollection";s:83:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Log/LogEngineCollection.php";s:16:"ObjectCollection";s:84:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/ObjectCollection.php";s:7:"FileLog";s:78:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Log/Engine/FileLog.php";s:7:"BaseLog";s:78:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Log/Engine/BaseLog.php";s:16:"CakeLogInterface";s:80:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Log/CakeLogInterface.php";s:8:"Debugger";s:76:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/Debugger.php";s:8:"CakeText";s:76:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/CakeText.php";s:10:"Dispatcher";s:78:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php";s:17:"CakeEventListener";s:83:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Event/CakeEventListener.php";s:11:"CakeRequest";s:79:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Network/CakeRequest.php";s:12:"CakeResponse";s:80:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Network/CakeResponse.php";s:9:"CakeEvent";s:75:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Event/CakeEvent.php";s:16:"CakeEventManager";s:82:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Event/CakeEventManager.php";s:15:"AssetDispatcher";s:90:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/Filter/AssetDispatcher.php";s:16:"DispatcherFilter";s:84:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/DispatcherFilter.php";s:15:"CacheDispatcher";s:90:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/Filter/CacheDispatcher.php";s:6:"Router";s:74:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/Router.php";s:9:"CakeRoute";s:83:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Routing/Route/CakeRoute.php";s:10:"CakePlugin";s:75:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php";s:15:"PagesController";s:58:"/home/kod3/work/vitrine/app/Controller/PagesController.php";s:13:"AppController";s:56:"/home/kod3/work/vitrine/app/Controller/AppController.php";s:10:"Controller";s:81:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Controller/Controller.php";s:6:"Object";s:71:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Core/Object.php";s:19:"ComponentCollection";s:90:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Controller/ComponentCollection.php";s:16:"SessionComponent";s:97:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Controller/Component/SessionComponent.php";s:9:"Component";s:80:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Controller/Component.php";s:14:"FlashComponent";s:95:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Controller/Component/FlashComponent.php";s:4:"View";s:69:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/View.php";s:16:"HelperCollection";s:81:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/HelperCollection.php";s:9:"ViewBlock";s:74:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/ViewBlock.php";s:13:"HtmlExtHelper";s:57:"/home/kod3/work/vitrine/app/View/Helper/HtmlExtHelper.php";s:10:"HtmlHelper";s:83:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/Helper//HtmlHelper.php";s:9:"AppHelper";s:53:"/home/kod3/work/vitrine/app/View/Helper/AppHelper.php";s:6:"Helper";s:71:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/Helper.php";s:13:"ClassRegistry";s:81:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Utility/ClassRegistry.php";s:13:"SessionHelper";s:85:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/View/Helper/SessionHelper.php";s:11:"CakeSession";s:88:"/home/kod3/work/vitrine/vendor/cakephp/cakephp/lib/Cake/Model/Datasource/CakeSession.php";}

+ 33
- 2
app/webroot/css/style.css 파일 보기

@@ -4,15 +4,29 @@ textarea { resize: vertical; }
4 4
 .pointmark {
5 5
 	width: 100%;
6 6
 	height: 100%;
7
-	z-index: -1;
7
+	z-index: -42;
8 8
 	position: absolute;
9 9
 	top: 0;
10 10
 	left: 0;
11 11
 	transition: all 1s;
12
-	background: url(http://lorempixel.com/g/1920/1080/) fixed center no-repeat;
12
+	background: url(http://lorempixel.com/g/1920/1080/) fixed center repeat;
13 13
 	background-size: cover;
14 14
 }
15 15
 
16
+.pointmark-trigger {
17
+	position: absolute;
18
+	z-index: 42;
19
+	bottom: 10px;
20
+	right: 10px;
21
+	color: rgba(255, 255, 255, 0.5);
22
+	transition: all 0.5s;
23
+}
24
+
25
+.pointmark-trigger:hover {
26
+	text-shadow: 0px 0px 20px #fff;
27
+	color: rgba(255, 255, 255, 0.5);
28
+}
29
+
16 30
 #content {
17 31
 	margin-bottom: 10px;
18 32
 	padding: 20px 50px;
@@ -150,4 +164,21 @@ textarea { resize: vertical; }
150 164
 	border-top: 2px solid #333;
151 165
 	text-align: center;
152 166
 	line-height: 50px;
167
+}
168
+
169
+.scrollToTop {
170
+	position: absolute;
171
+	bottom: 10px;
172
+	left: 10px;
173
+	font-size: 30pt;
174
+	right: 50px;
175
+	color: #777;
176
+	z-index: 10;
177
+	display: none;
178
+	cursor: pointer;
179
+}
180
+
181
+.scrollToTop:hover {
182
+	color: #777;
183
+	text-shadow: 0px 0px 5px #a8a8a8; 
153 184
 }

+ 69
- 8
app/webroot/js/script.js 파일 보기

@@ -1,9 +1,70 @@
1
-$(function() {
2
-	setInterval(function() {
3
-		$('.pointmark.old').remove();
4
-		$('.pointmark.current').css('left', '-100%').addClass('old');
5
-		$('.pointmark.next').css('left', '0').removeClass('next').addClass('current');
6
-		$('<div>', {class: 'pointmark next'}).css('left', '100%').css('background', 'url(http://lorempixel.com/g/1920/1080/?='+ Math.random() + ') fixed center no-repeat').appendTo($('body'));
7
-	}, 5000);
8
-	console.log('ready');
1
+//$(function() {
2
+document.addEventListener("DOMContentLoaded", function() {
3
+
4
+	function changeBg() {
5
+		var url = 'http://lorempixel.com/1920/1080/?='+ Math.random();
6
+		//$('.pointmark.old').remove();
7
+		var old = document.querySelector('.pointmark.old');
8
+		if (old)
9
+			old.parentNode.removeChild(old);
10
+
11
+		//$('.pointmark.current').css('left', '-100%').removeClass('current').addClass('old');
12
+		var current = document.querySelector('.pointmark.current');
13
+		current.style.left = '-100%';
14
+		current.classList.remove('current');
15
+		current.classList.add('old');
16
+
17
+		//$('.pointmark.next').css('left', '0').removeClass('next').addClass('current');
18
+		var next = document.querySelector('.pointmark.next');
19
+		next.style.left = '0';
20
+		next.classList.remove('next');
21
+		next.classList.add('current');
22
+
23
+		var next = document.createElement('div');
24
+		next.classList.add('pointmark');
25
+		next.classList.add('next');
26
+		next.style.left = '100%';
27
+		next.style.background = 'url(' + url +') fixed center no-repeat';
28
+		document.getElementById('pointmark').appendChild(next);
29
+		//$('<div>', { class: 'pointmark next' }).css('left', '100%').css('background', 'url(' + url +') fixed center no-repeat').appendTo($('#pointmark'));
30
+	}
31
+
32
+	function slideStart() { return setInterval(changeBg, 5000); };
33
+
34
+	var slide;
35
+
36
+	//$('.pointmark-trigger').on('click', function() {\
37
+	document.getElementsByClassName("pointmark-trigger")[0].addEventListener('click', function(e) {
38
+		if (slide) {
39
+			clearInterval(slide);
40
+			slide = null;
41
+			e.target.classList.remove('fa-pause');
42
+			e.target.classList.add('fa-play');
43
+			//$(this).find('i').removeClass('fa-pause').addClass('fa-play');
44
+		} else {
45
+			changeBg();
46
+			slide = slideStart();
47
+			e.target.classList.remove('fa-play');
48
+			e.target.classList.add('fa-pause');
49
+			//$(this).find('i').removeClass('fa-play').addClass('fa-pause');
50
+		}
51
+	});
52
+});
53
+
54
+$(document).ready(function(){
55
+	//Check to see if the window is top if not then display button
56
+	$(window).scroll(function(){
57
+		if ($(this).scrollTop() > 100) {
58
+			$('.scrollToTop').fadeIn();
59
+		} else {
60
+			$('.scrollToTop').fadeOut();
61
+		}
62
+	});
63
+	
64
+	//Click event to scroll to top
65
+	$('.scrollToTop').click(function(){
66
+		$('html, body').animate({scrollTop : 0},800);
67
+		return false;
68
+	});
69
+	
9 70
 });