Add (pwa)

This commit is contained in:
2023-09-25 00:08:16 +08:00
parent 8d7ae47036
commit cb4b7e9baa
84 changed files with 304 additions and 33 deletions

View File

@@ -20,6 +20,7 @@
"laravel/tinker": "^2.8",
"league/flysystem-aws-s3-v3": "^3.0",
"predis/predis": "^2.2",
"silviolleite/laravelpwa": "^2.0",
"spatie/laravel-feed": "^4.3",
"spatie/laravel-googletagmanager": "^2.6",
"spatie/laravel-sitemap": "^6.3",

52
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1471d10bc74cb3cbd2259613ca941433",
"content-hash": "189360d364c9c9dd3b0432c0e6525083",
"packages": [
{
"name": "artesaos/seotools",
@@ -3958,6 +3958,56 @@
],
"time": "2023-04-15T23:01:58+00:00"
},
{
"name": "silviolleite/laravelpwa",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/silviolleite/laravel-pwa.git",
"reference": "5f7135d2ee870af01793c9fdf6b1b932b546e20e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silviolleite/laravel-pwa/zipball/5f7135d2ee870af01793c9fdf6b1b932b546e20e",
"reference": "5f7135d2ee870af01793c9fdf6b1b932b546e20e",
"shasum": ""
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"LaravelPWA\\Providers\\LaravelPWAServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"LaravelPWA\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Silvio Luis Leite",
"email": "silviolleite@gmail.com"
}
],
"description": "Looks like an app, feels like an app, but NOT an app.",
"keywords": [
"laravel",
"php",
"progressive web apps",
"pwa"
],
"support": {
"issues": "https://github.com/silviolleite/laravel-pwa/issues",
"source": "https://github.com/silviolleite/laravel-pwa/tree/2.0.3"
},
"time": "2020-08-20T12:19:16+00:00"
},
{
"name": "spatie/browsershot",
"version": "3.58.2",

67
config/laravelpwa.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
return [
'name' => 'EchoScoop',
'manifest' => [
'name' => env('APP_NAME', 'EchoScoop'),
'short_name' => 'PWA',
'start_url' => '/',
'background_color' => '#ffffff',
'theme_color' => '#000000',
'display' => 'standalone',
'orientation' => 'any',
'status_bar' => 'black',
'icons' => [
'48x48' => [
'path' => '/pwa/icon-48x48.png',
'purpose' => 'any',
],
'72x72' => [
'path' => '/pwa/icon-72x72.png',
'purpose' => 'any',
],
'96x96' => [
'path' => '/pwa/icon-96x96.png',
'purpose' => 'any',
],
'128x128' => [
'path' => '/pwa/icon-128x128.png',
'purpose' => 'any',
],
'144x144' => [
'path' => '/pwa/icon-144x144.png',
'purpose' => 'any',
],
'152x152' => [
'path' => '/pwa/icon-152x152.png',
'purpose' => 'any',
],
'192x192' => [
'path' => '/pwa/icon-192x192.png',
'purpose' => 'any',
],
'384x384' => [
'path' => '/pwa/icon-384x384.png',
'purpose' => 'any',
],
'512x512' => [
'path' => '/pwa/icon-512x512.png',
'purpose' => 'any',
],
],
'splash' => [
'640x1136' => '/pwa/apple-splash-640x1136.png',
'750x1334' => '/pwa/apple-splash-750x1334.png',
'828x1792' => '/pwa/apple-splash-828x1792.png',
'1125x2436' => '/pwa/apple-splash-1125x2436.png',
'1242x2208' => '/pwa/apple-splash-1242x2208.png',
'1242x2688' => '/pwa/apple-splash-1242x2688.png',
'1536x2048' => '/pwa/apple-splash-1536x2048.png',
'1668x2224' => '/pwa/apple-splash-1668x2224.png',
'1668x2388' => '/pwa/apple-splash-1668x2388.png',
'2048x2732' => '/pwa/apple-splash-2048x2732.png',
],
'shortcuts' => [],
'custom' => [],
],
];

View File

@@ -1 +1 @@
import{_ as o,o as p,c,a as r,b as u,p as i,d as m,e as g,f as _,g as d,v as f,Z as n,h as l}from"./vue-8a418f6a.js";const A={name:"AppAuth"};function $(s,a,t,Z,w,x){return p(),c("div")}const h=o(A,[["render",$]]),e=r({AppAuth:h}),v=Object.assign({});e.use(u());e.use(i,m);e.use(g);e.use(_);e.use(d);e.use(f.ZiggyVue,n);window.Ziggy=n;Object.entries({...v}).forEach(([s,a])=>{const t=s.split("/").pop().replace(/\.\w+$/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e.component(t,l(a))});e.mount("#app");
import{_ as o,o as p,c,a as r,b as u,p as i,d as m,e as g,f as _,g as d,v as f,Z as n,h as l}from"./vue-8b92bff6.js";const A={name:"AppAuth"};function $(s,a,t,Z,w,x){return p(),c("div")}const h=o(A,[["render",$]]),e=r({AppAuth:h}),v=Object.assign({});e.use(u());e.use(i,m);e.use(g);e.use(_);e.use(d);e.use(f.ZiggyVue,n);window.Ziggy=n;Object.entries({...v}).forEach(([s,a])=>{const t=s.split("/").pop().replace(/\.\w+$/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e.component(t,l(a))});e.mount("#app");

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{
"_vue-8a418f6a.js": {
"_vue-8b92bff6.js": {
"css": [
"assets/vue-935fc652.css"
],
"file": "assets/vue-8a418f6a.js"
"file": "assets/vue-8b92bff6.js"
},
"node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff": {
"file": "assets/bootstrap-icons-4d4572ef.woff",
@@ -50,17 +50,17 @@
"src": "resources/fonts/Inter/Inter-Thin.ttf"
},
"resources/js/app-auth.js": {
"file": "assets/app-auth-c0ceb740.js",
"file": "assets/app-auth-4b2e1a84.js",
"imports": [
"_vue-8a418f6a.js"
"_vue-8b92bff6.js"
],
"isEntry": true,
"src": "resources/js/app-auth.js"
},
"resources/js/app-front.js": {
"file": "assets/app-front-d35e891f.js",
"file": "assets/app-front-83914abf.js",
"imports": [
"_vue-8a418f6a.js"
"_vue-8b92bff6.js"
],
"isEntry": true,
"src": "resources/js/app-front.js"

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,7 @@
<svg width="523" height="512" viewBox="0 0 523 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8">
<path d="M246.788 90.3222L203.024 133.608C200.874 135.734 201.074 139.257 203.306 141.296C221.183 157.624 250.077 198.024 250.077 256.316C250.077 314.608 221.183 355.007 203.306 371.336C201.074 373.374 200.874 376.897 203.024 379.023L246.788 422.31C248.644 424.146 251.584 424.271 253.482 422.477C278.031 399.259 321.19 338.526 321.19 256.316C321.19 174.105 278.031 113.373 253.482 90.1549C251.584 88.3606 248.644 88.4858 246.788 90.3222Z" fill="#0F6DFF"/>
<path d="M291.704 45.8956L335.64 2.43971C337.512 0.587612 340.504 0.500375 342.422 2.3063C378.923 36.6909 445.637 130.282 445.637 256.316C445.637 382.35 378.923 475.941 342.422 510.325C340.504 512.131 337.512 512.044 335.64 510.192L291.704 466.736C289.63 464.684 289.721 461.327 291.847 459.329C321.739 431.228 374.524 357.159 374.524 256.316C374.524 155.473 321.739 81.4042 291.847 53.3029C289.721 51.3045 289.63 47.9473 291.704 45.8956Z" fill="#0F6DFF"/>
<path d="M98.7111 271.697V277.596C98.7111 288.164 100.642 295.373 104.505 299.223C108.368 302.992 115.642 304.876 126.326 304.876H146.544C154.927 304.876 161.132 304.098 165.159 302.541C169.186 300.985 171.857 298.24 173.172 294.308C174.076 291.195 175.309 288.819 176.871 287.181C178.515 285.542 180.98 284.723 184.268 284.723C187.719 284.723 190.349 285.624 192.158 287.427C193.966 289.229 194.541 291.85 193.883 295.291C192.075 305.45 187.226 313.027 179.336 318.025C171.446 323.022 160.516 325.521 146.544 325.521H126.326C109.971 325.521 97.807 321.588 89.8349 313.724C81.945 305.859 78 293.817 78 277.596V249.087C78 232.456 81.945 220.25 89.8349 212.467C97.807 204.603 109.971 200.752 126.326 200.916H146.544C162.981 200.916 175.145 204.848 183.035 212.713C190.925 220.496 194.87 232.62 194.87 249.087V261.375C194.87 268.257 191.418 271.697 184.514 271.697H98.7111ZM126.326 221.561C115.642 221.397 108.368 223.24 104.505 227.091C100.642 230.941 98.7111 238.273 98.7111 249.087V251.053H174.159V249.087C174.159 238.355 172.227 231.105 168.364 227.336C164.584 223.486 157.31 221.561 146.544 221.561H126.326Z" fill="#0F6DFF"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,12 @@
<svg width="800" height="800" viewBox="0 0 800 800" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8" clip-path="url(#clip0_1_2)">
<path d="M378.586 138.414L306.07 210.139C303.921 212.265 304.115 215.778 306.398 217.759C334.06 241.752 381.876 305.878 381.876 399.615C381.876 493.352 334.06 557.478 306.398 581.471C304.115 583.452 303.921 586.965 306.07 589.091L378.586 660.816C380.443 662.652 383.4 662.76 385.323 660.993C423.312 626.088 492.991 530.189 492.991 399.615C492.991 269.041 423.312 173.142 385.323 138.237C383.4 136.47 380.443 136.578 378.586 138.414Z" fill="#0F6DFF"/>
<path d="M444.755 72.968L517.442 1.07372C519.315 -0.778377 522.254 -0.91147 524.19 0.874038C580.754 53.0378 687.444 200.385 687.444 399.615C687.444 598.845 580.754 746.192 524.19 798.356C522.254 800.141 519.315 800.008 517.442 798.156L444.755 726.262C442.68 724.21 442.786 720.839 444.94 718.871C491.203 676.593 576.328 559.693 576.328 399.615C576.328 239.537 491.203 122.636 444.94 80.3589C442.786 78.3907 442.68 75.0197 444.755 72.968Z" fill="#0F6DFF"/>
<path d="M145.362 423.649V432.866C145.362 449.378 148.38 460.643 154.415 466.659C160.451 472.548 171.816 475.492 188.511 475.492H220.102C233.201 475.492 242.896 474.276 249.189 471.844C255.481 469.412 259.655 465.123 261.71 458.979C263.122 454.115 265.049 450.403 267.489 447.842C270.057 445.282 273.91 444.002 279.046 444.002C284.44 444.002 288.55 445.41 291.375 448.226C294.2 451.043 295.099 455.139 294.072 460.515C291.246 476.388 283.67 488.229 271.341 496.037C259.013 503.845 241.933 507.75 220.102 507.75H188.511C162.955 507.75 143.949 501.605 131.492 489.317C119.164 477.028 113 458.211 113 432.866V388.319C113 362.334 119.164 343.261 131.492 331.1C143.949 318.812 162.955 312.795 188.511 313.051H220.102C245.786 313.051 264.792 319.196 277.12 331.484C289.448 343.645 295.613 362.59 295.613 388.319V407.52C295.613 418.273 290.219 423.649 279.432 423.649H145.362ZM188.511 345.309C171.816 345.053 160.451 347.933 154.415 353.949C148.38 359.966 145.362 371.422 145.362 388.319V391.391H263.251V388.319C263.251 371.55 260.233 360.222 254.197 354.333C248.29 348.317 236.925 345.309 220.102 345.309H188.511Z" fill="#0F6DFF"/>
</g>
<defs>
<clipPath id="clip0_1_2">
<rect width="800" height="800" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
public/pwa/favicon-196.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
public/pwa/icon-128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
public/pwa/icon-144x144.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
public/pwa/icon-152x152.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
public/pwa/icon-192x192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
public/pwa/icon-384x384.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/pwa/icon-48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
public/pwa/icon-512x512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
public/pwa/icon-72x72.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
public/pwa/icon-96x96.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

67
public/serviceworker.js Normal file
View File

@@ -0,0 +1,67 @@
var staticCacheName = "pwa-v" + new Date().getTime();
var filesToCache = [
// ... (your other initial paths)
"/images/icons/icon-72x72.png",
"/images/icons/icon-96x96.png",
"/images/icons/icon-128x128.png",
"/images/icons/icon-144x144.png",
"/images/icons/icon-152x152.png",
"/images/icons/icon-192x192.png",
"/images/icons/icon-384x384.png",
"/images/icons/icon-512x512.png",
];
self.addEventListener("install", (event) => {
this.skipWaiting();
event.waitUntil(
fetch("/manifest.json")
.then((response) => {
if (!response.ok) {
throw new Error("Failed to fetch manifest");
}
return response.json();
})
.then((manifest) => {
for (let key in manifest) {
if (manifest[key].hasOwnProperty("file")) {
filesToCache.push("/build/" + manifest[key].file); // Prefixing with "/build/"
}
}
return caches.open(staticCacheName).then((cache) => {
return cache.addAll(filesToCache);
});
})
.catch((error) => {
console.error("Error while caching files from manifest:", error);
}),
);
});
// Clear cache on activate
self.addEventListener("activate", (event) => {
event.waitUntil(
caches.keys().then((cacheNames) => {
return Promise.all(
cacheNames
.filter((cacheName) => cacheName.startsWith("pwa-"))
.filter((cacheName) => cacheName !== staticCacheName)
.map((cacheName) => caches.delete(cacheName)),
);
}),
);
});
// Serve from Cache
self.addEventListener("fetch", (event) => {
event.respondWith(
caches
.match(event.request)
.then((response) => {
return response || fetch(event.request);
})
.catch(() => {
return caches.match("offline");
}),
);
});

View File

@@ -1,4 +1,4 @@
const Ziggy = {"url":"https:\/\/echoscoop.com","port":null,"defaults":{},"routes":{"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"feeds.main":{"uri":"feeds\/posts-feed","methods":["GET","HEAD"]},"front.home":{"uri":"\/","methods":["GET","HEAD"]},"front.terms":{"uri":"terms","methods":["GET","HEAD"]},"front.privacy":{"uri":"privacy","methods":["GET","HEAD"]},"front.disclaimer":{"uri":"disclaimer","methods":["GET","HEAD"]},"front.all":{"uri":"news","methods":["GET","HEAD"]},"front.post":{"uri":"news\/{slug}","methods":["GET","HEAD"]},"front.category":{"uri":"{category_slug}","methods":["GET","HEAD"]}}};
const Ziggy = {"url":"https:\/\/echoscoop.com","port":null,"defaults":{},"routes":{"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"laravelpwa.manifest":{"uri":"manifest.json","methods":["GET","HEAD"]},"laravelpwa.":{"uri":"offline","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"feeds.main":{"uri":"feeds\/posts-feed","methods":["GET","HEAD"]},"front.home":{"uri":"\/","methods":["GET","HEAD"]},"front.terms":{"uri":"terms","methods":["GET","HEAD"]},"front.privacy":{"uri":"privacy","methods":["GET","HEAD"]},"front.disclaimer":{"uri":"disclaimer","methods":["GET","HEAD"]},"front.all":{"uri":"news","methods":["GET","HEAD"]},"front.post":{"uri":"news\/{slug}","methods":["GET","HEAD"]},"front.category":{"uri":"{category_slug}","methods":["GET","HEAD"]}}};
if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') {
Object.assign(Ziggy.routes, window.Ziggy.routes);

View File

@@ -12,11 +12,6 @@
@include('feed::links')
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
@vite(['resources/sass/app-front.scss', 'resources/js/app-front.js'])
{{-- @laravelPWA --}}
@laravelPWA
@include('googletagmanager::head')

View File

@@ -1,30 +1,30 @@
@extends('front.layouts.app')
@section('content')
<main class="container">
@if(!is_null($featured_post))
<div class="p-4 p-md-5 mb-4 rounded text-body-emphasis bg-body-secondary">
<div class="col-lg-12 px-0">
<h1 class="display-4 fst-italic">{{ $featured_post->title }}</h1>
<p class="lead my-3">{{ $featured_post->excerpt }}</p>
<p class="lead mb-0"><a href="{{ route('front.post', ['slug' => $featured_post->slug]) }}"
class=" fw-bold">Continue reading...</a></p>
@if (!is_null($featured_post))
<div class="p-4 p-md-5 mb-4 rounded text-body-emphasis bg-body-secondary">
<div class="col-lg-12 px-0">
<h1 class="display-4 fst-italic">{{ $featured_post->title }}</h1>
<p class="lead my-3">{{ $featured_post->excerpt }}</p>
<p class="lead mb-0"><a href="{{ route('front.post', ['slug' => $featured_post->slug]) }}"
class=" fw-bold">Continue reading...</a></p>
</div>
</div>
</div>
@endif
<div class="row g-5">
<div class="col-md-8">
@if($latest_posts->count() > 0)
@foreach ($latest_posts as $post)
@include('front.partials.post_detail', ['post' => $post])
@endforeach
@if ($latest_posts->count() > 0)
@foreach ($latest_posts as $post)
@include('front.partials.post_detail', ['post' => $post])
@endforeach
<div class="w-100 d-flex justify-content-center">
<a class="btn btn-outline-primary rounded-pill px-3 text-decoration-none"
href="{{ route('front.all') }}">View Latest News</a>
</div>
<div class="w-100 d-flex justify-content-center">
<a class="btn btn-outline-primary rounded-pill px-3 text-decoration-none"
href="{{ route('front.all') }}">View Latest News</a>
</div>
@else
<div class="py-3 text-center">
<div class="mb-2">No posts found yet.</div>

View File

@@ -0,0 +1,67 @@
<!-- Web Application Manifest -->
<link rel="manifest" href="{{ route('laravelpwa.manifest') }}">
<!-- Chrome for Android theme color -->
<meta name="theme-color" content="{{ $config['theme_color'] }}">
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="{{ $config['display'] == 'standalone' ? 'yes' : 'no' }}">
<meta name="application-name" content="{{ $config['short_name'] }}">
<link rel="icon" sizes="{{ data_get(end($config['icons']), 'sizes') }}"
href="{{ data_get(end($config['icons']), 'src') }}">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="{{ $config['display'] == 'standalone' ? 'yes' : 'no' }}">
<meta name="apple-mobile-web-app-status-bar-style" content="{{ $config['status_bar'] }}">
<meta name="apple-mobile-web-app-title" content="{{ $config['short_name'] }}">
<link rel="apple-touch-icon" href="{{ data_get(end($config['icons']), 'src') }}">
<link href="{{ $config['splash']['640x1136'] }}"
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['750x1334'] }}"
media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1242x2208'] }}"
media="(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1125x2436'] }}"
media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['828x1792'] }}"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1242x2688'] }}"
media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1536x2048'] }}"
media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1668x2224'] }}"
media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['1668x2388'] }}"
media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<link href="{{ $config['splash']['2048x2732'] }}"
media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />
<!-- Tile for Win8 -->
<meta name="msapplication-TileColor" content="{{ $config['background_color'] }}">
<meta name="msapplication-TileImage" content="{{ data_get(end($config['icons']), 'src') }}">
<script type="text/javascript">
// Initialize the service worker
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceworker.js', {
scope: '.'
}).then(function(registration) {
// Registration was successful
console.log('Laravel PWA: ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :(
console.log('Laravel PWA: ServiceWorker registration failed: ', err);
});
}
</script>

View File

@@ -0,0 +1,5 @@
@extends('layouts.app')
@section('content')
<h1>You are currently not connected to any networks.</h1>
@endsection