Skip to content

Commit

Permalink
feat: add umami script (#73)
Browse files Browse the repository at this point in the history
* add favicon

* improve icons quality

* add umami tracking

* chore: styling

---------

Co-authored-by: Simoneu01 <[email protected]>
  • Loading branch information
Simoneu01 and Simoneu01 authored Oct 18, 2023
1 parent 8bed72b commit 2900e90
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ DISCORD_REDIRECT_URL="${APP_URL}/oauth/discord/callback"
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URL="${APP_URL}/oauth/google/callback"

UMAMI_SCRIPT_URL=
UMAMI_WEBSITE_ID=
3 changes: 2 additions & 1 deletion app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function panel(Panel $panel): Panel
])
->plugins([
FilamentShieldPlugin::make(),
]);
])
->favicon(asset('favicon-32x32.png'));
}
}
8 changes: 8 additions & 0 deletions config/umami.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [

'url' => env('UMAMI_SCRIPT_URL'),

'website_id' => env('UMAMI_WEBSITE_ID'),
];
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
12 changes: 12 additions & 0 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">

<link type="image/x-icon" href="{{ asset('favicon.ico') }}" rel="shortcut icon">
<link href="{{ asset('/apple-touch-icon.png') }}" rel="apple-touch-icon" sizes="180x180">
<link type="image/png" href="{{ asset('/favicon-32x32.png') }}" rel="icon" sizes="32x32">
<link type="image/png" href="{{ asset('/favicon-16x16.png') }}" rel="icon" sizes="16x16">
<link href="{{ asset('/site.webmanifest') }}" rel="manifest">

{!! seo() !!}

<title>{{ config('app.name', 'Laravel') }}</title>

<!-- Fonts -->
Expand All @@ -15,6 +23,10 @@
<!-- Scripts -->
@vite(['resources/css/app.css', 'resources/js/app.js'])

@if (config('umami.url'))
<script async src="{{ config('umami.url') }}" data-website-id="{{ config('umami.website_id') }}"></script>
@endif

<!-- Styles -->
@livewireStyles
</head>
Expand Down
10 changes: 10 additions & 0 deletions resources/views/layouts/auth.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">

<link type="image/x-icon" href="{{ asset('favicon.ico') }}" rel="shortcut icon">
<link href="{{ asset('/apple-touch-icon.png') }}" rel="apple-touch-icon" sizes="180x180">
<link type="image/png" href="{{ asset('/favicon-32x32.png') }}" rel="icon" sizes="32x32">
<link type="image/png" href="{{ asset('/favicon-16x16.png') }}" rel="icon" sizes="16x16">
<link href="{{ asset('/site.webmanifest') }}" rel="manifest">

<title>{{ config('app.name', 'Laravel') }}</title>

<!-- Fonts -->
Expand All @@ -17,6 +23,10 @@

<!-- Scripts -->
@vite(['resources/css/app.css', 'resources/js/app.js'])

@if (config('umami.url'))
<script async src="{{ config('umami.url') }}" data-website-id="{{ config('umami.website_id') }}"></script>
@endif
</head>

<body>
Expand Down
10 changes: 10 additions & 0 deletions resources/views/layouts/guest.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">

<link type="image/x-icon" href="{{ asset('favicon.ico') }}" rel="shortcut icon">
<link href="{{ asset('/apple-touch-icon.png') }}" rel="apple-touch-icon" sizes="180x180">
<link type="image/png" href="{{ asset('/favicon-32x32.png') }}" rel="icon" sizes="32x32">
<link type="image/png" href="{{ asset('/favicon-16x16.png') }}" rel="icon" sizes="16x16">
<link href="{{ asset('/site.webmanifest') }}" rel="manifest">

{!! seo() !!}

<title>{{ config('app.name', 'Laravel') }}</title>
Expand All @@ -17,6 +23,10 @@
<!-- Scripts -->
@vite(['resources/css/app.css', 'resources/js/app.js'])

@if (config('umami.url'))
<script async src="{{ config('umami.url') }}" data-website-id="{{ config('umami.website_id') }}"></script>
@endif

<!-- Styles -->
@livewireStyles
</head>
Expand Down

0 comments on commit 2900e90

Please sign in to comment.