Skip to content

Commit 01c66a6

Browse files
author
www-data
committed
Managed files updated
1 parent b6c47e9 commit 01c66a6

14 files changed

+226
-194
lines changed

404.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
// https://username.github.io/repo-name/?p=/one/two&q=a=b~and~c=d#qwe
2525
// Otherwise, leave segmentCount as 0.
2626
var segmentCount = 0;
27-
if (window.location.host.indexOf('github.io') != -1 && window.location.pathname.split('/').length > 1) {
27+
// account for top level sub-domain on github vs 1 level folder in.
28+
// this has issues w/ org.github.io/dir/project but will resolve org.github.io from /project
29+
// this will still choke on org/github.io/project/post/deeper/nesting so a build routine would help
30+
if (window.location.host.indexOf('github.io') != -1 && window.location.pathname.split('/').length > 2) {
2831
segmentCount = 1;
2932
}
3033
var l = window.location;

atom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<feed xmlns="http://www.w3.org/2005/Atom">
3-
<title>haxcellence</title>
3+
<title>HAXcellence</title>
44
<link href="" rel="self" />
55
<subtitle>Create Your Own course</subtitle>
6-
<updated>2024-08-21T14:45:52-04:00</updated>
6+
<updated>2024-08-22T16:43:17-04:00</updated>
77
<author>
88
<name></name>
99
</author>

build-haxcms.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (window.__appCDN) {
6767
}
6868
// reset styles that we apply to all hax sites for some level of normalization
6969
// across base HTML tags as well as css vars for styling system wide things from 1 place
70-
var baseResetStyles = 'build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/base.css';
70+
var baseResetStyles = 'build/es6/node_modules/@haxtheweb/haxcms-elements/lib/base.css';
7171
// css files load faster when implemented this way
7272
var link = document.createElement('link');
7373
link.rel = 'stylesheet';
@@ -99,11 +99,18 @@ function haxcmsFallbackStylesError(e) {
9999
link.onerror = (e) => { haxcmsFallbackStylesError(e);};
100100
// if the module fails to load at the set CDN location, try to fail back to known sources
101101
if (cdn === "./") {
102-
// psu fallback
103-
haxCdn = "https://cdn.webcomponents.psu.edu/cdn/";
104-
link.href = haxCdn + baseResetStyles;
105-
linkDef.parentNode.insertBefore(link, linkDef);
106-
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn);
102+
// hax cloud fallback
103+
haxCdn = "https://cdn.hax.cloud/cdn/";
104+
link.href = haxCdn + baseResetStyles;
105+
linkDef.parentNode.insertBefore(link, linkDef);
106+
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn);
107+
}
108+
else if (cdn === "https://cdn.hax.cloud/cdn/") {
109+
// psu mirror
110+
haxCdn = "https://cdn.webcomponents.psu.edu/cdn/";
111+
link.href = haxCdn + baseResetStyles;
112+
linkDef.parentNode.insertBefore(link, linkDef);
113+
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn);
107114
}
108115
else if (cdn === "https://cdn.webcomponents.psu.edu/cdn/") {
109116
// known mirror

build.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

imsmanifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The XSD files for SCORM 1.2 are not strictly valid and may cause errors in some
3535
<!-- There is just one organization. The organization contains just one item.-->
3636
<organizations default="hax">
3737
<organization identifier="hax">
38-
<title>haxcellence</title>
38+
<title>HAXcellence</title>
3939
<item identifier="item_1" identifierref="resource_1">
4040
<title>haxcellence</title>
4141
</item>

index.html

+81-59
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
else if (document.location.pathname.indexOf('/sites/') != -1) {
2121
document.write("<base href='" + document.location.pathname.substring(0, document.location.pathname.indexOf('/', document.location.pathname.indexOf('/sites/') + 7)) + "/' />");
2222
}
23+
else if (globalThis.location.host.indexOf('github.io') != -1 && globalThis.location.pathname.split('/').length > 1) {
24+
document.write("<base href='/" + document.location.pathname.split('/')[1] + "/' />");
25+
}
2326
else {
2427
document.write("<base href='/' />");
2528
}
@@ -31,29 +34,29 @@
3134
</script>
3235
<link rel="preload" href="./build.js" as="script" />
3336
<link rel="preload" href="./build-haxcms.js" as="script" />
34-
<link rel="preload" href="./wc-registry.json" as="fetch" crossorigin="anonymous" />
35-
<link rel="preload" href="./build/es6/node_modules/@lrnwebcomponents/dynamic-import-registry/dynamic-import-registry.js" as="script" crossorigin="anonymous" />
36-
<link rel="modulepreload" href="./build/es6/node_modules/@lrnwebcomponents/dynamic-import-registry/dynamic-import-registry.js" />
37-
<link rel="preload" href="./build/es6/node_modules/@lrnwebcomponents/wc-autoload/wc-autoload.js" as="script" crossorigin="anonymous" />
38-
<link rel="modulepreload" href="./build/es6/node_modules/@lrnwebcomponents/wc-autoload/wc-autoload.js" />
39-
<link rel="preload" href="./build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/themes/haxcms-basic-theme.js" as="script" crossorigin="anonymous" />
40-
<link rel="modulepreload" href="./build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/themes/haxcms-basic-theme.js" />
41-
<link rel="preload" href="./build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/base.css" as="style" />
37+
<link rel="preload" href="./wc-registry.json" as="fetch" crossorigin="anonymous" fetchpriority="high" />
38+
<link rel="preload" href="./build/es6/node_modules/@haxtheweb/dynamic-import-registry/dynamic-import-registry.js" as="script" crossorigin="anonymous" />
39+
<link rel="modulepreload" href="./build/es6/node_modules/@haxtheweb/dynamic-import-registry/dynamic-import-registry.js" />
40+
<link rel="preload" href="./build/es6/node_modules/@haxtheweb/wc-autoload/wc-autoload.js" as="script" crossorigin="anonymous" />
41+
<link rel="modulepreload" href="./build/es6/node_modules/@haxtheweb/wc-autoload/wc-autoload.js" />
42+
<link rel="preload" href="./build/es6/node_modules/@haxtheweb/haxcms-elements/lib/core/themes/haxcms-basic-theme.js" as="script" crossorigin="anonymous" />
43+
<link rel="modulepreload" href="./build/es6/node_modules/@haxtheweb/haxcms-elements/lib/core/themes/haxcms-basic-theme.js" />
44+
<link rel="preload" href="./build/es6/node_modules/@haxtheweb/haxcms-elements/lib/base.css" as="style" />
4245
<meta name="generator" content="HAXcms">
4346
<link rel="manifest" href="manifest.json">
4447
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
45-
<link rel="icon" href="files/haxcms-managed/16x16-odl-logo.png">
48+
<link rel="icon" href="assets/icon-48x48.png">
4649
<meta name="theme-color" content="">
4750
<meta name="robots" content="index, follow">
4851
<meta name="mobile-web-app-capable" content="yes">
4952
<meta name="apple-mobile-web-app-capable" content="yes">
5053
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
51-
<link rel="apple-touch-icon" sizes="48x48" href="files/haxcms-managed/48x48-odl-logo.png">
52-
<link rel="apple-touch-icon" sizes="72x72" href="files/haxcms-managed/72x72-odl-logo.png">
53-
<link rel="apple-touch-icon" sizes="96x96" href="files/haxcms-managed/96x96-odl-logo.png">
54-
<link rel="apple-touch-icon" sizes="144x144" href="files/haxcms-managed/144x144-odl-logo.png">
55-
<link rel="apple-touch-icon" sizes="192x192" href="files/haxcms-managed/192x192-odl-logo.png">
56-
<meta name="msapplication-TileImage" content="files/haxcms-managed/144x144-odl-logo.png">
54+
<link rel="apple-touch-icon" sizes="48x48" href="assets/icon-48x48.png">
55+
<link rel="apple-touch-icon" sizes="72x72" href="assets/icon-72x72.png">
56+
<link rel="apple-touch-icon" sizes="96x96" href="assets/icon-96x96.png">
57+
<link rel="apple-touch-icon" sizes="144x144" href="assets/icon-144x144.png">
58+
<link rel="apple-touch-icon" sizes="192x192" href="assets/icon-192x192.png">
59+
<meta name="msapplication-TileImage" content="assets/icon-144x144.png">
5760
<meta name="msapplication-TileColor" content="">
5861
<meta name="msapplication-tap-highlight" content="no">
5962
<meta name="description" content="" />
@@ -69,51 +72,66 @@
6972
<style>
7073
body {
7174
margin: 0;
75+
padding: 0;
7276
min-height: 98vh;
7377
}
74-
.use-modern-browser a {
75-
font-size: 22px;
78+
haxcms-site-builder:not([theme-loaded]) * {
79+
margin-top: 100px;
80+
display: block;
81+
max-width: 50vw;
82+
margin-left: auto;
83+
margin-right: auto;
7684
}
77-
.use-modern-browser {
78-
font-size: 22px;
79-
text-align: center;
80-
width: 100%;
85+
haxcms-site-builder[theme-loaded] .haxcms-theme-element:not(:defined) {
86+
margin-top: 100px;
87+
}
88+
haxcms-site-builder[theme-loaded] .haxcms-theme-element:not(:defined) * {
89+
max-width: 50vw;
90+
margin-left: auto;
91+
margin-right: auto;
92+
}
93+
haxcms-site-builder[theme-loaded] .haxcms-theme-element:not(:defined) *:not(:defined) {
94+
display: block;
95+
min-height: 50px;
96+
min-width: 200px;
8197
}
8298
</style>
8399
<style id="loadingstyles">
84100
haxcms-site-builder {
85101
display: block;
86102
}
87-
body[no-js] haxcms-site-builder {
88-
display: none !important;
103+
body {
104+
background-color: #ffffff;
105+
color: rgba(0,0,0, 0.2);
89106
}
90107
#loading {
91-
background-color: white;
108+
background-color: #ffffff;
92109
bottom: 0px;
93110
left: 0px;
94111
opacity: 1;
95112
position: absolute;
96113
right: 0px;
97114
top: 0px;
98-
transition: all linear 300ms;
99-
-webkit-transition: all linear 300ms;
100115
z-index: 99999999;
101116
}
102-
103117
#loading.loaded {
104-
animation: fade-out .7s ease-in-out;
118+
animation: fade-out .1s ease-in-out;
105119
animation-fill-mode: forwards;
106120
}
107121
#loading div.messaging {
108-
color: rgba(255,255,255, 0.7);
109-
font-family: Roboto;
122+
color: rgba(0,0,0, 0.2);
110123
left: 0px;
111-
margin-top: -75px;
112124
position: absolute;
113125
right: 0px;
114126
text-align: center;
115-
top: 50%;
116-
transform: translateY(-50%);
127+
top: 25vh;
128+
}
129+
#loading div.messaging h1 {
130+
font-family: Helvetica, "Trebuchet MS", Verdana, sans-serif !important;
131+
line-height: 2;
132+
font-size: 18px !important;
133+
margin: 0;
134+
padding: 0;
117135
}
118136

