Changed file extension of custom CSS and JS files to clarify that the content is HTML and not directly CSS/JS

This commit is contained in:
Bernd Bestel 2018-07-15 13:35:54 +02:00
parent 254e1a9bc1
commit cb88ab2080
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 6 additions and 6 deletions

View File

@ -63,8 +63,8 @@ Database schema migration is automatically done when visiting the root (`/`) rou
When the file `data/demo.txt` exists, the application will work in a demo mode which means authentication is disabled and some demo data will be generated during the database schema migration.
### Adding your own CSS or JS without to have to modify the application itself
- When the file `data/custom.js` exists, the contents of the file will be added just before `</body>` (end of body) on every page
- When the file `data/custom.css` exists, the contents of the file will be added just before `</head>` (end of head) on every page
- When the file `data/custom_js.html` exists, the contents of the file will be added just before `</body>` (end of body) on every page
- When the file `data/custom_css.html` exists, the contents of the file will be added just before `</head>` (end of head) on every page
## Screenshots
#### Dashboard

View File

@ -28,8 +28,8 @@
<link href="{{ $U('/css/grocy.css?v=', true) }}{{ $version }}" rel="stylesheet">
@stack('pageStyles')
@if(file_exists(__DIR__ . '/../../data/custom.css'))
@php include __DIR__ . '/../../data/custom.css' @endphp
@if(file_exists(__DIR__ . '/../../data/custom_css.html'))
@php include __DIR__ . '/../../data/custom_css.html' @endphp
@endif
<script>
@ -252,8 +252,8 @@
@stack('componentScripts')
<script src="{{ $U('/viewjs', true) }}/@yield('viewJsName').js?v={{ $version }}"></script>
@if(file_exists(__DIR__ . '/../../data/custom.js'))
@php include __DIR__ . '/../../data/custom.js' @endphp
@if(file_exists(__DIR__ . '/../../data/custom_js.html'))
@php include __DIR__ . '/../../data/custom_js.html' @endphp
@endif
</body>