]> BookStack Code Mirror - bookstack/blob - resources/views/settings/customization.blade.php
3748267df8869c74c658afebe704a3219ed91557
[bookstack] / resources / views / settings / customization.blade.php
1 @extends('settings.layout')
2
3 @section('card')
4     <h1 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h1>
5     <form action="{{ url("/settings/customization") }}" method="POST" enctype="multipart/form-data">
6         {!! csrf_field() !!}
7         <input type="hidden" name="section" value="customization">
8
9         <div class="setting-list">
10
11             <div class="grid half gap-xl">
12                 <div>
13                     <label for="setting-app-name" class="setting-list-label">{{ trans('settings.app_name') }}</label>
14                     <p class="small">{{ trans('settings.app_name_desc') }}</p>
15                 </div>
16                 <div class="pt-xs">
17                     <input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
18                     @include('form.toggle-switch', [
19                         'name' => 'setting-app-name-header',
20                         'value' => setting('app-name-header'),
21                         'label' => trans('settings.app_name_header'),
22                     ])
23                 </div>
24             </div>
25
26             <div class="grid half gap-xl items-center">
27                 <div>
28                     <label class="setting-list-label" for="setting-app-editor">{{ trans('settings.app_default_editor') }}</label>
29                     <p class="small">{{ trans('settings.app_default_editor_desc') }}</p>
30                 </div>
31                 <div>
32                     <select name="setting-app-editor" id="setting-app-editor">
33                         <option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
34                         <option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
35                     </select>
36                 </div>
37             </div>
38
39             <div class="grid half gap-xl">
40                 <div>
41                     <label class="setting-list-label">{{ trans('settings.app_logo') }}</label>
42                     <p class="small">{!! trans('settings.app_logo_desc') !!}</p>
43                 </div>
44                 <div class="pt-xs">
45                     @include('form.image-picker', [
46                              'removeName' => 'setting-app-logo',
47                              'removeValue' => 'none',
48                              'defaultImage' => url('/logo.png'),
49                              'currentImage' => setting('app-logo'),
50                              'name' => 'app_logo',
51                              'imageClass' => 'logo-image',
52                          ])
53                 </div>
54             </div>
55
56             <!-- Primary Color -->
57             <div class="grid half gap-xl">
58                 <div>
59                     <label class="setting-list-label">{{ trans('settings.app_primary_color') }}</label>
60                     <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
61                 </div>
62                 <div component="setting-app-color-picker setting-color-picker"
63                      option:setting-color-picker:default="#206ea7"
64                      option:setting-color-picker:current="{{ setting('app-color') }}"
65                      class="text-m-right pt-xs">
66                     <input refs="setting-color-picker@input setting-app-color-picker@input" type="color" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#206ea7">
67                     <input refs="setting-app-color-picker@light-input" type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
68                     <div class="pr-s">
69                         <button refs="setting-color-picker@default-button" type="button" class="text-button text-muted mt-s">{{ trans('common.default') }}</button>
70                         <span class="sep">|</span>
71                         <button refs="setting-color-picker@reset-button" type="button" class="text-button text-muted mt-s">{{ trans('common.reset') }}</button>
72                     </div>
73
74                 </div>
75             </div>
76
77             <!-- Entity Color -->
78             <div class="pb-l">
79                 <div>
80                     <label class="setting-list-label">{{ trans('settings.content_colors') }}</label>
81                     <p class="small">{!! trans('settings.content_colors_desc') !!}</p>
82                 </div>
83                 <div class="grid half pt-m">
84                     <div>
85                         @include('settings.parts.setting-entity-color-picker', ['type' => 'bookshelf'])
86                         @include('settings.parts.setting-entity-color-picker', ['type' => 'book'])
87                         @include('settings.parts.setting-entity-color-picker', ['type' => 'chapter'])
88                     </div>
89                     <div>
90                         @include('settings.parts.setting-entity-color-picker', ['type' => 'page'])
91                         @include('settings.parts.setting-entity-color-picker', ['type' => 'page-draft'])
92                     </div>
93                 </div>
94             </div>
95
96             <div component="setting-homepage-control" id="homepage-control" class="grid half gap-xl items-center">
97                 <div>
98                     <label for="setting-app-homepage-type" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
99                     <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
100                 </div>
101                 <div>
102                     <select refs="setting-homepage-control@type-control"
103                             name="setting-app-homepage-type"
104                             id="setting-app-homepage-type">
105                         <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
106                         <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
107                         <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
108                         <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
109                     </select>
110
111                     <div refs="setting-homepage-control@page-picker-container" style="display: none;" class="mt-m">
112                         @include('settings.parts.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
113                     </div>
114                 </div>
115             </div>
116
117             <div>
118                 <label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
119                 <p class="small mb-m">{{ trans('settings.app_footer_links_desc') }}</p>
120                 @include('settings.parts.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])])
121             </div>
122
123
124             <div>
125                 <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
126                 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
127                 <div class="mt-m">
128                     <textarea component="code-textarea"
129                               option:code-textarea:mode="html"
130                               name="setting-app-custom-head"
131                               id="setting-app-custom-head"
132                               class="simple-code-input">{{ setting('app-custom-head', '') }}</textarea>
133                 </div>
134                 <p class="small text-right">{{ trans('settings.app_custom_html_disabled_notice') }}</p>
135             </div>
136
137
138         </div>
139
140         <div class="form-group text-right">
141             <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
142         </div>
143     </form>
144 @endsection
145
146 @section('after-content')
147     @include('entities.selector-popup', ['entityTypes' => 'page'])
148 @endsection