Added manifest and noscript for PWA start

This commit is contained in:
xevidos 2020-08-25 09:57:50 -04:00
parent 0785970628
commit d26394f151
2 changed files with 39 additions and 0 deletions

View file

@ -26,7 +26,12 @@ if( isset( $_SESSION['theme'] ) ) {
initial-scale=1.0, initial-scale=1.0,
maximum-scale=1.0, maximum-scale=1.0,
user-scalable=no"> user-scalable=no">
<meta name="theme-color" content="#1a1a1a">
<title><?php echo SITE_NAME;?></title> <title><?php echo SITE_NAME;?></title>
<link rel="manifest" href="manifest.php">
<script> <script>
var theme = `<?php echo $theme;?>`; var theme = `<?php echo $theme;?>`;
@ -61,6 +66,9 @@ if( isset( $_SESSION['theme'] ) ) {
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<noscript>
<p style="color: #FFF;text-align:center;">This page requires javascript!<br>Please enable javascript and come back!</p>
</noscript>
<div class="lds-container"> <div class="lds-container">
<div class="lds-dual-ring"></div> <div class="lds-dual-ring"></div>
</div> </div>

31
manifest.php Normal file
View file

@ -0,0 +1,31 @@
<?php
$manifest = array(
"short_name" => "Codiad",
"name" => "Codiad",
"description" => "A code editor.",
"icons" => array(
array(
"src" => "/images/icons-192.png",
"type" => "image/png",
"sizes" => "192x192"
),
array(
"src" => "/images/icons-512.png",
"type" => "image/png",
"sizes" => "512x512"
),
),
"start_url" => "",
"background_color" => "#1a1a1a",
"display" => "standalone",
"scope" => "",
"theme_color" => "#1a1a1a",
"shortcuts" => array(),
);
exit( json_encode( $manifest ) );
?>