-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to v0.0.9, check CHANGELOG.md for changes.
- Loading branch information
Diemen Design
committed
Dec 21, 2019
1 parent
1b80341
commit 69b3754
Showing
42 changed files
with
284 additions
and
138 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
v0.0.8 | ||
v0.0.9 |
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
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.
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.
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 |
---|---|---|
|
@@ -7,9 +7,10 @@ | |
* @author Dennis Suitters <[email protected]> | ||
* @copyright 2014-2019 Diemen Design | ||
* @license http://opensource.org/licenses/MIT MIT License | ||
* @version 0.0.8 | ||
* @version 0.0.9 | ||
* @link https://github.com/DiemenDesign/AuroraCMS | ||
* @notes This PHP Script is designed to be executed using PHP 7+ | ||
* @changes v0.0.9 Fix referencing Logo | ||
*/ | ||
header('Content-Type: application/javascript'); | ||
header('Service-Worker-Allowed:/'); | ||
|
@@ -20,6 +21,19 @@ | |
if(!defined('THEME'))define('THEME','..'.DS.'..'.DS.'layout'.DS.$config['theme']); | ||
if(!defined('URL'))define('URL',PROTOCOL.$_SERVER['HTTP_HOST'].$settings['system']['url'].'/'); | ||
$html=file_get_contents(THEME.DS."offline.html"); | ||
$logo=THEME.DS.'images'.DS.'offlinelogo.png'; | ||
if(file_exists(THEME.DS.'images'.DS.'offlinelogo.jpg')) | ||
$logo=THEME.DS.'images'.DS.'offlinelogo.jpg'; | ||
elseif(file_exists(THEME.DS.'images'.DS.'logo.png')) | ||
$logo=THEME.DS.'images'.DS.'logo.png'; | ||
elseif(file_exists(THEME.DS.'images'.DS.'logo.jpg')) | ||
$logo=THEME.DS.'images'.DS.'logo.jpg'; | ||
elseif(file_exists(THEME.DS.'images'.DS.str_replace(' ','-',$config['business']).'.png')) | ||
$logo=THEME.DS.'images'.DS.str_replace(' ','-',$config['business']).'.png'; | ||
elseif(file_exists(THEME.DS.'images'.DS.str_replace(' ','-',$config['business']).'.jpg')) | ||
$logo=THEME.DS.'images'.DS.str_replace(' ','-',$config['business']).'.jpg'; | ||
else | ||
$logo=THEME.DS.'images'.DS.'offlinelogo.png'; | ||
$html=preg_replace([ | ||
'/<print seo=[\'\"]?title[\'\"]?>/', | ||
'/<print css=[\'\"]?bootstrap[\'\"]?>/', | ||
|
@@ -34,9 +48,7 @@ | |
($config['business']!=''?$config['business']:'AuroraCMS Offline'), | ||
file_get_contents(THEME.DS.'css'.DS.'bootstrap.min.css'), | ||
file_get_contents(THEME.DS.'css'.DS.'offline.css'), | ||
(file_exists(THEME.DS.'images'.DS.'offlinelogo.png')? | ||
'data:'.mime_content_type(THEME.DS.'images'.DS.'offlinelogo.png').';base64,'.base64_encode(file_get_contents(THEME.DS.'images'.DS.'offlinelogo.png')): | ||
'data:'.mime_content_type(THEME.DS.'images'.DS.'logo.png').';base64,'.base64_encode(file_get_contents(THEME.DS.'images'.DS.'logo.png'))), | ||
'data:'.mime_content_type($logo).';base64,'.base64_encode(file_get_contents($logo)), | ||
($config['business']!=''?$config['business']:'AuroraCMS Offline Logo'), | ||
($config['email']!=''?'Email: <a href="mailto:'.$config['email'].'">'.$config['email'].'</a>':''), | ||
($config['phone']!=''?'Phone: <a href="tel:'.$config['phone'].'">'.$config['phone'].'</a>':''), | ||
|
@@ -56,6 +68,7 @@ | |
return cache.addAll(offlineFallbackPages); | ||
}) | ||
); | ||
self.skipWaiting(); | ||
}); | ||
|
||
self.addEventListener('fetch',event=>{ | ||
|
Oops, something went wrong.