blessing-skin-server/resources/views/admin/customize.tpl

152 lines
7.7 KiB
PHP
Raw Normal View History

2016-07-22 19:36:24 +08:00
@extends('admin.master')
2016-09-25 10:02:40 +08:00
@section('title', trans('general.customize'))
2016-07-22 19:36:24 +08:00
@section('style')
2016-09-14 22:44:30 +08:00
<link rel="stylesheet" href="{{ assets('vendor/skins/_all-skins.min.css') }}">
2016-07-22 19:36:24 +08:00
@endsection
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
2016-09-25 10:02:40 +08:00
{{ trans('general.customize') }}
2016-07-22 19:36:24 +08:00
<small>Customize</small>
</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
2016-08-21 10:38:46 +08:00
<div class="col-md-3">
2016-07-22 19:36:24 +08:00
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">更改配色</h3>
</div><!-- /.box-header -->
<div class="box-body no-padding">
<table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
<tbody>
<tr>
<td>蓝色主题(默认)</td>
<td><a href="#" data-skin="skin-blue" class="btn btn-primary btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>蓝色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-blue-light" class="btn btn-primary btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>黄色主题</td>
<td><a href="#" data-skin="skin-yellow" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>黄色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-yellow-light" class="btn btn-warning btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>绿色主题</td>
<td><a href="#" data-skin="skin-green" class="btn btn-success btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>绿色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-green-light" class="btn btn-success btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>基佬紫</td>
<td><a href="#" data-skin="skin-purple" class="btn bg-purple btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>紫色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-purple-light" class="btn bg-purple btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>喜庆红(笑)</td>
<td><a href="#" data-skin="skin-red" class="btn btn-danger btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>红色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-red-light" class="btn btn-danger btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>高端黑</td>
<td><a href="#" data-skin="skin-black" class="btn bg-black btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
<tr>
<td>黑色主题-白色侧边栏</td>
<td><a href="#" data-skin="skin-black-light" class="btn bg-black btn-xs"><i class="fa fa-eye"></i></a></td>
</tr>
</tbody>
</table>
</div><!-- /.box-body -->
<div class="box-footer">
<button id="color-submit" class="btn btn-primary">提交</button>
</div>
</div><!-- /.box -->
</div>
2016-08-21 10:38:46 +08:00
<div class="col-md-9">
2016-12-27 23:05:09 +08:00
{!! $homepage->render() !!}
2016-07-22 19:36:24 +08:00
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">自定义 CSS/JavaScript
<i class="fa fa-question-circle" title="字符串将不会被转义,请小心" data-toggle="tooltip" data-placement="bottom"></i>
2016-07-22 19:36:24 +08:00
</h3>
</div><!-- /.box-header -->
2016-09-10 17:02:47 +08:00
<form method="post">
2016-07-22 19:36:24 +08:00
<input type="hidden" name="option" value="adapter">
<div class="box-body">
<?php
if (isset($_POST['custom_css']) && isset($_POST['custom_js'])) {
2016-08-13 22:10:28 +08:00
Option::set('custom_css', $_POST['custom_css']);
Option::set('custom_js', $_POST['custom_js']);
2016-07-22 19:36:24 +08:00
echo '<div class="callout callout-success">设置已保存。</div>';
2016-11-07 21:57:43 +08:00
} else { ?>
<div class="callout callout-info">
内容将会被追加至每个页面的 &lt;style&gt; &lt;script&gt; 标签中。<br>
- 这里有一些有用的示例:<a href="https://github.com/printempw/blessing-skin-server/wiki/%E3%80%8C%E8%87%AA%E5%AE%9A%E4%B9%89-CSS-JavaScript%E3%80%8D%E5%8A%9F%E8%83%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%AE%9E%E4%BE%8B">「自定义 CSS JavaScript」功能的一些实例@GitHub WiKi</a>
</div>
<?php } ?>
2016-07-22 19:36:24 +08:00
<table class="table">
<tbody>
<tr>
<td class="key">CSS</td>
<td class="value">
2016-09-15 23:03:58 +08:00
<textarea name="custom_css" class="form-control" rows="6">{{ option('custom_css') }}</textarea>
2016-07-22 19:36:24 +08:00
</td>
</tr>
<tr>
<td class="key">JavaScript</td>
<td class="value">
2016-09-15 23:03:58 +08:00
<textarea name="custom_js" class="form-control" rows="6">{{ option('custom_js') }}</textarea>
2016-07-22 19:36:24 +08:00
</td>
</tr>
</tbody>
</table>
</div><!-- /.box-body -->
<div class="box-footer">
<button type="submit" name="submit" class="btn btn-primary">提交</button>
</div>
</form>
</div>
</div>
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<script type="text/javascript">
2016-09-15 23:03:58 +08:00
var current_skin = "{{ option('color_scheme') }}";
2016-07-22 19:36:24 +08:00
</script>
@endsection