PHP code example of owebstudio / kirby-pwa

1. Go to this page and download the library: Download owebstudio/kirby-pwa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

owebstudio / kirby-pwa example snippets


 snippet('pwa') 



return [
    'owebstudio.pwa' => [
        'enable' => true,
        'manifest' => [
            'name' => 'My Site',
            'short_name' => 'Site',
            'description' => 'News and notes from my site',
            'background_color' => '#ffffff',
            'theme_color' => '#000000',
            'display' => 'standalone'
        ],
        'icons' => [
            '192x192' => 'assets/icons/icon-192x192.png',
            '512x512' => 'assets/icons/icon-512x512.png',
            '1024x1024' => [
                'path' => 'assets/icons/icon-maskable.png',
                'purpose' => 'maskable'
            ]
        ]
    ]
];

 snippet('pwa/install') 

 snippet('pwa/install', [
    'label' => 'Get the app',
    'hint' => false, // no hint on iOS
    'class' => 'button'
]) 

 snippet('pwa/update')