-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
165 lines (136 loc) · 5.63 KB
/
Copy pathindex.html
File metadata and controls
165 lines (136 loc) · 5.63 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
<!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.0" />
<title>Hugo Editor</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toast-ui/editor@3.2.2/dist/toastui-editor.min.css">
<style>
/* Increase font size for TUI editor text */
.ProseMirror {
font-size: 16px;
}
</style>
</head>
<body>
<section class="section">
<div class="container">
<h1 class="title">Hugo Editor</h1>
<div class="layout">
<div>
<p class="subtitle">Step 1: Upload Images</p>
<input type="file" multiple accept="image/*" id="file-input" class="is-hidden">
<label for="file-input" class="button is-info">📷 Add Photo</label>
</div>
<div id="previews"></div>
<!--<button id="submit-button" class="button is-primary">Submit Images</button>-->
</div>
</div>
<br>
<div class="container">
<div class="layout">
<div>
<p class="subtitle">Step 2: Upload article in MS Word Docx format (optionally)</p>
<input type="file" multiple accept=".docx" id="parseWordDocxFile" class="is-hidden">
<label for="parseWordDocxFile" class="button is-info">🗎 Add DOCX</label>
</div>
<!--<button id="submit-button" class="button is-primary">Submit Images</button>-->
</div>
</div>
<br>
<!-- input webform starts -->
<div class="container">
<p class="subtitle">Step 3: Fill-in metadata</p>
<form id="yamlForm" class="box">
<div class="field">
<label class="label">Date and Time *</label>
<div class="control">
<input type="datetime-local" id="dateInput" name="dateInput" class="input" required style="width: 33%;">
</div>
</div>
<div class="field">
<label class="label">Author *</label>
<div class="control">
<input id="author" class="input" type="text" placeholder="Enter Authors (comma separated)" required maxlength="250" style="width: 33%;">
</div>
</div>
<div class="field">
<label class="label">Article Title *</label>
<div class="control">
<input id="title" class="input" type="text" placeholder="Enter Title" required maxlength="250">
</div>
</div>
<div class="field">
<label class="label">Summary *</label>
<div class="control">
<input id="description" class="input" type="text" placeholder="Enter Description" required maxlength="500">
</div>
</div>
<div class="field">
<label class="label">Image Credit</label>
<div class="control">
<input id="imageCredit" class="input" type="text" placeholder="Enter Image Credits (comma separated)" maxlength="350">
</div>
</div>
<div class="field">
<label class="label">Tags *</label>
<div class="control">
<input id="tags" class="input" type="text" placeholder="Enter Tags (comma separated)" required maxlength="250">
</div>
</div>
<div class="field">
<label class="label">Sekcija *</label>
<div class="control">
<div class="select">
<select id="sekcija" required>
<option value="notice" selected> 🚀 Briefs</option>
<option value="fokus">🔥 Big Feature</option>
<option value="izbor">❤️ Favs</option>
</select>
</div>
</div>
</div>
<div class="field">
<label class="label">Write and edit your Article:</label>
<div class="control">
<!-- Replace the textarea with the editor element -->
<div id="editor"></div>
</div>
</div>
<!-- Confirmation Checkbox -->
<label class="checkbox">
<input type="checkbox" id="confirmCheckbox" required>
I confirm that any materials submitted are licensed under a Creative Commons, and I grant permission for the publication. Pressing "Publish" will submit the article for publication.
</label>
<label class="checkbox">
<input type="checkbox" id="confirmCheckboxRead" required>
<strong>I have checked the article for grammar and spelling.</strong>
</label>
<div class="control">
<div id="uploadMessage" class="is-size-4 has-text-weight-bold pb-6"></div>
<button type="submit" id="uploadMarkdownWithYAMLAndImages" class="button is-large is-danger">⚡ Publish</button>
</div>
<br>
<div class="control">
<button type="submit" id="downloadMarkdownWithYAMLAndImages" class="button is-light">💾 Downoad</button>
</div>
<br>
<p class="subtitle has-text-centered">Built and maintained by <br><a href="https://github.com/roverbird"><img src="https://coalmillsafety.com/img/logo-s-small.svg"></a></small></p>
</form>
</div>
</section>
<!-- load required libraries -->
<!--Toast UI editor -->
<script src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script>
<!-- Mammoth to convert Docx -->
<script src="https://cdn.jsdelivr.net/npm/mammoth@1.4.8/mammoth.browser.min.js"></script>
<!-- JSZip -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<!-- FileSaver -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<!-- Dashboard.js -->
<script type="module" src="./dashboard.js"></script>
</body>
</html>