scratch – Blame information for rev 101

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>
5 office 47 </ul>
42 office 48  
64 office 49 <div class="row">
50 <h2>About</h2>
76 office 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>
75 office 52 <!-- <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> -->
42 office 53 </div>
76 office 54  
55 <div class="row" ng-app="scratch" ng-controller="scratch-control">
56 <!-- <h2>Configuration</h2>
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>
58 <h3>Allowed Files</h3>
59 <p>The file extensions <span ng-repeat="extension in extensions" id="box">{{extension}}, </span> are currently accepted for uploading.</p>
60 <h3>Upload Limits</h3>
61 <p>The current upload limit is set to {{uploadlimit}}MiB.</p> -->
75 office 62 <h2>Configuration</h2>
76 office 63 <div class="panel panel-default">
64 <!-- Default panel contents -->
65 <div class="panel-heading">Current Configuration Settings</div>
66 <div class="panel-body">
67 <!-- Table -->
68 <table class="table table-striped table-hover table-condensed table-responsive">
69 <thead>
70 <tr>
71 <th>
72 Description
73 </th>
74 <th>
75 Limit
76 </th>
77 </tr>
78 </thead>
79 <tbody>
80 <tr>
81 <td>
82 File extensions accepted for upload.
83 </td>
84 <td>
85 <span ng-repeat="extension in extensions" id="box">{{extension}} </span>
86 </td>
87 </tr>
88 <tr>
89 <td>
90 Allowed file size upload limit.
91 </td>
92 <td>
93 <p>{{uploadlimit}}MiB</p>
94 </td>
95 </tr>
96 </tbody>
97 </table>
98 </div>
99 </div>
75 office 100 </div>
5 office 101  
102 </div> <!-- /container -->
103  
10 office 104 <div id="footer">
105 <div class="container">
71 office 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>
10 office 107 </div>
108 </div>
5 office 109  
58 office 110 <!-- jQuery -->
111 <script src="bower_components/jquery/dist/jquery.min.js"></script>
75 office 112 <!-- Angular JS -->
113 <script src="bower_components/angular/angular.min.js"></script>
58 office 114 <!-- BootStrap -->
115 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
79 office 116 <!-- BootStrap Toggle -->
117 <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>
71 office 118 <!-- SoundJS -->
119 <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script>
75 office 120 <!-- YAML -->
121 <script src="bower_components/yaml.js/dist/yaml.min.js"></script>
79 office 122 <!-- js-cookie -->
123 <script src="bower_components/js-cookie/src/js.cookie.js"></script>
75 office 124 <script>
125 var app = angular.module('scratch', []);
126 app.controller('scratch-control', function($scope, $http) {
127 $http.get('config.yaml').then((response) => {
128 var doc = YAML.parse(response.data);
129 $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS;
76 office 130 $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE;
75 office 131 });
132 });
133 </script>
71 office 134 <!-- Jumbotron parallax effect -->
68 office 135 <script>
136 var jumboHeight = $('.jumbotron').outerHeight();
137 function parallax(){
138 var scrolled = $(window).scrollTop();
139 $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px');
140 }
141  
142 $(window).scroll(function(e){
143 parallax();
144 });
145 </script>
75 office 146 <!-- Hiss sounds -->
71 office 147 <script>
79 office 148 $(document).ready(() => {
149 // Get the sound cookie.
80 office 150 const sound = Cookies.get('sound');
151  
152 if (!createjs.Sound.initializeDefaultPlugins() ||
153 createjs.BrowserDetect.isIOS ||
154 createjs.BrowserDetect.isAndroid ||
155 createjs.BrowserDetect.isBlackberry)
156 return;
157  
158 const hiss = [
159 "snd/hisses/hiss_1.mp3",
160 "snd/hisses/hiss_2.mp3",
161 "snd/hisses/hiss_3.mp3",
162 "snd/hisses/hiss_4.mp3",
163 "snd/hisses/hiss_5.mp3",
164 "snd/hisses/hiss_6.mp3",
165 "snd/hisses/hiss_7.mp3",
166 "snd/hisses/hiss_8.mp3",
167 "snd/hisses/hiss_9.mp3",
168 "snd/hisses/hiss_10.mp3",
169 ];
170  
79 office 171 // Play the sounds.
99 office 172 if(!sound || sound == 'on') {
79 office 173 createjs.Sound.onLoadComplete =
174 (event) => createjs.Sound.play(event.src);
175 createjs.Sound.addEventListener("fileload",
176 (event) => createjs.Sound.play(event.src));
177 createjs.Sound.registerSound(
178 hiss[~~(Math.random() * hiss.length)]
179 );
180 }
181  
182 // Load the toggle.
183 $('#toggle-sound').bootstrapToggle({
80 office 184 on: 'Pet Kitty',
185 off: 'Annoy Kitty',
186 onstyle: "danger",
187 offstyle: "success"
188 });
189 $('#toggle-sound')
190 .bootstrapToggle(sound)
191 .change(() => {
192 var checked = $('#toggle-sound').is(":checked");
79 office 193 Cookies.set('sound',
80 office 194 checked ? 'on' : 'off'
79 office 195 );
80 office 196 if(checked) {
197 createjs.Sound.onLoadComplete =
198 (event) => createjs.Sound.play(event.src);
199 createjs.Sound.addEventListener("fileload",
200 (event) => createjs.Sound.play(event.src));
201 createjs.Sound.registerSound(
202 hiss[~~(Math.random() * hiss.length)]
203 );
204 }
205 });
71 office 206 });
207 </script>
101 office 208 <script>
209 $(document).ready(() => {
210 $("#scratch-body-first").load("inc/scratch-body-first.html");
211 });
212 </script>
5 office 213 </body>
214 </html>