dmi3yy/evocms-pwa

Evolution CMS 2.0 Progressive Web App package

Installs: 32

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:package

0.0.4 2020-04-06 18:58 UTC

This package is auto-updated.

Last update: 2024-11-13 22:38:36 UTC


README

Evolution CMS 2.0 Progressive Web App package

Install

php artisan package:installrequire dmi3yy/evocms-pwa '*' in you core/ folder

php artisan pwa:install

Settings:

  1. Edit config in file: /core/custom/config/cms/settings/pwa.php

  2. In head add: @evopwa(), or add this code:

<link rel="manifest" href="/evo-manifest.json">
<meta name="theme-color" content="#000000"> 
<link rel="apple-touch-icon" href="/assets/images/evo-logo.png"> 
<script type="text/javascript">
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('/evo-serviceworker.js', {
            scope: '.' 
        }).then(function (registration) {
            console.log('ServiceWorker registration successful with scope: ', registration.scope);
        }, function (err) {
            console.log('ServiceWorker registration failed: ', err);
        });
    }
</script>