scratch – Blame information for rev 121

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