use Tabs;
use PDF;
use Screensaver;
+ use PWA;
/** @var Lock */
protected $lock;
$this->log('Search written');
$this->writeAccessibility();
$this->log('Accessibility written');
+ $this->writePWA();
+ $this->log('PWA written');
$this->writeExtras();
$this->log('Extras written');
$this->populateConfig();
</script>';
}
+ $pwa = $this->getPWAMarkup();
+
$this->log('Got index vars 5');
- $vars = array('lang', 'titre', 'credits', 'style', 'script', 'pagesContents', 'print', 'splash', 'splashstyles', 'cache', 'bgcolor', 'message', 'favicon', 'svg', 'beginbody', 'csp', 'opengraph', 'twittercard', 'description', 'console');
+ $vars = array('lang', 'titre', 'credits', 'style', 'script', 'pagesContents', 'print', 'splash', 'splashstyles', 'cache', 'bgcolor', 'message', 'favicon', 'svg', 'beginbody', 'csp', 'opengraph', 'twittercard', 'description', 'console', 'pwa');
$res = [];
foreach ($vars as $v) {
--- /dev/null
+<?php
+
+namespace App\Fluidbook\Compiler;
+
+trait PWA
+{
+ protected function writePWA()
+ {
+
+ }
+
+ protected function getPWAMarkup()
+ {
+ $res = '';
+ if ($this->config->pwa_ios) {
+ $res .= '<meta name="apple-mobile-web-app-title" content="' . e($this->config->pwa_ios_title ?? $this->config->title) . '">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">';
+ }
+ return $res;
+ }
+}