forked from haxtheweb/haxcms-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.html
168 lines (157 loc) · 5.55 KB
/
dev.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="HAXCMS" />
<meta
name="viewport"
content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"
/>
<title>HAXCMS site list</title>
<meta name="description" content="My HAXCMS site description" />
<base href="/" />
<link rel="icon" href="assets/favicon.ico" />
<link rel="manifest" href="manifest.json" />
<meta name="theme-color" content="#3f51b5" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="My site" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="apple-mobile-web-app-title" content="My App" />
<link rel="apple-touch-icon" href="assets/icon-48x48.png" />
<link rel="apple-touch-icon" sizes="72x72" href="assets/icon-72x72.png" />
<link rel="apple-touch-icon" sizes="96x96" href="assets/icon-96x96.png" />
<link
rel="apple-touch-icon"
sizes="144x144"
href="assets/icon-144x144.png"
/>
<link
rel="apple-touch-icon"
sizes="192x192"
href="assets/icon-192x192.png"
/>
<meta name="msapplication-TileImage" content="assets/icon-144x144.png" />
<meta name="msapplication-TileColor" content="#3f51b5" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@elmsln" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="books-app" />
<meta property="og:image" content="assets/icon-144x144.png" />
<link rel="preconnect" crossorigin href="https://fonts.googleapis.com" />
<link rel="preconnect" crossorigin href="https://cdnjs.cloudflare.com" />
<style>
body {
margin: 0;
min-height: 100vh;
}
haxcms-site-listing {
transition: all 1s linear;
}
haxcms-site-listing:not(:defined) {
width: 100vw;
display: block;
position: fixed;
height: 100vh;
background: #23d5ab;
}
haxcms-site-listing:not(:defined) div {
font-size: 6vw;
line-height: 1;
margin: 0 auto;
top: calc(50vh - 8vw);
width: 100%;
justify-content: center;
display: grid;
text-align: center;
padding: 0;
position: relative;
font-family: "Courier New", Courier, monospace;
color: black;
}
</style>
</head>
<body>
<script>
// set this in order to simulate the published form of the site
// window.__haxCMSContextPublished = true;
// set the below to simulate running a demo / end points to load data
// this will let you simulate more operations without having a backend
window.__haxCMSContextDemo = true;
window.appSettings = {
login: "dist\/dev\/login.json",
logout: "dist\/dev\/logout.json",
saveNodePath: "dist\/dev\/saveNode.json",
getConfigPath: "dist\/dev\/getConfigPath.json",
saveManifestPath: "dist\/dev\/saveNode.json",
setConfigPath: "dist\/dev\/saveNode.json",
downloadSitePath: "dist\/dev\/saveNode.json",
createNodePath: "dist\/dev\/saveNode.json",
createNewSitePath: "dist\/dev\/saveNode.json",
deleteNodePath: "dist\/dev\/saveNode.json",
saveOutlinePath: "dist\/dev\/saveNode.json",
publishSitePath: "dist\/dev\/saveNode.json",
deleteSitePath: "dist\/dev\/saveNode.json",
cloneSitePath: "dist\/dev\/saveNode.json",
archiveSitePath: "dist\/dev\/saveNode.json",
appStore: {
url: "dist\/dev\/appstore.json"
}
};
// need to fetch theme config dynamically...
var configJson, themeCoreJson;
fetch("_config/config.json")
.then(function(response) {
return response.json();
})
.then(function(myJson) {
configJson = myJson;
return myJson;
});
// core location
fetch("system/coreConfig/themes.json")
.then(function(response) {
return response.json();
})
.then(function(myJson) {
themeCoreJson = myJson;
return myJson;
});
// fake an async
setTimeout(() => {
// combine so they are there for review just like a real backend would present
window.appSettings.themes = Object.assign(
{},
themeCoreJson,
configJson.themes
);
}, 100);
// append global base styles
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = "node_modules/@lrnwebcomponents/haxcms-elements/lib/base.css";
link.type = "text/css";
var def = document.getElementsByTagName("link")[0];
def.parentNode.insertBefore(link, def);
</script>
<haxcms-site-listing
create-params='{"token":"0Q3VHQU0aBv6Ak-cONONcWGDEGmVnezuB7Ly0A3Zcsg"}'
base-path="/"
method="GET"
data-source="dist/sites.json"
><div>HAXcms</div>
<div>loading</div>
</haxcms-site-listing>
<noscript>Please enable JavaScript to view this website.</noscript>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script
async
src="node_modules/web-animations-js/web-animations-next-lite.min.js"
></script>
<script type="module" src="dist/build-home.js"></script>
</body>
</html>