-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
614 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Modern browser required</title> | ||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" crossorigin> | ||
<style> | ||
body { | ||
margin: 0; | ||
min-height: 100vh; | ||
} | ||
.header--lg { | ||
color: #444; | ||
font-size: 1.75rem; | ||
font-weight: bold; | ||
padding: 10px; | ||
margin: 0; | ||
} | ||
|
||
.check-browser { | ||
text-align: center; | ||
padding: 1rem; | ||
} | ||
|
||
.check-browser .message--warning { | ||
background-color: #BB0000; | ||
color: #ffffff; | ||
padding: 2rem; | ||
font-size: 26px; | ||
} | ||
|
||
.check-browser__icon-container { | ||
display: inline-block; | ||
color: #000000; | ||
text-align: center; | ||
} | ||
|
||
a { | ||
float: left; | ||
width: 150px; | ||
height: 150px; | ||
display: block; | ||
text-decoration: none; | ||
margin: 1rem .5rem; | ||
padding: 0; | ||
outline-width: 10px; | ||
outline-color: blueviolet; | ||
color: black; | ||
} | ||
|
||
a .check-browser__icon { | ||
clear: both; | ||
padding: 2.5rem 2rem; | ||
text-decoration: none; | ||
} | ||
|
||
.check-browser--chrome { | ||
background-color: #ffb31a; | ||
} | ||
|
||
.check-browser--firefox { | ||
background-color: #f78009; | ||
} | ||
|
||
.check-browser--edge { | ||
background-color: #33ccff; | ||
} | ||
|
||
.check-browser--safari { | ||
background-color: #0099ff; | ||
} | ||
|
||
.check-browser--opera { | ||
background-color: #ff4d4d; | ||
} | ||
|
||
.icon--browser { | ||
color: #fff; | ||
font-size: 3rem; | ||
padding-bottom: 1rem; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="check-browser"> | ||
<h1 class="header--lg">Outdated browser detected</h1> | ||
|
||
<p class="message--warning"> | ||
This website requires a modern browser to give the best experience possible. | ||
</p> | ||
<p> | ||
Upgrade your browser to the latest version or download one of these browsers: | ||
</p> | ||
|
||
<div class="check-browser__icon-container"> | ||
<a href="http://www.mozilla.com/firefox" target="_blank" rel="noopener noreferrer"> | ||
<div class="check-browser__icon check-browser--firefox"> | ||
<span><i class="fa fa-firefox icon--browser"></i></span> | ||
<br>Firefox | ||
<br>(Mozilla) | ||
</div> | ||
</a> | ||
<a href="https://www.google.com/chrome" target="_blank" rel="noopener noreferrer"> | ||
<div class="check-browser__icon check-browser--chrome"> | ||
<span><i class="fa fa-chrome icon--browser"></i></span> | ||
<br> | ||
Chrome | ||
<br>(Google) | ||
</div> | ||
</a> | ||
<a href="https://www.microsoftedgeinsider.com/en-us/" target="_blank" rel="noopener noreferrer"> | ||
<div class="check-browser__icon check-browser--edge"> | ||
<span><i class="fa fa-edge icon--browser"></i></span> | ||
<br>Edge | ||
<br>(Microsoft) | ||
</div> | ||
</a> | ||
<a href="https://support.apple.com/downloads/safari" target="_blank" rel="noopener noreferrer"> | ||
<div class="check-browser__icon check-browser--safari"> | ||
<span><i class="fa fa-safari icon--browser"></i></span> | ||
<br>Safari | ||
<br>(Apple) | ||
</div> | ||
</a> | ||
<a href="http://www.opera.com/download/"> | ||
<div class="check-browser__icon check-browser--opera" target="_blank" rel="noopener noreferrer"> | ||
<span><i class="fa fa-opera icon--browser"></i></span> | ||
|
||
<br> Opera | ||
<br> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// overload how define works so that we can prevent bricking issues | ||
// when classes get loaded from multiple sources with the same name space | ||
// this is a copy of the dedup-fix.js script we use in local testing / es5 routines | ||
const _customElementsDefine = window.customElements.define; | ||
window.customElements.define = (name, cl, conf) => { | ||
if (!customElements.get(name)) { | ||
_customElementsDefine.call(window.customElements, name, cl, conf); | ||
} else { | ||
console.warn(`${name} has been defined twice`); | ||
} | ||
}; | ||
// HAXcms specific clean up and platforn integration | ||
// this ties in custom theme files as well as removes DOM nodes related | ||
// to serving a legacy audience in the event this is evergreen (most times) | ||
if (/^h/.test(document.location)) { | ||
try { | ||
var scriptDef = document.getElementsByTagName('script')[0]; | ||
// if a dynamic import fails, we bail over to the compiled version | ||
new Function('import("");'); | ||
// remove fallback cause if we passed dynamic import then we are evergreen | ||
if (document.getElementById("haxcmsoutdatedfallback")) { | ||
document.body.removeChild(document.getElementById("haxcmsoutdatedfallback")); | ||
} | ||
if (!window.__appCustomEnv) { | ||
var build2 = document.createElement('script'); | ||
build2.src = './custom/build/custom.es6.js'; | ||
build2.type = 'module'; | ||
scriptDef.parentNode.insertBefore(build2, scriptDef); | ||
} | ||
} catch (err) { | ||
var ancient=false; | ||
try { | ||
if (typeof Symbol == "undefined") { // IE 11, at least try to serve a watered down site | ||
ancient = true; | ||
} | ||
new Function('let a;'); // bizarre but needed for Safari 9 bc of when it was made | ||
} | ||
catch (err) { | ||
ancient = true; | ||
} | ||
if (!ancient) { | ||
// remove fallback cause if we passed dynamic import then we are evergreen | ||
if (document.getElementById("haxcmsoutdatedfallback")) { | ||
document.body.removeChild(document.getElementById("haxcmsoutdatedfallback")); | ||
} | ||
} | ||
else { | ||
// we bombed somewhere above, this implies that it's some odd between version | ||
// most likely Safari 9ish, IE pre 11 and anything uber old. Serve no JS variation | ||
if (document.getElementById('site')) { | ||
document.getElementById('site').style.display = 'none'; | ||
document.getElementById('haxcmsoutdatedfallbacksuperold').style.display = 'block'; | ||
} | ||
} | ||
} | ||
} else { | ||
// this implies we are offline, viewing the files locally | ||
// so let's show the simplistic site viewer / iframe theme | ||
if (document.getElementById('site')) { | ||
document.getElementById('site').style.display = 'none'; | ||
document.getElementById('haxcmsoutdatedfallbacksuperold').style.display = 'block'; | ||
} | ||
} | ||
var cdn = "./"; | ||
if (window.__appCDN) { | ||
cdn = window.__appCDN; | ||
} | ||
// reset styles that we apply to all hax sites for some level of normalization | ||
// across base HTML tags as well as css vars for styling system wide things from 1 place | ||
var baseResetStyles = 'build/es6/node_modules/@haxtheweb/haxcms-elements/lib/base.css'; | ||
// css files load faster when implemented this way | ||
var link = document.createElement('link'); | ||
link.rel = 'stylesheet'; | ||
link.href = cdn + baseResetStyles; | ||
link.type = 'text/css'; | ||
link.onerror = (e) => { haxcmsFallbackStylesError(e);}; | ||
// get first link in the document | ||
var linkDef = document.getElementsByTagName('link')[0]; | ||
linkDef.parentNode.insertBefore(link, linkDef); | ||
if (!window.__appCustomEnv) { | ||
var link2 = document.createElement('link'); | ||
link2.rel = 'stylesheet'; | ||
link2.href = './theme/theme.css'; | ||
link2.type = 'text/css'; | ||
linkDef.parentNode.insertBefore(link2, linkDef); | ||
} | ||
// if we fail to load the module, we need to fall back to known sources | ||
// and reattempt to inject the CDN location. This is a last ditch effort | ||
// though opens the ability for us to download user sites and if plugged | ||
// into other hax housing then it'll work but also just work stand alone | ||
// as a downloaded package | ||
var haxCdn = cdn; | ||
function haxcmsFallbackStylesError(e) { | ||
var cdn = haxCdn; | ||
if (!window.__appCDNBlockFallback) { | ||
var link = document.createElement('link'); | ||
link.rel = 'stylesheet'; | ||
link.type = 'text/css'; | ||
link.onerror = (e) => { haxcmsFallbackStylesError(e);}; | ||
// if the module fails to load at the set CDN location, try to fail back to known sources | ||
if (cdn === "./") { | ||
// hax cloud fallback | ||
haxCdn = "https://cdn.hax.cloud/cdn/"; | ||
link.href = haxCdn + baseResetStyles; | ||
linkDef.parentNode.insertBefore(link, linkDef); | ||
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); | ||
} | ||
else if (cdn === "https://cdn.hax.cloud/cdn/") { | ||
// psu mirror | ||
haxCdn = "https://cdn.webcomponents.psu.edu/cdn/"; | ||
link.href = haxCdn + baseResetStyles; | ||
linkDef.parentNode.insertBefore(link, linkDef); | ||
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); | ||
} | ||
else if (cdn === "https://cdn.webcomponents.psu.edu/cdn/") { | ||
// known mirror | ||
haxCdn = "https://cdn.waxam.io/"; | ||
link.href = haxCdn + baseResetStyles; | ||
linkDef.parentNode.insertBefore(link, linkDef); | ||
console.warn(cdn + " failed to respond, styles back to alternative: " + haxCdn); | ||
} | ||
else { | ||
// :( we're out of options, just reset these values to default | ||
// but we aren't working in this scenario bc both CDNs failed | ||
// and local delivery could not be found | ||
haxCdn = "./"; | ||
console.error("Styles Local delivery failed and all alternative CDNs failed to load. You might be offline, in a secure environment or doing testing intentionally to generate this *shrug*"); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import"./build-cms.js"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.