-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (93 loc) · 3.51 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hashes</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="import" href="sections/getintouch.html">
<link rel="import" href="sections/welcome.html">
<link rel="import" href="sections/whatwedo.html">
<link rel="import" href="sections/whoweare.html">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
</head>
<body>
<!-- Sidebar -->
<section id="sidebar">
<div class="inner">
<nav>
<ul>
<li><a id="welcome-menu" data-section="welcome" href="#">Welcome</a></li>
<li><a data-section="whoweare" href="#">Who we are</a></li>
<li><a data-section="whatwedo" href="#">What we do</a></li>
<li><a data-section="getintouch" href="#">Get in touch</a></li>
</ul>
</nav>
</div>
</section>
<!-- Wrapper -->
<div id="wrapper">
</div>
<nav>
<div class="nav-wrapper">
<a class="brand-logo center">Hashes</a>
</div>
</nav>
We are using node <script>document.write(process.versions.node)</script>,
Chromium <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
<ul></ul>
<!-- Footer -->
<footer id="footer" class="wrapper style1-alt">
<div class="inner">
<ul class="menu">
<li>© Hashes. All rights reserved.</li><li>Design: <a href="https://github.com/alexlyee/hashes">Electrum</a></li>
</ul>
</div>
</footer>
<!-- deals with native drag & drop to "drag". -->
<a href="#" id="drag">item</a>
<script type="text/javascript" charset="utf-8">
document.getElementById('drag').ondragstart = (event) => {
event.preventDefault()
ipcRenderer.send('ondragstart', '/path/to/item')
}
</script>
<!-- renderer.js is called after mainwindow.html is loaded. -->
<script src="./renderer.js">
const electron = require('electron');
const {ipcRenderer} = electron;
const ul = document.querySelector('ul');
// Add item
ipcRenderer.on('item:add', function(e, item){
ul.className = 'collection'; // Dynamically add class name for materialize
const li = document.createElement('li');
li.className = 'collection-item';
const itemText = document.createTextNode(item);
li.appendChild(itemText);
ul.appendChild(li);
});
// Clear items
ipcRenderer.on('item:clear', function(){
ul.innerHTML = '';
ul.className = '';
});
// Remove item by double click
ul.addEventListener('dblclick', removeItem);
function removeItem(e){
e.target.remove();
if(ul.children.length == 0){
ul.className = '';
}
}
</script>
<!-- Scripts -->
<script>window.$ = window.jQuery = require('./assets/js/jquery.min.js');</script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>