scratch – Blame information for rev 137
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
5 | office | 1 | <!DOCTYPE html> |
125 | office | 2 | <html lang="en" ng-app="scratch"> |
5 | office | 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"> |
||
125 | office | 23 | <!-- Scratch Angular Includes --> |
24 | <ng-include src="'html/scratch-head-last.html'"></ng-include> |
||
5 | office | 25 | </head> |
26 | |||
27 | <body> |
||
101 | office | 28 | <!-- Include first body content --> |
125 | office | 29 | <ng-include src="'html/scratch-body-first.html'"></ng-include> |
101 | office | 30 | |
71 | office | 31 | <!-- Main component for a primary marketing message or call to action --> |
32 | <div class="paralax-background"></div> |
||
33 | <div class="jumbotron"> |
||
34 | <h1>scratch copy</h1> |
||
35 | <p class="quote">the asset sharer</p> |
||
36 | </div> |
||
37 | |||
5 | office | 38 | <div class="container"> |
79 | office | 39 | <div class="pull-right"> |
40 | <input id="toggle-sound" type="checkbox"> |
||
41 | </div> |
||
84 | office | 42 | |
5 | office | 43 | <ul class="nav nav-tabs"> |
23 | office | 44 | <li class="active"><a href="#">Home</a></li> |
56 | office | 45 | <li><a href="file.html">File</a></li> |
23 | office | 46 | <li><a href="text.html">Text</a></li> |
84 | office | 47 | <li><a href="draw.html">Draw</a></li> |
91 | office | 48 | <li><a href="link.html">Link</a></li> |
121 | office | 49 | <li><a href="view.html">View</a></li> |
5 | office | 50 | </ul> |
42 | office | 51 | |
76 | office | 52 | <div class="row" ng-app="scratch" ng-controller="scratch-control"> |
137 | office | 53 | <ng-include src="'html/scratch-home.html'"></ng-include> |
75 | office | 54 | </div> |
5 | office | 55 | |
56 | </div> <!-- /container --> |
||
57 | |||
10 | office | 58 | <div id="footer"> |
59 | <div class="container"> |
||
71 | office | 60 | <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 | 61 | </div> |
62 | </div> |
||
5 | office | 63 | |
58 | office | 64 | <!-- jQuery --> |
65 | <script src="bower_components/jquery/dist/jquery.min.js"></script> |
||
75 | office | 66 | <!-- Angular JS --> |
67 | <script src="bower_components/angular/angular.min.js"></script> |
||
58 | office | 68 | <!-- BootStrap --> |
69 | <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> |
||
79 | office | 70 | <!-- BootStrap Toggle --> |
71 | <script src="bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"></script> |
||
71 | office | 72 | <!-- SoundJS --> |
73 | <script src="bower_components/SoundJS/lib/soundjs-NEXT.combined.js"></script> |
||
75 | office | 74 | <!-- YAML --> |
75 | <script src="bower_components/yaml.js/dist/yaml.min.js"></script> |
||
79 | office | 76 | <!-- js-cookie --> |
77 | <script src="bower_components/js-cookie/src/js.cookie.js"></script> |
||
75 | office | 78 | <script> |
137 | office | 79 | const app = angular.module('scratch', []); |
75 | office | 80 | app.controller('scratch-control', function($scope, $http) { |
137 | office | 81 | $http.get('config.yaml').then((response) => { |
82 | var doc = YAML.parse(response.data); |
||
83 | $scope.extensions = doc.ALLOWED_FILE_EXTENSIONS; |
||
84 | $scope.uploadlimit = doc.ALLOWED_ASSET_SIZE; |
||
85 | }); |
||
75 | office | 86 | }); |
87 | </script> |
||
71 | office | 88 | <!-- Jumbotron parallax effect --> |
68 | office | 89 | <script> |
90 | var jumboHeight = $('.jumbotron').outerHeight(); |
||
91 | function parallax(){ |
||
92 | var scrolled = $(window).scrollTop(); |
||
93 | $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px'); |
||
94 | } |
||
95 | |||
96 | $(window).scroll(function(e){ |
||
97 | parallax(); |
||
98 | }); |
||
99 | </script> |
||
75 | office | 100 | <!-- Hiss sounds --> |
71 | office | 101 | <script> |
79 | office | 102 | $(document).ready(() => { |
103 | // Get the sound cookie. |
||
80 | office | 104 | const sound = Cookies.get('sound'); |
105 | |||
106 | if (!createjs.Sound.initializeDefaultPlugins() || |
||
107 | createjs.BrowserDetect.isIOS || |
||
108 | createjs.BrowserDetect.isAndroid || |
||
109 | createjs.BrowserDetect.isBlackberry) |
||
110 | return; |
||
111 | |||
112 | const hiss = [ |
||
113 | "snd/hisses/hiss_1.mp3", |
||
114 | "snd/hisses/hiss_2.mp3", |
||
115 | "snd/hisses/hiss_3.mp3", |
||
116 | "snd/hisses/hiss_4.mp3", |
||
117 | "snd/hisses/hiss_5.mp3", |
||
118 | "snd/hisses/hiss_6.mp3", |
||
119 | "snd/hisses/hiss_7.mp3", |
||
120 | "snd/hisses/hiss_8.mp3", |
||
121 | "snd/hisses/hiss_9.mp3", |
||
122 | "snd/hisses/hiss_10.mp3", |
||
123 | ]; |
||
124 | |||
79 | office | 125 | // Play the sounds. |
99 | office | 126 | if(!sound || sound == 'on') { |
79 | office | 127 | createjs.Sound.onLoadComplete = |
128 | (event) => createjs.Sound.play(event.src); |
||
129 | createjs.Sound.addEventListener("fileload", |
||
130 | (event) => createjs.Sound.play(event.src)); |
||
131 | createjs.Sound.registerSound( |
||
132 | hiss[~~(Math.random() * hiss.length)] |
||
133 | ); |
||
134 | } |
||
135 | |||
136 | // Load the toggle. |
||
137 | $('#toggle-sound').bootstrapToggle({ |
||
80 | office | 138 | on: 'Pet Kitty', |
139 | off: 'Annoy Kitty', |
||
140 | onstyle: "danger", |
||
141 | offstyle: "success" |
||
142 | }); |
||
143 | $('#toggle-sound') |
||
144 | .bootstrapToggle(sound) |
||
145 | .change(() => { |
||
146 | var checked = $('#toggle-sound').is(":checked"); |
||
79 | office | 147 | Cookies.set('sound', |
80 | office | 148 | checked ? 'on' : 'off' |
79 | office | 149 | ); |
80 | office | 150 | if(checked) { |
151 | createjs.Sound.onLoadComplete = |
||
152 | (event) => createjs.Sound.play(event.src); |
||
153 | createjs.Sound.addEventListener("fileload", |
||
154 | (event) => createjs.Sound.play(event.src)); |
||
155 | createjs.Sound.registerSound( |
||
156 | hiss[~~(Math.random() * hiss.length)] |
||
157 | ); |
||
158 | } |
||
159 | }); |
||
71 | office | 160 | }); |
161 | </script> |
||
5 | office | 162 | </body> |
163 | </html> |