1
0
Fork 0

Add custom css to admin dashboard

This commit is contained in:
Daniel Supernault 2024-06-29 18:39:11 -06:00
parent f671fdb16c
commit ecf22b54d5
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1
3 changed files with 569 additions and 495 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
@extends('admin.partial.template-full')
@section('section')
</div>
<div class="header bg-primary pb-3 mt-n4">
<div class="container-fluid">
<div class="header-body">
<div class="row align-items-center py-4">
<div class="col-lg-6 col-7">
<p class="display-1 text-white d-inline-block mb-0">Custom CSS</p>
<p class="lead mb-0 text-white">Customize your instance with custom css.</p>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid mt-4">
<div class="col-12 col-md-6">
<form method="post">
@csrf
<div class="form-group">
<div class="custom-control custom-checkbox">
<input
type="checkbox"
name="show"
class="custom-control-input"
id="customCheck1"
{{ (bool) config_cache('uikit.show_custom.css') ? 'checked' : null}}
>
<label class="custom-control-label" for="customCheck1">Enable Custom CSS</label>
</div>
</div>
<div class="form-group">
<label for="css" class="font-weight-bold">Custom CSS</label>
<textarea
class="form-control"
id="css"
name="css"
rows="5">{!!config_cache('uikit.custom.css')!!}</textarea>
</div>
<button class="btn btn-primary">Save</button>
</form>
</div>
</div>
@endsection

View File

@ -3,6 +3,8 @@
Route::domain(config('pixelfed.domain.admin'))->prefix('i/admin')->group(function () { Route::domain(config('pixelfed.domain.admin'))->prefix('i/admin')->group(function () {
Route::redirect('/', '/dashboard'); Route::redirect('/', '/dashboard');
Route::redirect('timeline', config('app.url').'/timeline'); Route::redirect('timeline', config('app.url').'/timeline');
Route::get('settings/custom-css', 'AdminController@customCss')->name('admin.custom-css');
Route::post('settings/custom-css', 'AdminController@saveCustomCss');
Route::get('dashboard', 'AdminController@home')->name('admin.home'); Route::get('dashboard', 'AdminController@home')->name('admin.home');
Route::get('stats', 'AdminController@stats')->name('admin.stats'); Route::get('stats', 'AdminController@stats')->name('admin.stats');
Route::get('reports', 'AdminController@reports')->name('admin.reports'); Route::get('reports', 'AdminController@reports')->name('admin.reports');