scratch – Diff between revs 99 and 101
?pathlinks?
Rev 99 | Rev 101 | |||
---|---|---|---|---|
1 | <!DOCTYPE html> |
1 | <!DOCTYPE html> |
|
2 | <html lang="en"> |
2 | <html lang="en"> |
|
3 | <head> |
3 | <head> |
|
4 | <meta charset="utf-8"> |
4 | <meta charset="utf-8"> |
|
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
7 | <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
7 | <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
|
8 | <meta name="description" content="quick asset upload"> |
8 | <meta name="description" content="quick asset upload"> |
|
9 | <meta name="author" content="Wizardry and Steamworks"> |
9 | <meta name="author" content="Wizardry and Steamworks"> |
|
10 | <link rel="icon" href="favicon.ico"> |
10 | <link rel="icon" href="favicon.ico"> |
|
11 | |
11 | |
|
12 | <title>scratch copy</title> |
12 | <title>scratch copy</title> |
|
13 | |
13 | |
|
14 | <!-- Bootstrap core CSS --> |
14 | <!-- Bootstrap core CSS --> |
|
15 | <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> |
15 | <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> |
|
16 | <!-- Font Awesome --> |
16 | <!-- Font Awesome --> |
|
17 | <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> |
17 | <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet"> |
|
18 | <!-- Bootstrap Toggle --> |
18 | <!-- Bootstrap Toggle --> |
|
19 | <link href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet"> |
19 | <link href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet"> |
|
20 | |
20 | |
|
21 | <!-- Site-wide style CCS --> |
21 | <!-- Site-wide style CCS --> |
|
22 | <link href="css/style.css" rel="stylesheet"> |
22 | <link href="css/style.css" rel="stylesheet"> |
|
23 | </head> |
23 | </head> |
|
24 | |
24 | |
|
25 | <body> |
25 | <body> |
|
- | 26 | <!-- Include first body content --> |
||
- | 27 | <div id="scratch-body-first"></div> |
||
26 | |
28 | |
|
27 | <!-- Main component for a primary marketing message or call to action --> |
29 | <!-- Main component for a primary marketing message or call to action --> |
|
28 | <div class="paralax-background"></div> |
30 | <div class="paralax-background"></div> |
|
29 | <div class="jumbotron"> |
31 | <div class="jumbotron"> |
|
30 | <h1>scratch copy</h1> |
32 | <h1>scratch copy</h1> |
|
31 | <p class="quote">the asset sharer</p> |
33 | <p class="quote">the asset sharer</p> |
|
32 | </div> |
34 | </div> |
|
33 | |
35 | |
|
34 | <div class="container"> |
36 | <div class="container"> |
|
35 | <div class="pull-right"> |
37 | <div class="pull-right"> |
|
36 | <input id="toggle-sound" type="checkbox"> |
38 | <input id="toggle-sound" type="checkbox"> |
|
37 | </div> |
39 | </div> |
|
38 | |
40 | |
|
39 | <ul class="nav nav-tabs"> |
41 | <ul class="nav nav-tabs"> |
|
40 | <li class="active"><a href="#">Home</a></li> |
42 | <li class="active"><a href="#">Home</a></li> |
|
41 | <li><a href="file.html">File</a></li> |
43 | <li><a href="file.html">File</a></li> |
|
42 | <li><a href="text.html">Text</a></li> |
44 | <li><a href="text.html">Text</a></li> |
|
43 | <li><a href="draw.html">Draw</a></li> |
45 | <li><a href="draw.html">Draw</a></li> |
|
44 | <li><a href="link.html">Link</a></li> |
46 | <li><a href="link.html">Link</a></li> |
|
45 | </ul> |
47 | </ul> |
|
46 | |
48 | |
|
47 | <div class="row"> |
49 | <div class="row"> |
|
48 | <h2>About</h2> |
50 | <h2>About</h2> |
|
49 | <p><strong>scratch copy</strong> is a platform for small-sized asset sharing developed by <a href="http://grimore.org">Wizardry and Steamworks</a> and published under the <a href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC 1.0 Universal (CC0 1.0)</a> license. The sharing platform covers images, text snippets, movie clips and any sort of media that can be conveniently shared by generating short, public and obfuscated URLs that are easily accessible.</p> |
51 | <p><strong>scratch copy</strong> is a platform for small-sized asset sharing developed by <a href="http://grimore.org">Wizardry and Steamworks</a> and published under the <a href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC 1.0 Universal (CC0 1.0)</a> license. The sharing platform covers images, text snippets, movie clips and any sort of media that can be conveniently shared by generating short, public and obfuscated URLs that are easily accessible.</p> |
|
50 | <!-- <p><a class="btn btn-default" href="#" role="button">View details »</a></p> --> |
52 | <!-- <p><a class="btn btn-default" href="#" role="button">View details »</a></p> --> |
|
51 | </div> |
53 | </div> |
|
52 | |
54 | |
|
53 | <div class="row" ng-app="scratch" ng-controller="scratch-control"> |
55 | <div class="row" ng-app="scratch" ng-controller="scratch-control"> |
|
54 | <!-- <h2>Configuration</h2> |
56 | <!-- <h2>Configuration</h2> |
|
55 | <p>The <strong>scratch copy</strong> platform can be configured for each usage case. This section is meant to hint to the users what configuration is currently active and specifies the configured lmits and allowances.</p> |
57 | <p>The <strong>scratch copy</strong> platform can be configured for each usage case. This section is meant to hint to the users what configuration is currently active and specifies the configured lmits and allowances.</p> |
|
56 | <h3>Allowed Files</h3> |
58 | <h3>Allowed Files</h3> |
|
57 | <p>The file extensions <span ng-repeat="extension in extensions" id="box">{{extension}}, </span> are currently accepted for uploading.</p> |
59 | <p>The file extensions <span ng-repeat="extension in extensions" id="box">{{extension}}, </span> are currently accepted for uploading.</p> |
|
58 | <h3>Upload Limits</h3> |
60 | <h3>Upload Limits</h3> |
|
59 | <p>The current upload limit is set to {{uploadlimit}}MiB.</p> --> |
61 | <p>The current upload limit is set to {{uploadlimit}}MiB.</p> --> |
|
60 | <h2>Configuration</h2> |
62 | <h2>Configuration</h2> |
|
61 | <div class="panel panel-default"> |
63 | <div class="panel panel-default"> |
|
62 | <!-- Default panel contents --> |
64 | <!-- Default panel contents --> |
|
63 | <div class="panel-heading">Current Configuration Settings</div> |
65 | <div class="panel-heading">Current Configuration Settings</div> |
|
64 | <div class="panel-body"> |
66 | <div class="panel-body"> |
|
65 | <!-- Table --> |
67 | <!-- Table --> |
|
66 | <table class="table table-striped table-hover table-condensed table-responsive"> |
68 | <table class="table table-striped table-hover table-condensed table-responsive"> |
|
67 | <thead> |
69 | <thead> |
|
68 | <tr> |
70 | <tr> |
|
69 | <th> |
71 | <th> |
|
70 | Description |
72 | Description |
|
71 | </th> |
73 | </th> |
|
72 | <th> |
74 | <th> |
|
73 | Limit |
75 | Limit |
|
74 | </th> |
76 | </th> |
|
75 | </tr> |
77 | </tr> |
|
76 | </thead> |
78 | </thead> |
|
77 | <tbody> |
79 | <tbody> |
|
78 | <tr> |
80 | <tr> |
|
79 | <td> |
81 | <td> |
|
80 | File extensions accepted for upload. |
82 | File extensions accepted for upload. |
|
81 | </td> |
83 | </td> |
|
82 | <td> |
84 | <td> |
|
83 | <span ng-repeat="extension in extensions" id="box">{{extension}} </span> |
85 | <span ng-repeat="extension in extensions" id="box">{{extension}} </span> |
|
84 | </td> |
86 | </td> |
|
85 | </tr> |
87 | </tr> |
|
86 | <tr> |
88 | <tr> |
|
87 | <td> |
89 | <td> |
|
88 | Allowed file size upload limit. |
90 | Allowed file size upload limit. |
|
89 | </td> |
91 | </td> |
|
90 | <td> |
92 | <td> |
|
91 | <p>{{uploadlimit}}MiB</p> |
93 | <p>{{uploadlimit}}MiB</p> |
|
92 | </td> |
94 | </td> |
|
93 | </tr> |
95 | </tr> |
|
94 | </tbody> |
96 | </tbody> |
|
95 | </table> |
97 | </table> |
|
96 | </div> |
98 | </div> |
|
97 | </div> |
99 | </div> |
|
98 | </div> |
100 | </div> |
|
99 | |
101 | |
|
100 | </div> <!-- /container --> |
102 | </div> <!-- /container --> |
|
101 | |
103 | |
|
102 | <div id="footer"> |
104 | <div id="footer"> |
|
103 | <div class="container"> |
105 | <div class="container"> |
|
104 | <p class="text-muted credit text-center">Copyright <i class="glyphicon glyphicon-copyright-mark"></i> 2017 <a href="http://grimore.org">Wizardry and Steamworks</a>.</p> |
106 | <p class="text-muted credit text-center">Copyright <i class="glyphicon glyphicon-copyright-mark"></i> 2017 <a href="http://grimore.org">Wizardry and Steamworks</a>.</p> |
|
105 | </div> |
107 | </div> |
|
106 | </div> |
108 | </div> |
|
107 | |
109 | |
|
108 | <!-- jQuery --> |
110 | <!-- jQuery --> |
|
109 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
111 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
|
110 | <!-- Angular JS --> |
112 | <!-- Angular JS --> |
|
111 | <script src="bower_components/angular/angular.min.js"></script> |
113 | <script src="bower_components/angular/angular.min.js"></script> |
|
112 | <!-- BootStrap --> |
114 | <!-- BootStrap --> |
|
113 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
115 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
|
114 | <!-- BootStrap Toggle --> |
116 | <!-- BootStrap Toggle --> |
|
115 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> |
117 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> |
|
116 | <!-- SoundJS --> |
118 | <!-- SoundJS --> |
|
117 | <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> |
119 | <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> |
|
118 | <!-- YAML --> |
120 | <!-- YAML --> |
|
119 | <script src="bower_components/yaml.js/dist/yaml.min.js"></script> |
121 | <script src="bower_components/yaml.js/dist/yaml.min.js"></script> |
|
120 | <!-- js-cookie --> |
122 | <!-- js-cookie --> |
|
121 | <script src="bower_components/js-cookie/src/js.cookie.js"></script> |
123 | <script src="bower_components/js-cookie/src/js.cookie.js"></script> |
|
122 | <script> |
124 | <script> |
|
123 | var app = angular.module('scratch', []); |
125 | var app = angular.module('scratch', []); |
|
124 | app.controller('scratch-control', function($scope, $http) { |
126 | app.controller('scratch-control', function($scope, $http) { |
|
125 | $http.get('config.yaml').then((response) => { |
127 | $http.get('config.yaml').then((response) => { |
|
126 | var doc = YAML.parse(response.data); |
128 | var doc = YAML.parse(response.data); |
|
127 | $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS; |
129 | $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS; |
|
128 | $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE; |
130 | $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE; |
|
129 | }); |
131 | }); |
|
130 | }); |
132 | }); |
|
131 | </script> |
133 | </script> |
|
132 | <!-- Jumbotron parallax effect --> |
134 | <!-- Jumbotron parallax effect --> |
|
133 | <script> |
135 | <script> |
|
134 | var jumboHeight = $('.jumbotron').outerHeight(); |
136 | var jumboHeight = $('.jumbotron').outerHeight(); |
|
135 | function parallax(){ |
137 | function parallax(){ |
|
136 | var scrolled = $(window).scrollTop(); |
138 | var scrolled = $(window).scrollTop(); |
|
137 | $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); |
139 | $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); |
|
138 | } |
140 | } |
|
139 | |
141 | |
|
140 | $(window).scroll(function(e){ |
142 | $(window).scroll(function(e){ |
|
141 | parallax(); |
143 | parallax(); |
|
142 | }); |
144 | }); |
|
143 | </script> |
145 | </script> |
|
144 | <!-- Hiss sounds --> |
146 | <!-- Hiss sounds --> |
|
145 | <script> |
147 | <script> |
|
146 | $(document).ready(() => { |
148 | $(document).ready(() => { |
|
147 | // Get the sound cookie. |
149 | // Get the sound cookie. |
|
148 | const sound = Cookies.get('sound'); |
150 | const sound = Cookies.get('sound'); |
|
149 | |
151 | |
|
150 | if (!createjs.Sound.initializeDefaultPlugins() || |
152 | if (!createjs.Sound.initializeDefaultPlugins() || |
|
151 | createjs.BrowserDetect.isIOS || |
153 | createjs.BrowserDetect.isIOS || |
|
152 | createjs.BrowserDetect.isAndroid || |
154 | createjs.BrowserDetect.isAndroid || |
|
153 | createjs.BrowserDetect.isBlackberry) |
155 | createjs.BrowserDetect.isBlackberry) |
|
154 | return; |
156 | return; |
|
155 | |
157 | |
|
156 | const hiss = [ |
158 | const hiss = [ |
|
157 | "snd/hisses/hiss_1.mp3", |
159 | "snd/hisses/hiss_1.mp3", |
|
158 | "snd/hisses/hiss_2.mp3", |
160 | "snd/hisses/hiss_2.mp3", |
|
159 | "snd/hisses/hiss_3.mp3", |
161 | "snd/hisses/hiss_3.mp3", |
|
160 | "snd/hisses/hiss_4.mp3", |
162 | "snd/hisses/hiss_4.mp3", |
|
161 | "snd/hisses/hiss_5.mp3", |
163 | "snd/hisses/hiss_5.mp3", |
|
162 | "snd/hisses/hiss_6.mp3", |
164 | "snd/hisses/hiss_6.mp3", |
|
163 | "snd/hisses/hiss_7.mp3", |
165 | "snd/hisses/hiss_7.mp3", |
|
164 | "snd/hisses/hiss_8.mp3", |
166 | "snd/hisses/hiss_8.mp3", |
|
165 | "snd/hisses/hiss_9.mp3", |
167 | "snd/hisses/hiss_9.mp3", |
|
166 | "snd/hisses/hiss_10.mp3", |
168 | "snd/hisses/hiss_10.mp3", |
|
167 | ]; |
169 | ]; |
|
168 | |
170 | |
|
169 | // Play the sounds. |
171 | // Play the sounds. |
|
170 | if(!sound || sound == 'on') { |
172 | if(!sound || sound == 'on') { |
|
171 | createjs.Sound.onLoadComplete = |
173 | createjs.Sound.onLoadComplete = |
|
172 | (event) => createjs.Sound.play(event.src); |
174 | (event) => createjs.Sound.play(event.src); |
|
173 | createjs.Sound.addEventListener("fileload", |
175 | createjs.Sound.addEventListener("fileload", |
|
174 | (event) => createjs.Sound.play(event.src)); |
176 | (event) => createjs.Sound.play(event.src)); |
|
175 | createjs.Sound.registerSound( |
177 | createjs.Sound.registerSound( |
|
176 | hiss[~~(Math.random() * hiss.length)] |
178 | hiss[~~(Math.random() * hiss.length)] |
|
177 | ); |
179 | ); |
|
178 | } |
180 | } |
|
179 | |
181 | |
|
180 | // Load the toggle. |
182 | // Load the toggle. |
|
181 | $('#toggle-sound').bootstrapToggle({ |
183 | $('#toggle-sound').bootstrapToggle({ |
|
182 | on: 'Pet Kitty', |
184 | on: 'Pet Kitty', |
|
183 | off: 'Annoy Kitty', |
185 | off: 'Annoy Kitty', |
|
184 | onstyle: "danger", |
186 | onstyle: "danger", |
|
185 | offstyle: "success" |
187 | offstyle: "success" |
|
186 | }); |
188 | }); |
|
187 | $('#toggle-sound') |
189 | $('#toggle-sound') |
|
188 | .bootstrapToggle(sound) |
190 | .bootstrapToggle(sound) |
|
189 | .change(() => { |
191 | .change(() => { |
|
190 | var checked = $('#toggle-sound').is(":checked"); |
192 | var checked = $('#toggle-sound').is(":checked"); |
|
191 | Cookies.set('sound', |
193 | Cookies.set('sound', |
|
192 | checked ? 'on' : 'off' |
194 | checked ? 'on' : 'off' |
|
193 | ); |
195 | ); |
|
194 | if(checked) { |
196 | if(checked) { |
|
195 | createjs.Sound.onLoadComplete = |
197 | createjs.Sound.onLoadComplete = |
|
196 | (event) => createjs.Sound.play(event.src); |
198 | (event) => createjs.Sound.play(event.src); |
|
197 | createjs.Sound.addEventListener("fileload", |
199 | createjs.Sound.addEventListener("fileload", |
|
198 | (event) => createjs.Sound.play(event.src)); |
200 | (event) => createjs.Sound.play(event.src)); |
|
199 | createjs.Sound.registerSound( |
201 | createjs.Sound.registerSound( |
|
200 | hiss[~~(Math.random() * hiss.length)] |
202 | hiss[~~(Math.random() * hiss.length)] |
|
201 | ); |
203 | ); |
|
202 | } |
204 | } |
|
203 | }); |
205 | }); |
|
204 | }); |
206 | }); |
|
- | 207 | </script> |
||
- | 208 | <script> |
||
- | 209 | $(document).ready(() => { |
||
- | 210 | $("#scratch-body-first").load("inc/scratch-body-first.html"); |
||
- | 211 | }); |
||
205 | </script> |
212 | </script> |
|
206 | </body> |
213 | </body> |
|
207 | </html> |
214 | </html> |
|
208 | |
215 | |