forked from Mr0grog/google-docs-to-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
135 lines (119 loc) · 3.09 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Convert Google Doc to Markdown</title>
<!-- Include Source Sans because it's the default for Google Docs -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<style type="text/css">
* {
box-sizing: border-box;
}
html, body {
background: #eee;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
height: 100%;
margin: 0;
}
body {
display: flex;
flex-direction: column;
}
main {
display: flex;
flex: 1 1 auto;
flex-direction: row;
justify-content: space-between;
width: 100%;
padding: 1em 2em;
}
#app-header {
flex: 0 0 auto;
margin: 0;
padding: 1em 2em;
}
#app-header h1 {
margin: 0;
padding: 0;
}
.input-field {
border: 1px solid #ccc;
font-size: 1em;
overflow: auto;
padding: 1em;
}
#input-area {
position: relative;
width: calc(50% - 1em);
}
.instructions {
font-size: 2em;
font-weight: bold;
opacity: 0.5;
padding: 0 1em;
position: absolute;
top: 1em;
left: 0;
right: 0;
text-align: center;
}
#input {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 1;
}
#output-area {
position: relative;
width: calc(50% - 1em);
}
#output {
background: transparent;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1;
white-space: pre-wrap;
}
#app-footer {
flex: 0 0 auto;
margin: 0;
padding: 0 2em 1em;
font-style: italic;
}
#button-container {
position: absolute;
right: 0;
top: 0;
z-index: 2;
}
</style>
</head>
<body>
<header id="app-header">
<h1>Convert Google Docs to Markdown</h1>
</header>
<main>
<div id="input-area">
<p class="instructions">Paste Google Docs text here…</p>
<div id="input" class="input-field" contenteditable autocomplete="off"></div>
</div>
<div id="output-area">
<div id="button-container">
<button id="download-button" style="display: none;">Download Markdown</button>
<button id="copy-button" style="display: none;">Copy Markdown</button>
</div>
<p class="instructions">…and get your Markdown here</p>
<textarea id="output" class="input-field" autocomplete="off"></textarea>
</div>
</main>
<footer id="app-footer">
<p>Source code available on <a href="https://github.com/mr0grog/google-docs-to-markdown" target="_blank" rel="noopener">Github</a>.</p>
</footer>
<script src="bundle.js"></script>
</body>
</html>