-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
186 lines (186 loc) · 7 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
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="description"
content="A CMS that runs completely in your browser."
/>
<meta name="twitter:card" content="summary" />
<meta
name="twitter:description"
content="A CMS that runs completely in your browser."
/>
<meta name="twitter:title" content="tabcms" />
<meta name="twitter:site" content="@mortensonsam" />
<meta name="twitter:creator" content="@mortensonsam" />
<meta name="twitter:url" content="https://tabcms.com" />
<meta property="og:url" content="https://tabcms.com" />
<meta property="og:title" content="tabcms" />
<meta
property="og:description"
content="A CMS that runs completely in your browser."
/>
<title>tabcms</title>
<script src="assets/ejs.min.js"></script>
<script src="assets/localforage.min.js"></script>
<script src="assets/jszip.min.js"></script>
<script src="assets/ckeditor.js"></script>
<script src="assets/shepherd.min.js"></script>
<script src="textareatab.js"></script>
<link rel="stylesheet" href="assets/shepherd.css" />
<link rel="stylesheet" href="main.css" />
</head>
<body>
<h1 id="tabcms-title">
tabcms - an in-browser CMS by
<a href="https://twitter.com/mortensonsam" target="_blank"
>@mortensonsam</a
>
</h1>
<div id="tabcms-links">
<a href="https://demo.tabcms.com" target="_blank">View a demo site</a>
<a href="https://github.com/mortenson/tabcms" target="_blank"
>View code on Github</a
>
</div>
<div id="edit-wrapper">
<div id="sidebar">
<div class="sidebar-list-label">
Pages
<button class="tcms-add" id="add-page">
<span class="visually-hidden">Add page</span>
</button>
</div>
<ul id="page-list" class="sidebar-list"></ul>
<div class="sidebar-list-label">
Templates
<button class="tcms-add" id="add-template">
<span class="visually-hidden">Add template</span>
</button>
</div>
<ul id="template-list" class="sidebar-list"></ul>
<div class="sidebar-list-label">
Files
<button class="tcms-add" id="add-file">
<span class="visually-hidden">Add empty file</span>
</button>
</div>
<ul id="file-list" class="sidebar-list"></ul>
<button class="tcms-button" id="upload-file">Upload file</button>
<button class="tcms-button" id="download-site">Download site</button>
<button class="tcms-button" id="upload-site">Upload site</button>
<button class="tcms-button" id="reset-site">Reset site</button>
</div>
<div id="main">
<form id="page-form">
<div class="main-form-item">
<label for="title">Title</label>
<input id="title" name="title" type="text" />
</div>
<div class="main-form-item">
<label for="path">Path</label>
<input id="path" name="path" type="text" />
</div>
<div class="main-form-item main-form-textarea">
<label for="editor">Body</label>
<textarea name="editor" id="editor"></textarea>
</div>
<details
class="main-form-details main-form-item main-form-textarea"
id="advanced"
>
<summary>Advanced</summary>
<label for="extra">Extra data</label>
<textarea name="extra" id="extra"></textarea>
<p class="description">
To toggle the "tab to add spaces" behavior for this field, press
Control + m while the field is in focus.
</p>
<p class="description">
Put any extra data you want passed to your templates here. If data
can be parsed as JSON, it will be available in templates as
"page.extraData".
</p>
</details>
<button class="tcms-button" id="delete-page">Delete page</button>
</form>
<form id="template-form" class="hidden">
<div class="main-form-item">
<label for="name">Name</label>
<input id="name" name="name" type="text" />
</div>
<div class="main-form-item main-form-textarea">
<label for="template">Template</label>
<textarea id="template" name="template"></textarea>
<p class="description">
To toggle the "tab to add spaces" behavior for this field, press
Control + m while the field is in focus.
</p>
<p class="description">
Templates use EJS, for documentation visit
<a href="https://ejs.co/#docs" target="_blank"
>https://ejs.co/#docs</a
>. Variables passed to the "html" template are:
</p>
<ul class="description">
<li>
page - An object containing the properties title, path, body,
extra, and extraData.
</li>
<li>
site - An object containing the property "pages", an array of
all pages.
</li>
<li>pageIndex - The current page's index in site.pages.</li>
</ul>
</div>
<button class="tcms-button" id="delete-template">
Delete template
</button>
</form>
<form id="file-form" class="hidden">
<div class="main-form-item form-item-file-name">
<label for="file-name">Name</label>
<input id="file-name" name="file-name" type="text" />
</div>
<div id="file-preview"></div>
<div
class="main-form-item main-form-textarea"
id="file-contents-wrapper"
>
<label for="file-contents">File contents</label>
<textarea id="file-contents" name="file-contents"></textarea>
<p class="description">
To toggle the "tab to add spaces" behavior for this field, press
Control + m while the field is in focus.
</p>
</div>
<div id="file-usage"></div>
<button class="tcms-button" id="delete-file">Delete file</button>
</form>
</div>
<div id="preview-wrapper">
<div id="preview-label">
Preview
<button class="tcms-button" id="expand-preview">Expand</button>
</div>
<iframe title="Site preview" id="preview"></iframe>
</div>
</div>
<script>
if (!localforage.supports(localforage.INDEXEDDB)) {
alert(
"Your browser does not support IndexedDB. Please try a newer browser if you can!"
);
}
if (!window.URL || !window.URL.createObjectURL) {
alert(
"Your browser does not support window.URL.createObjectURL. Please try a newer browser if you can!"
);
}
</script>
<script src="main.js"></script>
<script src="tour.js"></script>
</body>
</html>