scratch – Diff between revs 71 and 75
?pathlinks?
Rev 71 | Rev 75 | |||
---|---|---|---|---|
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 | |
18 | |
|
19 | <!-- Site-wide style CCS --> |
19 | <!-- Site-wide style CCS --> |
|
20 | <link href="css/style.css" rel="stylesheet"> |
20 | <link href="css/style.css" rel="stylesheet"> |
|
21 | </head> |
21 | </head> |
|
22 | |
22 | |
|
23 | <body> |
23 | <body> |
|
24 | |
24 | |
|
25 | <!-- Main component for a primary marketing message or call to action --> |
25 | <!-- Main component for a primary marketing message or call to action --> |
|
26 | <div class="paralax-background"></div> |
26 | <div class="paralax-background"></div> |
|
27 | <div class="jumbotron"> |
27 | <div class="jumbotron"> |
|
28 | <h1>scratch copy</h1> |
28 | <h1>scratch copy</h1> |
|
29 | <p class="quote">the asset sharer</p> |
29 | <p class="quote">the asset sharer</p> |
|
30 | </div> |
30 | </div> |
|
31 | |
31 | |
|
32 | <div class="container"> |
32 | <div class="container"> |
|
33 | |
33 | |
|
34 | <ul class="nav nav-tabs"> |
34 | <ul class="nav nav-tabs"> |
|
35 | <li class="active"><a href="#">Home</a></li> |
35 | <li class="active"><a href="#">Home</a></li> |
|
36 | <li><a href="file.html">File</a></li> |
36 | <li><a href="file.html">File</a></li> |
|
37 | <li><a href="text.html">Text</a></li> |
37 | <li><a href="text.html">Text</a></li> |
|
38 | </ul> |
38 | </ul> |
|
39 | |
39 | |
|
40 | |
40 | |
|
41 | <div class="row"> |
41 | <div class="row"> |
|
42 | <h2>About</h2> |
42 | <h2>About</h2> |
|
43 | <p><strong>scratch</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><strong>scratch</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> |
|
44 | <!-- <p><a class="btn btn-default" href="#" role="button">View details »</a></p> --> |
44 | <!-- <p><a class="btn btn-default" href="#" role="button">View details »</a></p> --> |
|
- | 45 | </div> |
||
- | 46 | <div class="row" ng-app="scratch" ng-controller="scratch-control" > |
||
- | 47 | <h2>Configuration</h2> |
||
- | 48 | <p>The <strong>scratch</strong> platform can</p> |
||
- | 49 | <h3>Allowed Files</h3> |
||
- | 50 | The following files, expressed as file extensions: <div ng-repeat="extension in extensions"><span id="box">{{extension}}</span></div> are currently accepted for uploading. |
||
45 | </div> |
51 | </div> |
|
46 | |
52 | |
|
47 | </div> <!-- /container --> |
53 | </div> <!-- /container --> |
|
48 | |
54 | |
|
49 | <div id="footer"> |
55 | <div id="footer"> |
|
50 | <div class="container"> |
56 | <div class="container"> |
|
51 | <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> |
57 | <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> |
|
52 | </div> |
58 | </div> |
|
53 | </div> |
59 | </div> |
|
54 | |
60 | |
|
55 | <!-- jQuery --> |
61 | <!-- jQuery --> |
|
56 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
62 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
|
- | 63 | <!-- Angular JS --> |
||
- | 64 | <script src="bower_components/angular/angular.min.js"></script> |
||
57 | <!-- BootStrap --> |
65 | <!-- BootStrap --> |
|
58 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
66 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
|
59 | <!-- SoundJS --> |
67 | <!-- SoundJS --> |
|
60 | <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> |
68 | <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> |
|
- | 69 | <!-- YAML --> |
||
- | 70 | <script src="bower_components/yaml.js/dist/yaml.min.js"></script> |
||
- | 71 | <script> |
||
- | 72 | var app = angular.module('scratch', []); |
||
- | 73 | app.controller('scratch-control', function($scope, $http) { |
||
- | 74 | $http.get('config.yaml').then((response) => { |
||
- | 75 | var doc = YAML.parse(response.data); |
||
- | 76 | //alert(JSON.stringify(doc)); |
||
- | 77 | $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS; |
||
- | 78 | }); |
||
- | 79 | }); |
||
- | 80 | </script> |
||
61 | <!-- Jumbotron parallax effect --> |
81 | <!-- Jumbotron parallax effect --> |
|
62 | <script> |
82 | <script> |
|
63 | var jumboHeight = $('.jumbotron').outerHeight(); |
83 | var jumboHeight = $('.jumbotron').outerHeight(); |
|
64 | function parallax(){ |
84 | function parallax(){ |
|
65 | var scrolled = $(window).scrollTop(); |
85 | var scrolled = $(window).scrollTop(); |
|
66 | $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); |
86 | $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); |
|
67 | } |
87 | } |
|
68 | |
88 | |
|
69 | $(window).scroll(function(e){ |
89 | $(window).scroll(function(e){ |
|
70 | parallax(); |
90 | parallax(); |
|
71 | }); |
91 | }); |
|
72 | </script> |
92 | </script> |
|
- | 93 | <!-- Hiss sounds --> |
||
73 | <script> |
94 | <script> |
|
74 | $(document).ready(() => { |
95 | $(document).ready(() => { |
|
75 | if (!createjs.Sound.initializeDefaultPlugins() || |
96 | if (!createjs.Sound.initializeDefaultPlugins() || |
|
76 | createjs.BrowserDetect.isIOS || |
97 | createjs.BrowserDetect.isIOS || |
|
77 | createjs.BrowserDetect.isAndroid || |
98 | createjs.BrowserDetect.isAndroid || |
|
78 | createjs.BrowserDetect.isBlackberry) |
99 | createjs.BrowserDetect.isBlackberry) |
|
79 | return; |
100 | return; |
|
80 | |
101 | |
|
81 | const hiss = [ |
102 | const hiss = [ |
|
82 | "snd/hisses/hiss_1.mp3", |
103 | "snd/hisses/hiss_1.mp3", |
|
83 | "snd/hisses/hiss_2.mp3", |
104 | "snd/hisses/hiss_2.mp3", |
|
84 | "snd/hisses/hiss_3.mp3", |
105 | "snd/hisses/hiss_3.mp3", |
|
85 | "snd/hisses/hiss_4.mp3", |
106 | "snd/hisses/hiss_4.mp3", |
|
86 | "snd/hisses/hiss_5.mp3", |
107 | "snd/hisses/hiss_5.mp3", |
|
87 | "snd/hisses/hiss_6.mp3", |
108 | "snd/hisses/hiss_6.mp3", |
|
88 | "snd/hisses/hiss_7.mp3", |
109 | "snd/hisses/hiss_7.mp3", |
|
89 | "snd/hisses/hiss_8.mp3", |
110 | "snd/hisses/hiss_8.mp3", |
|
90 | "snd/hisses/hiss_9.mp3", |
111 | "snd/hisses/hiss_9.mp3", |
|
91 | "snd/hisses/hiss_10.mp3", |
112 | "snd/hisses/hiss_10.mp3", |
|
92 | ]; |
113 | ]; |
|
93 | |
114 | |
|
94 | createjs.Sound.onLoadComplete = |
115 | createjs.Sound.onLoadComplete = |
|
95 | (event) => createjs.Sound.play(event.src); |
116 | (event) => createjs.Sound.play(event.src); |
|
96 | createjs.Sound.addEventListener("fileload", |
117 | createjs.Sound.addEventListener("fileload", |
|
97 | (event) => createjs.Sound.play(event.src)); |
118 | (event) => createjs.Sound.play(event.src)); |
|
98 | createjs.Sound.registerSound( |
119 | createjs.Sound.registerSound( |
|
99 | hiss[~~(Math.random() * hiss.length)] |
120 | hiss[~~(Math.random() * hiss.length)] |
|
100 | ); |
121 | ); |
|
101 | }); |
122 | }); |
|
102 | </script> |
123 | </script> |
|
103 | </body> |
124 | </body> |
|
104 | </html> |
125 | </html> |
|
105 | |
126 | |