-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
160 lines (116 loc) · 5.49 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Sampadak | Markdown Editor</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- For Codemirror -->
<script src="lib/codemirror.js"></script>
<link rel="stylesheet" href="lib/codemirror.css">
<script src="mode/javascript/javascript.js"></script>
<script src="addon/scroll/annotatescrollbar.js"></script>
<script src="addon/search/matchesonscrollbar.js"></script>
<script src="addon/search/searchcursor.js"></script>
<script src="addon/search/match-highlighter.js"></script>
<script src="addon/edit/closebrackets.js"></script>
<script src="mode/xml/xml.js"></script>
<script src="addon/selection/active-line.js"></script>
<!-- End codemirror links -->
<!-- Theme links -->
<link rel="stylesheet" href="theme/night.css">
<link rel="stylesheet" href="theme/3024-night.css">
<!-- End theme links -->
<!-- Fullscreen ink -->
<link rel="stylesheet" href="addon/display/fullscreen.css">
<script src="addon/display/fullscreen.js"></script>
<!-- End of fullsscreen link -->
<script src="js/jquery-3.4.1.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="">
<div class=" nav_brand mx-auto">
<h4><a href="#" class="navbar-brand">Sampadak</a></h4>
</div>
<p class="preview_md_toggle" id="preview_toggle">Preview</p>
<p class="preview_md_toggle" id="markdown_toggle">Markdown</p>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#export_as" aria-controls="export_as" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="export_as">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Export as
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" onclick="export_as_html()" >HTML file</a>
<a class="dropdown-item" onclick="export_as_markdowm()">MD file</a>
<a class="dropdown-item" onclick="export_as_pdf()">Pdf file</a>
</div>
</div>
</li>
</ul>
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item">
<div class="dropdown">
<button class=" btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Import From
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<div class="upload-btn-wrapper">
<button class="btn">Markdown file</button>
<input type="file" id="mdfile" accept=".md, .txt" />
</div>
</div>
</div>
</li>
</ul>
</div>
</nav>
</div>
<!-- Editor section -->
<div class="container-fluid body_section">
<div class="row">
<div class="col-lg-6 col-md-6 editor_div" >
<div class="nametag">
<span class='editor_tag'>MARKDOWN</span>
<p class="theme_selector mr-auto">Theme
<select onchange="selectTheme()" id=select>
<option selected>default</option>
<option value="night">Night</option>
<option value="3024-night">lights Out</option>
</select>
</p>
</div>
<div id="editor_section" class="editor_section">
</div>
</div>
<div class="col-lg-6 col-md-6 preview_div">
<div id="preview">
<div class="nametag_preview">
<span class='preview_tag'>PREVIEW</span>
<div class="file_name_input mr-auto">
<div class="file_name_div input-group input-group-sm ">
<input type="text" class="file_name form-control" placeholder="Document Name" id="file_name">
</div>
</div>
</div>
<div class="preview_section" id="preview_section" >
</div>
</div>
</div>
</div>
</div>
<script src="bower_components/showdown/dist/showdown.min.js"></script>
<script src="js/script.js"></script>
<!-- jsPDF library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>