scratch – Blame information for rev 115

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