-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiFiles.html
More file actions
335 lines (319 loc) · 11.5 KB
/
iFiles.html
File metadata and controls
335 lines (319 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>imanager: Managing `*` with the IBIPFS</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/fontawesome/css/all.css">
<!-- Bootstrap core CSS -->
<link href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/css/mdb.min.css" rel="stylesheet">
<!-- Your custom styles (optional) -->
<link href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/css/style.min.css" rel="stylesheet">
<link rel="stylesheet" href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/i/codemirror.css">
<script src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/i/codemirror.js"></script>
<link rel="icon" href="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/i/fav.png">
<style>
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee; line-height: 1.3; height: 96%; width: 100%}
.CodeMirror-linenumbers { padding: 0 8px; }
</style>
<style>
.front{
z-index: 1080;
}
.map-container{
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}
.map-container iframe{
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
</style>
</head>
<body class="grey lighten-3">
<!--Modal: iEvolve-->
<div class="modal fade front" id="modalIEvolve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<!--Content-->
<div class="modal-content">
<!--Body-->
<div class="modal-body mb-0 p-0">
<div class="z-depth-3">
<article id="iEvolveContent"></article>
<button class="btn btn-primary" onclick="letsGo()">Let's Go</button>
</div>
</div>
<!--Footer-->
<div class="modal-footer justify-content-center flex-column flex-md-row">
<button type="button" class="btn btn-outline-primary btn-rounded btn-md ml-4" data-dismiss="modal">Close</button>
</div>
</div>
<!--/.Content-->
</div>
</div>
<!--Modal: iEvolve-->
<!--Main Navigation-->
<header>
<!-- Navbar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-light white scrolling-navbar">
<div class="container-fluid">
<!-- Collapse -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Links -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left -->
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link waves-effect" href="index.html">iDashboard
</a>
</li>
<li class="nav-item active">
<a class="nav-link waves-effect" href="iFiles.html">iFiles
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect" href="iProfile.html">iProfile
</a>
</li>
</ul>
<!-- Right -->
<ul class="navbar-nav nav-flex-icons">
<li class="nav-item">
<button class="btn btn-primary" data-toggle='modal' data-target='#modalIEvolve' onclick="iEvolve()">(i) => iEvolve()</button>
</li>
</ul>
</div>
</div>
</nav>
<!-- Navbar -->
<!-- Sidebar -->
<div class="sidebar-fixed position-fixed">
<button class="btn btn-primary" data-toggle='modal' data-target='#modalIEvolve' onclick="iEvolve()">(i) => iEvolve()</button>
<a class="logo-wrapper waves-effect">
<img src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/i/fav.png" class="img-fluid" alt="">
</a>
<div class="list-group list-group-flush">
<a href="index.html" class="list-group-item list-group-item-action waves-effect">
<i class="fas fa-chart-pie mr-3"></i>iDashboard
</a>
<a href="iFiles.html" class="list-group-item active waves-effect">
<i class="fas fa-file mr-3"></i>iFiles
</a>
<a href="iProfile.html" class="list-group-item list-group-item-action waves-effect">
<i class="fas fa-user mr-3"></i>iProfile
</a>
</div>
</div>
<!-- Sidebar -->
</header>
<!--Main Navigation-->
<!--Main layout-->
<main class="pt-5 mx-lg-5">
<div class="container-fluid mt-5">
<!-- Heading -->
<div class="card mb-4 wow fadeIn">
<!--Card content-->
<div class="card-body d-sm-flex justify-content-between">
<h3 class="mb-2 mb-sm-0 pt-1">
<span>SEARCH</span>
</h3>
<form class="d-flex justify-content-center">
<!-- Default input -->
<input type="search" placeholder="Type your query" aria-label="Search" class="form-control">
<button class="btn btn-primary btn-sm my-0 p" type="submit">
<i class="fas fa-search"></i>
</button>
</form>
</div>
</div>
<!-- Heading -->
<!--Grid row-->
<div class="row wow fadeIn">
<!--Grid column-->
<div class="col-md-3 mb-4">
<!--Card-->
<div class="card mb-4">
<!--Card content-->
<div class="card-body">
<!-- List group links -->
<div class="list-group list-group-flush">
<a class="list-group-item list-group-item-action waves-effect">Sales
<span class="badge badge-success badge-pill pull-right">22%
<i class="fas fa-arrow-up ml-1"></i>
</span>
</a>
<a class="list-group-item list-group-item-action waves-effect">Traffic
<span class="badge badge-danger badge-pill pull-right">5%
<i class="fas fa-arrow-down ml-1"></i>
</span>
</a>
<a class="list-group-item list-group-item-action waves-effect">Orders
<span class="badge badge-primary badge-pill pull-right">14</span>
</a>
<a class="list-group-item list-group-item-action waves-effect">Issues
<span class="badge badge-primary badge-pill pull-right">123</span>
</a>
<a class="list-group-item list-group-item-action waves-effect">Messages
<span class="badge badge-primary badge-pill pull-right">8</span>
</a>
</div>
<!-- List group links -->
</div>
</div>
<!--/.Card-->
</div>
<!--Grid column-->
</div>
<!--Grid row-->
</div>
</main>
<!--Main layout-->
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/js/jquery-3.3.1.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/mdb-jquery/js/mdb.min.js"></script>
<script type="text/javascript" src="/ipfs/QmRHWAFLWrwrNUdkZTaPcgusD6rhesTizNBF8f2ayLcd1G/i/ibipfs.js"></script>
<!-- MDB -->
<!-- Initializations -->
<script type="text/javascript">
// Animations initialization
new WOW().init();
</script>
<!-- Charts -->
<script type="text/javascript">
// Line
var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
//pie
var ctxP = document.getElementById("pieChart").getContext('2d');
var myPieChart = new Chart(ctxP, {
type: 'pie',
data: {
labels: ["Red", "Green", "Yellow", "Grey", "Dark Grey"],
datasets: [{
data: [300, 50, 100, 40, 120],
backgroundColor: ["#F7464A", "#46BFBD", "#FDB45C", "#949FB1", "#4D5360"],
hoverBackgroundColor: ["#FF5A5E", "#5AD3D1", "#FFC870", "#A8B3C5", "#616774"]
}]
},
options: {
responsive: true,
legend: false
}
});
</script>
<script type="text/javascript">
let ibipfs
let editor
const iEvolve = () => {
if (!ibipfs) {
alert('Oops! Not ready yet, please try after a while. :)')
return
}
ibipfs
.addFromURL(window.location)
.then(res => {
ibipfs
.cat(res[0].hash)
.then(buf => {
editor = CodeMirror(document.getElementById('iEvolveContent'), {
value: buf.toString(),
lineNumbers: true,
mode: "javascript",
autoCloseBrackets: true,
matchBrackets: true,
showCursorWhenSelecting: true,
tabSize: 2
})
})
})
.catch(err => console.log('Error: ' + err))
}
const letsGo = () => {
if (!ibipfs || !editor) {
alert('Oops! Not ready yet, please try after a while. :)')
return
}
ibipfs
.add(ibipfs.Ipfs.Buffer.from(editor.getValue()))
.then(res => {
let decision = confirm('Evolved! Have a look? :)')
if (decision) {
let url = window.location.href
url = url.slice(0, url.lastIndexOf('/ipfs/')) + '/ipfs/' + res[0].hash
window.open(url)
} else {
alert('Evolved @ /ipfs/' + res[0].hash)
}
})
.catch(err => alert('Oops! Error: ' + err))
}
window.onload = () => {
window.addEventListener('ibipfs', (e) => {
ibipfs = window.ibipfs
ibipfs
.id()
.then(identity => {
let publisherMeta = document.createElement('meta')
publisherMeta.setAttribute('charset', 'utf-8')
publisherMeta.setAttribute('name', 'publisher')
publisherMeta.setAttribute('content', identity.id)
document.head.prepend(publisherMeta)
})
.catch(err => console.log('Error: ' + err))
})
}
</script>
</body>
</html>