forked from brenorobazza/html-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (68 loc) · 3.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML templates</title>
<link href="index.css" rel="stylesheet" type="text/css" />
<link href="plugin/codemirror-5.58.1/lib/codemirror.css" rel="stylesheet" type="text/css">
<link href="plugin/codemirror-5.58.1/theme/dracula.css" rel="stylesheet">
</head>
<body>
<!-- Preview -->
<div class="preview-area">
<iframe id="preview-window"></iframe>
</div>
<!-- code and table -->
<div class="code-area">
<!-- Tabs -->
<div class="w3-bar w3-black">
<button class="w3-bar-item w3-button" onclick="switchTab('Code')">Code</button>
<button class="w3-bar-item w3-button" onclick="switchTab('Placeholders')">Placeholders</button>
<button class="w3-bar-item w3-button" onclick="switchTab('TemplateTab')">Template</button>
</div>
<!-- code tab -->
<div id="Code" class="tab">
<div class="w3-bar w3-black">
<button id="HTML-button" class="w3-bar-item w3-button" onclick="switchCodeTab('HTML')">HTML</button>
<button id="CSS-button" class="w3-bar-item w3-button" onclick="switchCodeTab('CSS')">CSS</button>
<button id="JS-button" class="w3-bar-item w3-button" onclick="switchCodeTab('JS')">JS</button>
</div>
<div id="HTML-tab" class="codeTab">
<textarea class="codemirror-textarea" id="editor"></textarea>
</div>
<div id="CSS-tab" class="codeTab" style="display: none;">
<textarea class="codemirror-textarea" id="editorCSS"></textarea>
</div>
<div id="JS-tab" class="codeTab" style="display: none;">
<textarea class="codemirror-textarea" id="editorJS"></textarea>
</div>
</div>
<!-- table tab -->
<div id="Placeholders" class="tab" style="display:none">
<div class="w3-bar">
<button class="w3-bar-item w3-button" onclick="generateTable()" id="buildPlaceholdersTableButton">Build placeholders table</button>
<button class="w3-bar-item w3-button" onclick="replaceValues(true)">Build final HTML</button>
<!-- <div width="24"></div> -->
<a id="download" download="finalHTML.html">
<button class="downloadButton">Download final HTML</button>
</a>
<button class="downloadButton" onclick="copyText()">Copy to clipboard</button>
</div>
<table id="placeholders-table">
</table>
</div>
<!-- template tab -->
<div id="TemplateTab" class="tab" style="display: none;">
<input class="file" type="file" id="file-selector" />
</div>
</div>
<script src="index.js" rel="javascript"></script>
<script src="plugin/codemirror-5.58.1/lib/codemirror.js"></script>
<script src="plugin/codemirror-5.58.1/mode/xml/xml.js"></script>
<script src="plugin/codemirror-5.58.1/mode/css/css.js"></script>
<script src="plugin/codemirror-5.58.1/mode/javascript/javascript.js"></script>
<script src="plugin/codemirror-5.58.1/addon/edit/closetag.js"></script>
<script src="plugin/codemirror-5.58.1/addon/edit/closebrackets.js"></script>
</body>
</html>