-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathhome.html
181 lines (179 loc) · 10.9 KB
/
home.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
176
177
178
179
180
181
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, shrink-to-fit=no" />
<title>MSK Markdown - Create, preview and edit markdown</title>
<link rel="icon" href="./assets/icons/favicon.png" />
<link rel="manifest" href="./manifest.json" />
<meta name="theme-color" content="#FFFFFF" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="MSK Markdown" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="MSK Markdown" />
<link rel="apple-touch-icon" href="./assets/icons/favicon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="./assets/icons/favicon.png" />
<link rel="apple-touch-icon" sizes="96x96" href="./assets/icons/favicon.png" />
<link rel="apple-touch-icon" sizes="144x144" href="./assets/icons/favicon.png" />
<link rel="apple-touch-icon" sizes="192x192" href="./assets/icons/favicon.png" />
<meta name="msapplication-TileImage" content="./assets/icons/favicon.png" />
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-tap-highlight" content="no" />
<link rel="stylesheet" href="./main.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/styles/dracula.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700&display=swap" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@latest/build/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/asvd/syncscroll/syncscroll.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script>
<meta name="title" content="MSK Markdown - Create, preview and edit markdown" />
<meta name="description" content="MSK Markdown is a powerful & fast markdown editor. Visit msk-markdown.netlify.app, Open source at GitHub." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://msk-markdown.netlify.app/" />
<meta property="og:title" content="MSK Markdown - Create, preview and edit markdown" />
<meta property="og:description" content="MSK Markdown is a powerful & fast markdown editor. Visit msk-markdown.netlify.app, Open source at GitHub." />
<meta property="og:image" content="./assets/photos/banner.png" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://msk-markdown.netlify.app/" />
<meta property="twitter:title" content="MSK Markdown - Create, preview and edit markdown" />
<meta property="twitter:description" content="MSK Markdown is a powerful & fast markdown editor. Visit msk-markdown.netlify.app, Open source at GitHub." />
<meta property="twitter:image" content="./assets/photos/banner.png" />
</head>
<body>
<main role="main" class="container">
<header>
<div class="tools">
<div>
<a>MSK Markdown</a>
<button onclick="apply('bold')" title="Bold"><i class="bi bi-type-bold"></i></button>
<button onclick="apply('italic')" title="Italic"><i class="bi bi-type-italic"></i></button>
<button onclick="apply('strike')" title="Strikethrough"><i class="bi bi-type-strikethrough"></i></button>
<button onclick="apply('h1')" title="Header 1"><i class="bi bi-type-h1"></i></button>
<button onclick="apply('h2')" title="Header 2"><i class="bi bi-type-h2"></i></button>
<button onclick="apply('h3')" title="Header 3"><i class="bi bi-type-h3"></i></button>
<button onclick="apply('ul')" title="Unordered list"><i class="bi bi-list-ul"></i></button>
<button onclick="apply('ol')" title="Ordered list"><i class="bi bi-list-ol"></i></button>
<button onclick="apply('check')" title="Check list"><i class="bi bi-check-lg"></i></button>
<button onclick="apply('bq')" title="Blockquote"><i class="bi bi-quote"></i></button>
<button onclick="apply('ic')" title="Inline code"><i class="bi bi-code"></i></button>
<button onclick="apply('bc')" title="Block code"><i class="bi bi-braces"></i></button>
<button onclick="apply('link')" title="Link"><i class="bi bi-link-45deg"></i></button>
<button onclick="apply('image')" title="Image"><i class="bi bi-image"></i></button>
<button onclick="apply('hr')" title="Horizontal rule"><i class="bi bi-hr"></i></button>
<button onclick="apply('table')" title="Table"><i class="bi bi-table"></i></button>
</div>
<div>
<span class="clear" id="ClearText" onclick="clearTextArea()">Clear</span>
<span>
<label class="file" for="file">Open<input id="file" type="file" accept=".txt,.text,.md,.markdown,.markdn,.mdown,.htm,.html,.svg" onchange="openFile(event)" /></label>
</span>
<span class="trigger" id="ToggleSaveFile">Save</span>
</div>
</div>
</header>
<section class="content">
<div id="editor">
<textarea class="syncscroll" name="sync" id="getm" placeholder="Start typing Markdown." onkeyup="Preview.Update()" autofocus></textarea>
</div>
<div class="markdown syncscroll" name="sync" id="viewer" style="display: none;"></div>
<div class="markdown syncscroll" name="sync" id="buffer"></div>
</section>
<footer>
<div class="tools">
<div style="flex: 1 1 0;">
<span id="lineno"></span>
<span id="colno"></span>
</div>
<div class="preview">
<button onclick="slide('nill')" title="Hide editor"><i class="bi bi-arrow-left"></i></button>
<button onclick="slide('half')" title="Side by side"><i class="bi bi-align-middle"></i></button>
<button onclick="slide('full')" title="Hide viewer"><i class="bi bi-arrow-right"></i></button>
</div>
<div style="flex: 1 1 0; text-align: right;">
<span id="charcount"></span>
<span id="wordcount"></span>
<span class="trigger" id="ToggleSettings" title="Settings"><i class="bi bi-sliders"></i> Settings</span>
<span class="trigger" id="ToggleAbout" title="About"><i class="bi bi-info-circle"></i> About</span>
</div>
</div>
</footer>
<div class="modal" id="SaveFileModal">
<div class="modal-content" id="SaveFileContent">
<span class="close-button" id="CloseSaveFile"><i class="bi bi-x-lg"></i></span>
<h2>Save File</h2>
<p id="error"></p>
<form id="DownloadFileForm">
<center>
<a></a>
<input type="text" placeholder="File name" class="Input" id="SaveFileInput" /><br />
<button type="button" id="btn" onclick="DownloadFile()"><i class="bi bi-download"></i> Download</button>
</center>
</form>
</div>
</div>
<div class="modal" id="About">
<div class="modal-content" id="AboutContent">
<span class="close-button" id="CloseAbout"><i class="bi bi-x-lg"></i></span>
<h1>MSK Markdown</h1>
<h3>
Preview, edit and save markdown. Light Editor and Viewer.<br />
Created by <a href="https://msk-apps.netlify.app/">MSK</a>.
</h3>
</div>
</div>
<div class="modal" id="Settings">
<div class="modal-content" id="SettingsContent">
<span class="close-button" id="CloseSettings"><i class="bi bi-x-lg"></i></span>
<h2>Settings</h2>
<h3>Theme (Dark & Light)</h3>
<label class="theme-switch" for="checkbox" title="Theme">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
<h3>Music</h3>
<label class="music-switch" for="Music" title="Music">
<input onclick="togglePlay();" type="checkbox" id="Music" />
<div class="slider round"></div>
</label>
</div>
</div>
</main>
<script src="./main.js"></script>
<audio id="myAudio">
<source src="./assets/audio.mpeg" type="audio/mpeg" />
</audio>
<script>
myAudio.addEventListener(
"ended",
function () {
this.currentTime = 0;
this.play();
},
false
);
function togglePlay() {
if (myAudio.paused) {
myAudio.play();
const value = "MusicTrue";
localStorage.setItem("name", value);
} else {
myAudio.pause();
const value = "MusicFalse";
localStorage.setItem("name", value);
}
}
window.addEventListener("load", function () {
const AudioValue = localStorage.getItem("name");
if (AudioValue === "MusicTrue") {
myAudio.play();
} else {
myAudio.pause();
}
});
</script>
</body>
</html>