@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
{!! Form::label('Name') !!} {!! Form::text('name', $theme->name, ['class' => 'form-control']) !!}
{!! Form::label('theme_type', 'Type') !!} {!! add_help('Users can select both a base, and a decorator theme, where decorator themes will be layered over the selected base theme.') !!} {!! Form::select('theme_type', ['base' => 'Base', 'decorator' => 'Decorator'], $theme->theme_type ?? 'base', ['class' => 'form-control']) !!}

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)
{!! Form::label('Creator(s) Name') !!} {!! add_help('Separate multiples via comma.') !!}
{!! Form::text('creator_name', $theme->creators ? $theme->creatorData['name'] : null, ['class' => 'form-control']) !!}
{!! Form::label('Creator(s) Url') !!} {!! add_help('Separate multiples via comma.') !!}
{!! Form::text('creator_url', $theme->creators ? $theme->creatorData['url'] : null, ['class' => 'form-control']) !!}
CSS File

@if ($theme->has_css) @endif {!! Form::label('CSS File') !!}
{!! Form::file('css') !!}
Only CSS Files. Max file size: 1000 KB.
@if ($theme->has_css)
{!! Form::checkbox('remove_css', 1, false, ['class' => 'form-check-input']) !!} {!! Form::label('remove_css', 'Remove current css file', ['class' => 'form-check-label']) !!}
@endif
{!! 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.

@if ($theme->has_header) @endif {!! Form::label('Header Image') !!}
{!! Form::file('header') !!}
Header image.
@if ($theme->has_header)
{!! Form::checkbox('remove_header', 1, false, ['class' => 'form-check-input']) !!} {!! Form::label('remove_header', 'Remove current header', ['class' => 'form-check-label']) !!}
@endif
{!! 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.

@if ($theme->has_background) @endif {!! Form::label('Background Image') !!}
{!! Form::file('background') !!}
Background image.
@if ($theme->has_background)
{!! Form::checkbox('remove_background', 1, false, ['class' => 'form-check-input']) !!} {!! Form::label('remove_background', 'Remove current background', ['class' => 'form-check-label']) !!}
@endif
{!! Form::label('Background Image Url') !!} {!! Form::text('background_image_url', $theme->themeEditor->background_image_url ?? '', ['class' => 'form-control']) !!}
{!! Form::label('Select background color') !!}
{!! Form::text('background_color', $theme->themeEditor->background_color ?? null, ['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
{!! Form::label('Select title color') !!}
{!! Form::text('title_color', $theme->themeEditor->title_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select menu color') !!}
{!! Form::text('nav_color', $theme->themeEditor->nav_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select menu text color') !!}
{!! Form::text('nav_text_color', $theme->themeEditor->nav_text_color ?? null, ['class' => 'form-control']) !!}

Main Content

These colors also affect modal colors, the sidebar and input fields.

{!! Form::label('Select main content color') !!}
{!! Form::text('main_color', $theme->themeEditor->main_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select main text color') !!}
{!! Form::text('main_text_color', $theme->themeEditor->main_text_color ?? null, ['class' => 'form-control']) !!}

Card Content

These colors also affect list groups and the nav tabs.

{!! Form::label('Select card color') !!}
{!! Form::text('card_color', $theme->themeEditor->card_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select card text color') !!}
{!! Form::text('card_text_color', $theme->themeEditor->card_text_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select card header color') !!}
{!! Form::text('card_header_color', $theme->themeEditor->card_header_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select card header text color') !!}
{!! Form::text('card_header_text_color', $theme->themeEditor->card_header_text_color ?? null, ['class' => 'form-control']) !!}

Links & Buttons

Primary and secondary buttons will use the same text color as links.

{!! Form::label('Select link color') !!}
{!! Form::text('link_color', $theme->themeEditor->link_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select primary button color') !!}
{!! Form::text('primary_button_color', $theme->themeEditor->primary_button_color ?? null, ['class' => 'form-control']) !!}
{!! Form::label('Select secondary button color') !!}
{!! Form::text('secondary_button_color', $theme->themeEditor->secondary_button_color ?? null, ['class' => 'form-control']) !!}
{!! Form::submit($theme->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary px-5']) !!}
{!! Form::close() !!} @endsection @section('scripts') @parent @endsection