-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): use path-location instead of hash
- Loading branch information
Showing
12 changed files
with
101 additions
and
115 deletions.
There are no files selected for viewing
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
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,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>404</title> | ||
|
||
<base href="/nebular/"> | ||
|
||
<script type="text/javascript" src="assets/ghspa.js"></script> | ||
</head> | ||
|
||
<body> | ||
| ||
| ||
| ||
| ||
</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
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
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
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
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
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,54 @@ | ||
/** | ||
* | ||
* ____ _ ___ _ _ _ _ ___ ___ ____ ____ ____ ____ ____ ___ ____ | ||
* | __ | | |__| | | |__] |__] |__| | __ |___ [__ [__ |__] |__| | ||
* |__] | | | | |__| |__] | | | |__] |___ ___] ___] | | | | ||
* | ||
* Easy way to enable Single Page Applications for GitHub Pages | ||
* | ||
* This project was released under MIT license. | ||
* | ||
* @link https://github.com/rafrex/spa-github-pages | ||
* @author Rafael Pedicini <code@rafrex.com> | ||
* @link http://websemantics.ca | ||
* @author Adnan M.Sagar, PhD. <adnan@websemantics.ca> | ||
* | ||
* @param {Object} l, the document current location | ||
* @param {Boolean} projectPages, true by default, https://help.github.com/articles/user-organization-and-project-pages | ||
* | ||
*/ | ||
|
||
;(function(l, projectPages) { | ||
|
||
var repo = projectPages ? '/' + l.pathname.split('/')[1] : ''; | ||
|
||
/* redirect all 404 trafic to index.html */ | ||
function redirect() { | ||
l.replace(l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + repo + '/?' + | ||
(l.pathname ? 'p=' + l.pathname.replace(/&/g, '~and~').replace(repo, '') : '') + | ||
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') + | ||
(l.hash)) | ||
} | ||
|
||
/* resolve 404 redirects into internal routes */ | ||
function resolve() { | ||
if (l.search) { | ||
var q = {}; | ||
l.search.slice(1).split('&').forEach(function(v) { | ||
var a = v.split('='); | ||
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&') | ||
}); | ||
if (q.p !== undefined) { | ||
window.history.replaceState(null, null, | ||
repo + (q.p || '') + | ||
(q.q ? ('?' + q.q) : '') + | ||
l.hash | ||
) | ||
} | ||
} | ||
} | ||
|
||
/* if current document is 404 page page, redirect to index.html otherwise resolve */ | ||
document.title === '404' ? redirect() : resolve() | ||
|
||
}(window.location, window.projectPages || true )); |
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 |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
export const environment = { | ||
production: true, | ||
examplesUrl: 'run/', | ||
}; |
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 |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
export const environment = { | ||
production: false, | ||
examplesUrl: '', | ||
}; |
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
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