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