-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
175 lines (170 loc) · 5.39 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Primary Meta Tags -->
<title>P2Pdoc</title>
<meta name="title" content="P2Pdoc" />
<meta
name="description"
content="P2Pdoc allows you to create a document and then upload it to the distributed web via IPFS"
/>
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://p2pdoc.glitch.me/" />
<meta property="og:title" content="P2Pdoc" />
<meta
property="og:description"
content="P2Pdoc allows you to create a document and then upload it to the distributed web via IPFS"
/>
<meta property="og:image" content="" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://p2pdoc.glitch.me/" />
<meta property="twitter:title" content="P2Pdoc" />
<meta
property="twitter:description"
content="P2Pdoc allows you to create a document and then upload it to the distributed web via IPFS"
/>
<meta property="twitter:image" content="" />
<!-- import the webpage's stylesheet -->
<link
rel="stylesheet"
href="/node_modules/normalize.min.css/normalize.min.css"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/img/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/img/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/img/favicon-16x16.png"
/>
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("/sw.js")
.then(reg => {
// registration worked
console.log("Registration succeeded. Scope is " + reg.scope);
})
.catch(error => {
// registration failed
console.log("Registration failed with " + error);
});
}
</script>
<link rel="manifest" href="/manifest.json" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
<link rel="stylesheet" href="/style.css" />
<link
rel="stylesheet"
href="/node_modules/blocks.css/dist/blocks.min.css"
/>
<!-- import the webpage's javascript file -->
<script src="/editor-js-parser.js"></script>
<script src="/download.js"></script>
<script src="/script.js"></script>
</head>
<body onhashchange="window.loadDoc()">
<h1>
P2Pdoc
</h1>
<button
class="block fixed"
onclick="window.saveDoc()"
id="savebtn"
type="button"
disabled
>
Loading...
</button>
<button
class="block fixed"
onclick="window.editor.clear()"
id="clearbtn"
type="button"
disabled
>
Clear!
</button>
<button
class="block fixed"
onclick="downloadAsHtml()"
id="downloadbtn"
type="button"
disabled
>
Download
</button>
<br />
<div id="editorjs"></div>
<footer>
<!-- Load plugins -->
<script src="/node_modules/@editorjs/editorjs/dist/editor.js"></script>
<script src="/node_modules/@editorjs/quote/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/inline-code/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/marker/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/underline/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/list/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/code/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/table/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/delimiter/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/simple-image/dist/bundle.js"></script>
<script src="/node_modules/editorjs-header-with-anchor/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/embed/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/paragraph/dist/bundle.js"></script>
<script src="/node_modules/@editorjs/warning/dist/bundle.js"></script>
<script src="/node_modules/editorjs-drag-drop/dist/bundle.js"></script>
<script>
window.editor = new EditorJS({
onReady: () => {
new DragDrop(editor);
},
tools: {
header: Header,
quote: Quote,
Marker: {
class: Marker,
shortcut: "CMD+SHIFT+M"
},
inlineCode: {
class: InlineCode,
shortcut: "CMD+SHIFT+L"
},
underline: Underline,
delimiter: Delimiter,
table: {
class: Table
},
list: {
class: List,
inlineToolbar: true
},
code: CodeTool,
image: SimpleImage,
embed: Embed,
warning: Warning
},
holder: "editorjs"
});
</script>
<div
class="glitchButton"
style="position:fixed;top:20px;right:20px;"
></div>
<script src="https://button.glitch.me/button.js" defer></script>
</footer>
</body>
</html>