1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added ability to control app icon (favicon) via settings

This commit is contained in:
Dan Brown
2023-01-25 11:03:19 +00:00
parent 0f113ec41f
commit 55b6a7842e
11 changed files with 132 additions and 43 deletions

View File

@ -33,7 +33,7 @@ return [
'app_custom_html_desc' => 'Any content added here will be inserted into the bottom of the <head> section of every page. This is handy for overriding styles or adding analytics code.',
'app_custom_html_disabled_notice' => 'Custom HTML head content is disabled on this settings page to ensure any breaking changes can be reverted.',
'app_logo' => 'Application Logo',
'app_logo_desc' => 'This image should be 43px in height. <br>Large images will be scaled down.',
'app_logo_desc' => 'This is used in the application header bar, among other areas. This image should be 86px in height. Large images will be scaled down.',
'app_primary_color' => 'Application Primary Color',
'app_primary_color_desc' => 'Sets the primary color for the application including the banner, buttons, and links.',
'app_homepage' => 'Application Homepage',

View File

@ -20,6 +20,12 @@
<link rel="stylesheet" href="{{ versioned_asset('dist/styles.css') }}">
<link rel="stylesheet" media="print" href="{{ versioned_asset('dist/print-styles.css') }}">
<!-- Icons -->
<link rel="icon" type="image/png" sizes="256x256" href="{{ setting('app-icon') ?? url('/icon.png') }}">
<link rel="icon" type="image/png" sizes="128x128" href="{{ setting('app-icon-128') ?? url('/icon-128.png') }}">
<link rel="icon" type="image/png" sizes="64x64" href="{{ setting('app-icon-64') ?? url('/icon-64.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ setting('app-icon-32') ?? url('/icon-32.png') }}">
@yield('head')
<!-- Custom Styles & Head Content -->

View File

@ -53,6 +53,25 @@
</div>
</div>
<div class="grid half gap-xl">
<div>
<label class="setting-list-label">{{ 'Application Icon' }}</label>
<p class="small">
This icon is used for browser tabs and shortcut icons.
This should be a 256px square PNG image.
</p>
</div>
<div class="pt-xs">
@include('form.image-picker', [
'removeValue' => 'none',
'defaultImage' => url('/icon.png'),
'currentImage' => setting('app-icon'),
'name' => 'app_icon',
'imageClass' => 'logo-image',
])
</div>
</div>
<!-- Primary Color -->
<div class="grid half gap-xl">
<div>