scratch – Diff between revs 76 and 79

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 76 Rev 79
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 -->
-   19 <link href="bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet">
18 20
19 <!-- Site-wide style CCS --> 21 <!-- Site-wide style CCS -->
20 <link href="css/style.css" rel="stylesheet"> 22 <link href="css/style.css" rel="stylesheet">
21 </head> 23 </head>
22   24  
23 <body> 25 <body>
24 26
25 <!-- Main component for a primary marketing message or call to action --> 27 <!-- Main component for a primary marketing message or call to action -->
26 <div class="paralax-background"></div> 28 <div class="paralax-background"></div>
27 <div class="jumbotron"> 29 <div class="jumbotron">
28 <h1>scratch copy</h1> 30 <h1>scratch copy</h1>
29 <p class="quote">the asset sharer</p> 31 <p class="quote">the asset sharer</p>
30 </div> 32 </div>
31 33
32 <div class="container"> 34 <div class="container">
-   35 <div class="pull-right">
-   36 <input id="toggle-sound" type="checkbox">
-   37 </div>
33 38
34 <ul class="nav nav-tabs"> 39 <ul class="nav nav-tabs">
35 <li class="active"><a href="#">Home</a></li> 40 <li class="active"><a href="#">Home</a></li>
36 <li><a href="file.html">File</a></li> 41 <li><a href="file.html">File</a></li>
37 <li><a href="text.html">Text</a></li> 42 <li><a href="text.html">Text</a></li>
38 </ul> 43 </ul>
39 44
40 <div class="row"> 45 <div class="row">
41 <h2>About</h2> 46 <h2>About</h2>
42 <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> 47 <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>
43 <!-- <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> --> 48 <!-- <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> -->
44 </div> 49 </div>
45 50
46 <div class="row" ng-app="scratch" ng-controller="scratch-control"> 51 <div class="row" ng-app="scratch" ng-controller="scratch-control">
47 <!-- <h2>Configuration</h2> 52 <!-- <h2>Configuration</h2>
48 <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> 53 <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>
49 <h3>Allowed Files</h3> 54 <h3>Allowed Files</h3>
50 <p>The file extensions <span ng-repeat="extension in extensions" id="box">{{extension}}, </span> are currently accepted for uploading.</p> 55 <p>The file extensions <span ng-repeat="extension in extensions" id="box">{{extension}}, </span> are currently accepted for uploading.</p>
51 <h3>Upload Limits</h3> 56 <h3>Upload Limits</h3>
52 <p>The current upload limit is set to {{uploadlimit}}MiB.</p> --> 57 <p>The current upload limit is set to {{uploadlimit}}MiB.</p> -->
53 <h2>Configuration</h2> 58 <h2>Configuration</h2>
54 <div class="panel panel-default"> 59 <div class="panel panel-default">
55 <!-- Default panel contents --> 60 <!-- Default panel contents -->
56 <div class="panel-heading">Current Configuration Settings</div> 61 <div class="panel-heading">Current Configuration Settings</div>
57 <div class="panel-body"> 62 <div class="panel-body">
58 <!-- Table --> 63 <!-- Table -->
59 <table class="table table-striped table-hover table-condensed table-responsive"> 64 <table class="table table-striped table-hover table-condensed table-responsive">
60 <thead> 65 <thead>
61 <tr> 66 <tr>
62 <th> 67 <th>
63 Description 68 Description
64 </th> 69 </th>
65 <th> 70 <th>
66 Limit 71 Limit
67 </th> 72 </th>
68 </tr> 73 </tr>
69 </thead> 74 </thead>
70 <tbody> 75 <tbody>
71 <tr> 76 <tr>
72 <td> 77 <td>
73 File extensions accepted for upload. 78 File extensions accepted for upload.
74 </td> 79 </td>
75 <td> 80 <td>
76 <span ng-repeat="extension in extensions" id="box">{{extension}} </span> 81 <span ng-repeat="extension in extensions" id="box">{{extension}} </span>
77 </td> 82 </td>
78 </tr> 83 </tr>
79 <tr> 84 <tr>
80 <td> 85 <td>
81 Allowed file size upload limit. 86 Allowed file size upload limit.
82 </td> 87 </td>
83 <td> 88 <td>
84 <p>{{uploadlimit}}MiB</p> 89 <p>{{uploadlimit}}MiB</p>
85 </td> 90 </td>
86 </tr> 91 </tr>
87 </tbody> 92 </tbody>
88 </table> 93 </table>
89 </div> 94 </div>
90 </div> 95 </div>
91 </div> 96 </div>
92   97  
93 </div> <!-- /container --> 98 </div> <!-- /container -->
94 99
95 <div id="footer"> 100 <div id="footer">
96 <div class="container"> 101 <div class="container">
97 <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> 102 <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>
98 </div> 103 </div>
99 </div> 104 </div>
100   105  
101 <!-- jQuery --> 106 <!-- jQuery -->
102 <script src="bower_components/jquery/dist/jquery.min.js"></script> 107 <script src="bower_components/jquery/dist/jquery.min.js"></script>
103 <!-- Angular JS --> 108 <!-- Angular JS -->
104 <script src="bower_components/angular/angular.min.js"></script> 109 <script src="bower_components/angular/angular.min.js"></script>
105 <!-- BootStrap --> 110 <!-- BootStrap -->
106 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 111 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
-   112 <!-- BootStrap Toggle -->
-   113 <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
107 <!-- SoundJS --> 114 <!-- SoundJS -->
108 <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> 115 <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script>
109 <!-- YAML --> 116 <!-- YAML -->
110 <script src="bower_components/yaml.js/dist/yaml.min.js"></script> 117 <script src="bower_components/yaml.js/dist/yaml.min.js"></script>
-   118 <!-- js-cookie -->
-   119 <script src="bower_components/js-cookie/src/js.cookie.js"></script>
111 <script> 120 <script>
112 var app = angular.module('scratch', []); 121 var app = angular.module('scratch', []);
113 app.controller('scratch-control', function($scope, $http) { 122 app.controller('scratch-control', function($scope, $http) {
114 $http.get('config.yaml').then((response) => { 123 $http.get('config.yaml').then((response) => {
115 var doc = YAML.parse(response.data); 124 var doc = YAML.parse(response.data);
116 $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS; 125 $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS;
117 $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE; 126 $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE;
118 }); 127 });
119 }); 128 });
120 </script> 129 </script>
121 <!-- Jumbotron parallax effect --> 130 <!-- Jumbotron parallax effect -->
122 <script> 131 <script>
123 var jumboHeight = $('.jumbotron').outerHeight(); 132 var jumboHeight = $('.jumbotron').outerHeight();
124 function parallax(){ 133 function parallax(){
125 var scrolled = $(window).scrollTop(); 134 var scrolled = $(window).scrollTop();
126 $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); 135 $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px');
127 } 136 }
128   137  
129 $(window).scroll(function(e){ 138 $(window).scroll(function(e){
130 parallax(); 139 parallax();
131 }); 140 });
132 </script> 141 </script>
133 <!-- Hiss sounds --> 142 <!-- Hiss sounds -->
134 <script> 143 <script>
135 $(document).ready(() => { 144 $(document).ready(() => {
-   145 // Get the sound cookie.
-   146 var play = (Cookies
-   147 .get('sound') == 'true'
-   148 );
-   149 // Play the sounds.
-   150 if(play) {
136 if (!createjs.Sound.initializeDefaultPlugins() || 151 if (!createjs.Sound.initializeDefaultPlugins() ||
137 createjs.BrowserDetect.isIOS || 152 createjs.BrowserDetect.isIOS ||
138 createjs.BrowserDetect.isAndroid || 153 createjs.BrowserDetect.isAndroid ||
139 createjs.BrowserDetect.isBlackberry) 154 createjs.BrowserDetect.isBlackberry)
140 return; 155 return;
141 156
142 const hiss = [ 157 const hiss = [
143 "snd/hisses/hiss_1.mp3", 158 "snd/hisses/hiss_1.mp3",
144 "snd/hisses/hiss_2.mp3", 159 "snd/hisses/hiss_2.mp3",
145 "snd/hisses/hiss_3.mp3", 160 "snd/hisses/hiss_3.mp3",
146 "snd/hisses/hiss_4.mp3", 161 "snd/hisses/hiss_4.mp3",
147 "snd/hisses/hiss_5.mp3", 162 "snd/hisses/hiss_5.mp3",
148 "snd/hisses/hiss_6.mp3", 163 "snd/hisses/hiss_6.mp3",
149 "snd/hisses/hiss_7.mp3", 164 "snd/hisses/hiss_7.mp3",
150 "snd/hisses/hiss_8.mp3", 165 "snd/hisses/hiss_8.mp3",
151 "snd/hisses/hiss_9.mp3", 166 "snd/hisses/hiss_9.mp3",
152 "snd/hisses/hiss_10.mp3", 167 "snd/hisses/hiss_10.mp3",
153 ]; 168 ];
154   169  
155 createjs.Sound.onLoadComplete = 170 createjs.Sound.onLoadComplete =
156 (event) => createjs.Sound.play(event.src); 171 (event) => createjs.Sound.play(event.src);
157 createjs.Sound.addEventListener("fileload", 172 createjs.Sound.addEventListener("fileload",
158 (event) => createjs.Sound.play(event.src)); 173 (event) => createjs.Sound.play(event.src));
-   174 createjs.Sound.registerSound(
-   175 hiss[~~(Math.random() * hiss.length)]
-   176 );
-   177 }
-   178
-   179 // Load the toggle.
-   180 $('#toggle-sound').bootstrapToggle({
-   181 on: 'Annoy Kitty',
-   182 off: 'Pat Kitty',
-   183 onstyle: "success",
-   184 offstyle: "danger"
-   185 }).change(() => {
-   186 Cookies.set('sound',
-   187 !$('#toggle-sound')
159 createjs.Sound.registerSound( 188 .is(":checked")
-   189 );
-   190 })
160 hiss[~~(Math.random() * hiss.length)] 191 .prop('checked', !play)
161 ); 192 .change()
162 }); 193 });
163 </script> 194 </script>
164 </body> 195 </body>
165 </html> 196 </html>
166   197