119137
.progress-line,
@@ -123,13 +141,13 @@
123141
margin: auto;
124142
}
125143
.progress-line {
126-
background-color: rgba(0,0,0, 0.05);
144+
background-color: rgba(0,0,0, 0.1);
127145
display: -webkit-flex;
128146
display: flex;
129-
width: 30vw;
147+
width: 50vw;
130148
}
131149
.progress-line:before {
132-
background-color: var(--simple-colors-default-theme--7, #FF2222);
150+
background-color: #FF2222;
133151
content: '';
134152
animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
135153
}
@@ -144,7 +162,7 @@
144162
}
145163
100% {
146164
margin-left: 100%;
147-
margin-right: 0;HAXCMS
165+
margin-right: 0;
148166
}
149167
}
150168
@keyframes fade-out {
@@ -158,53 +176,57 @@
158176
opacity: 0;
159177
}
160178
}
179+
@media (prefers-color-scheme: dark) {
180+
body {
181+
background-color: #333333;
182+
color: rgba(255,255,255, 0.2);
183+
}
184+
#loading {
185+
background-color: #333333;
186+
}
187+
#loading div.messaging {
188+
color: rgba(255,255,255, 0.2);
189+
}
190+
}
161191
</style>
162192
<script id="loadingscript">
163-
window.dataLayer = window.dataLayer || [];
193+
globalThis.dataLayer = globalThis.dataLayer || [];
164194
function gtag(){dataLayer.push(arguments);}
165195
gtag('js', new Date());
166-
window.addEventListener('haxcms-ready', function(e) {
196+
globalThis.addEventListener('haxcms-ready', function(e) {
167197
var s = document.createElement('script');
168198
s.async = true;
169199
document.body.appendChild(s);
170200
// give the web components a second to build
171201
setTimeout(function() {
202+
document.querySelector('#loading').classList.add('loaded');
172203
setTimeout(function() {
173-
if (window.HAXCMS.requestAvailability().store.getManifest()) {
174-
var gaid = window.HAXCMS.requestAvailability().store.getManifest().metadata.site.settings.gaID || null;
175-
if (gaid) {
176-
gtag('config', gaid);
177-
s.src = `https://www.googletagmanager.com/gtag/js?id=${gaid}`;
204+
if (globalThis.HAXCMS.requestAvailability().store.getManifest()) {
205+
var gaid = globalThis.HAXCMS.requestAvailability().store.getManifest().metadata.site.settings.gaID || null;
206+
if (gaid) {
207+
gtag('config', gaid);
208+
s.src = `https://www.googletagmanager.com/gtag/js?id=${gaid}`;
209+
}
178210
}
179-
}
180211
document.querySelector('#loading').parentNode.removeChild(document.querySelector('#loading'));
181212
document.querySelector('#loadingstyles').parentNode.removeChild(document.querySelector('#loadingstyles'));
182213
document.querySelector('#loadingscript').parentNode.removeChild(document.querySelector('#loadingscript'));
183-
}, 600);
184-
}, 100);
214+
}, 100);
215+
}, 300);
185216
});
186217
</script>
187218
</head>
188-
<body no-js vocab="http://schema.org/" prefix="oer:http://oerschema.org cc:http://creativecommons.org/ns dc:http://purl.org/dc/terms/">
219+
<body vocab="http://schema.org/" prefix="oer:http://oerschema.org cc:http://creativecommons.org/ns dc:http://purl.org/dc/terms/">
189220
<div id="loading">
190221
<div class="messaging">
191222
<div class="progress-line"></div>
192223
<h1 role="alert" aria-busy="true">Loading..</h1>
193224
</div>
194225
</div>
195226
<haxcms-site-builder id="site" file="site.json?2GQKWcJ3ni0xrL2X4_Dw_Sr9SeXqY2Sk3XblmvHVArA"></haxcms-site-builder>
196-
<div id="haxcmsoutdatedfallback">
197-
<div id="haxcmsoutdatedfallbacksuperold">
198-
<iframe id="outline" style="width:18%;float:left;height:90vh;padding:0;margin:0;" name="outline" id="frame1"
199-
src="legacy-outline.html" loading="lazy"></iframe>
200-
<iframe id="content" style="width:80%;float:left;height:90vh;padding:0;margin:0;" name="content" id="frame2" src="" loading="lazy"></iframe>
201-
<div class="use-modern-browser">Please use a modern browser to
202-
view our website correctly. <a href="http://outdatedbrowser.com/">Update my browser now</a></div>
203-
</div>
204-
</div>
205227
<script>
206-
window.MicroFrontendRegistryConfig = window.MicroFrontendRegistryConfig || {};
207-
window.HAXCMSContext="php";document.body.removeAttribute('no-js');window.__appCDN="./";window.__appForceUpgrade=false;</script>
228+
globalThis.MicroFrontendRegistryConfig = globalThis.MicroFrontendRegistryConfig || {};
229+
globalThis.HAXCMSContext="php";globalThis.__appCDN="./";</script>
208230
<script src="./build-haxcms.js"></script>
209231
<script src="./build.js"></script>
210232
</body>

0 commit comments

Comments
 (0)