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

@@ -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>