scratch – Blame information for rev 91

Subversion Repositories:
Rev:
Rev Author Line No. Line
91 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 http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
7 <meta http-equiv="Pragma" content="no-cache" />
8 <meta http-equiv="Expires" content="0" />
9 <meta name="viewport" content="width=device-width, initial-scale=1">
10 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
11 <meta name="description" content="quick asset upload">
12 <meta name="author" content="Wizardry and Steamworks">
13 <link rel="icon" href="favicon.ico">
14  
15 <title>scratch</title>
16  
17 <!-- Bootstrap core CSS -->
18 <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
19 <!-- Font Awesome -->
20 <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet">
21  
22 <!-- Site-wide style CCS -->
23 <link href="css/style.css" rel="stylesheet">
24  
25 <!-- Local style -->
26 <link href="css/link/style.css" rel="stylesheet">
27 </head>
28  
29 <body>
30  
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  
38 <div class="container">
39  
40 <ul class="nav nav-tabs">
41 <li><a href="index.html">Home</a></li>
42 <li><a href="file.html">File</a></li>
43 <li><a href="text.html">Text</a></li>
44 <li><a href="draw.html">Draw</a></li>
45 <li class="active"><a href="#">Link</a></li>
46 </ul>
47  
48 <div id="main-panel" class="panel panel-default">
49 <div class="panel-body">
50 <form id="link-form" role="form">
51 <div class="form-group has-feedback">
52 <div class="input-group">
53 <span class="input-group-btn">
54 <button id="save" class="btn btn-default" type="button" data-toggle="tooltip" data-placement="auto" title="Generate link." data-disable="true" disabled>
55 <i class="glyphicon glyphicon-share"></i>
56 </button>
57 </span>
58 <input id="link" type="text" class="form-control" pattern="^https?://[\-_\.\+!\*'\(\),a-zA-Z0-9]+:?[0-9]{0,5}/.*$">
59 </div>
60 <div class="input-group">
61 <input id="URL" type="text" class="form-control" readonly>
62 <span class="input-group-btn">
63 <button id="copy-url" class="btn btn-default" type="button" data-clipboard-target="#URL" data-toggle="tooltip" data-placement="auto" title="Copy to clipboard."><i class="glyphicon glyphicon-paperclip"></i></button>
64 </span>
65 </div>
66 </div>
67 </form>
68 </div>
69  
70 </div> <!-- /container -->
71  
72 <div id="footer">
73 <div class="container">
74 <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>
75 </div>
76 </div>
77  
78 <!-- jQuery -->
79 <script src="bower_components/jquery/dist/jquery.min.js"></script>
80 <!-- BootStrap -->
81 <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
82 <!-- Bootstrap Validator -->
83 <script src="bower_components/bootstrap-validator/dist/validator.min.js"></script>
84 <!-- Clipboard -->
85 <script src="bower_components/clipboard/dist/clipboard.min.js"></script>
86 <script>
87 $(document).ready(() => {
88 // Attach the form validator.
89 $('#link-form').validator({
90 focus: false,
91 delay: 1000
92 }).on('invalid.bs.validator', () => {
93 $('#save').attr('disabled', true);
94 }).on('valid.bs.validator', () => {
95 $('#save').attr('disabled', false);
96 });
97  
98 // Save image and create URL.
99 $('#save').click(() => {
100  
101 var formData = new FormData();
102 formData.append('file', new Blob(
103 [
104 '[InternetShortcut]'
105 .concat('\n')
106 .concat('URL=')
107 .concat($('#link')
108 .val()
109 )
110 .concat('\n')
111 ]
112 ),
113 '.url'
114 );
115  
116 $.ajax({
117 url: 'file.php',
118 type: 'POST',
119 data: formData,
120 // cache: false // FF
121 processData: false,
122 contentType: false
123 }).done((data) => {
124 // Serialize JSON to object.
125 data = JSON.parse(data);
126  
127 $('#URL')
128 .val(
129 location.protocol
130 .concat("//")
131 .concat(window.location.hostname)
132 .concat("/")
133 .concat(data.hash)
134 );
135 });
136 });
137  
138 // Enable the Clipboard button.
139 new Clipboard('#copy-url');
140  
141 // Scroll to the panel.
142 $('html, body').animate({
143 scrollTop: $('#main-panel').offset().top
144 }, 'slow');
145 });
146 </script>
147 <!-- Jumbotron parallax effect -->
148 <script>
149 var jumboHeight = $('.jumbotron').outerHeight();
150 function parallax(){
151 var scrolled = $(window).scrollTop();
152 $('.paralax-background').css('height', (jumboHeight-scrolled) + 'px');
153 }
154  
155 $(window).scroll(function(e){
156 parallax();
157 });
158 </script>
159 </body>
160 </html>