@extends('admin.layout')
@section('admin-title')
{{ $theme->id ? 'Edit Theme: ' . $theme->name : 'Create Theme' }}
@endsection
@section('admin-content')
{!! breadcrumbs(['Admin Panel' => 'admin', 'Themes' => 'admin/themes', ($theme->id ? 'Edit' : 'Create') . ' Theme' => $theme->id ? 'admin/themes/edit/' . $theme->id : 'admin/themes/create']) !!}
{{ $theme->id ? 'Edit ' . $theme->name : 'Create Theme' }}
@if ($theme->id)
Delete Theme
@endif
@if ($theme->creators)
by {!! $theme->creatorDisplayName !!}
@endif
{!! Form::open(['url' => $theme->id ? 'admin/themes/edit/' . $theme->id : 'admin/themes/create', 'files' => true]) !!}
Basic Information
If a theme isn't active it keeps it from being useable by any feature.
Default may be overridden by conditional themes (like seasonal based if you add the weather extension), or user selected themes.
{!! Form::checkbox('is_active', 1, $theme->id ? $theme->is_active : 1, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!}
{!! Form::label('is_active', 'Is Active', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If this is turned off, the theme won\'t be useable.') !!}
{!! Form::checkbox('is_default', 1, $theme->id ? $theme->is_default : 0, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!}
{!! Form::label('is_default', 'Is Default', ['class' => 'form-check-label ml-3']) !!} {!! add_help('One at a time. Users with no theme selected default to this theme and logged out visitors default to this theme.') !!}
{!! Form::checkbox('is_user_selectable', 1, $theme->id ? $theme->is_user_selectable : 0, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!}
{!! Form::label('is_user_selectable', 'Is User Selectable by Default', ['class' => 'form-check-label ml-3']) !!} {!! add_help('Is this a theme users can select freely? Themes granted by items should have this turned off.') !!}
@if (get_object_vars($conditions))
Conditional Theme
Setting a condition here will cause this theme to override the default theme if the conditions below are met.
As such you should only select one condition, or risk the site themes getting a bit confused.
Conditional Themes will be layered on top of a users base theme, and under a user's decorative theme selections.
@if (isset($conditions->weathers))
{!! Form::label('Seasonal') !!} {!! add_help('This will implement this theme when this season is active.') !!}
{!! Form::select('season_link_id', $conditions->seasons, $theme->link_type === 'season' ? $theme->link_id : null, ['class' => 'form-control', 'placeholder' => 'Select a Season']) !!}
{!! Form::label('Weather') !!} {!! add_help('This will implement this theme when this weather is active.') !!}
{!! Form::select('weather_link_id', $conditions->weathers, $theme->link_type === 'weather' ? $theme->link_id : null, ['class' => 'form-control', 'placeholder' => 'Select a Weather']) !!}
@endif
@endif
Creator(s)
CSS File
{!! Form::checkbox('prioritize_css', 1, $theme->prioritize_css ?? false, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!}
{!! Form::label('prioritize_css', 'Prioritize CSS over Below Values', ['class' => 'form-check-label ml-3']) !!} {!! add_help(
'If you would rather the css ovverride the following values turn this on, otherwise if you want the below values to override the css leave this off. It is possible to have css selectors that will still override the below values with this off, but more conditionally.',
) !!}
Header Image
The Header Image can be uploaded directly or specified by url. Finally you can turn the header off entirely and have just the top nav.
{!! Form::label('Header Image Url') !!}
{!! Form::text('header_image_url', $theme->themeEditor->header_image_url ?? '', ['class' => 'form-control']) !!}
{!! Form::label('Show header image') !!}
{!! Form::checkbox('header_image_display', 1, $theme->themeEditor?->header_image_display == 'inline' ?? 1, ['class' => 'form-check-input form-control', 'data-toggle' => 'toggle']) !!}
Background Image
The Background Image can be uploaded directly or specified by url. If you only specify a color there will be no background image.
{!! Form::label('Background Image Url') !!}
{!! Form::text('background_image_url', $theme->themeEditor->background_image_url ?? '', ['class' => 'form-control']) !!}
{!! Form::label('Background Repeat') !!}{!! add_help('If this is turned on, your background image will repeat to fill the page. If turned off, your background image will cover the width of the screen.') !!}
{!! Form::checkbox('background_size', 1, $theme->themeEditor ? $theme->themeEditor?->background_size == 'cover' : 1, ['class' => 'form-check-input form-control', 'data-toggle' => 'toggle']) !!}
Menu Bar
Main Content
These colors also affect modal colors, the sidebar and input fields.
Card Content
These colors also affect list groups and the nav tabs.
Links & Buttons
Primary and secondary buttons will use the same text color as links.
{!! Form::submit($theme->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary px-5']) !!}
{!! Form::close() !!}
@endsection
@section('scripts')
@parent
@endsection