Skip to content

Commit

Permalink
[#] tabler admin
Browse files Browse the repository at this point in the history
  • Loading branch information
WangNingkai committed Dec 30, 2020
1 parent 25d8aff commit 7ea59c8
Show file tree
Hide file tree
Showing 33 changed files with 17,450 additions and 4 deletions.
16 changes: 15 additions & 1 deletion app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use App\Http\Traits\ApiResponseTrait;
use App\Models\Account;
use App\Models\Setting;
use App\Models\ShortUrl;
use App\Models\User;
use Illuminate\Http\Request;
use Cache;
Expand All @@ -19,6 +20,7 @@ class AdminController extends BaseController
{
use ApiResponseTrait;


/**
* 缓存清理
* @return \Illuminate\Http\RedirectResponse
Expand All @@ -30,6 +32,18 @@ public function clear()
return redirect()->back();
}

/**
* 后台首页
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*/
public function index()
{
$links_count = ShortUrl::count('id');
$accounts_count = Account::count('id');
return view('admin.home', compact('links_count', 'accounts_count'));
}


/**
* 全局设置
* @param Request $request
Expand All @@ -39,7 +53,7 @@ public function config(Request $request)
{
$accounts = Account::fetchlist();
if ($request->isMethod('get')) {
return view('default.admin.config', compact('accounts'));
return view('admin.config', compact('accounts'));
}
$data = $request->except('_token');
Setting::batchUpdate($data);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function username()
*/
public function showLoginForm()
{
return view('default.login');
return view('admin.login');
}

/**
Expand Down
2 changes: 2 additions & 0 deletions public/img/log.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
322 changes: 322 additions & 0 deletions public/tabler/dist/css/tabler-vendors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
/*!
* Tabler v1.0.0-alpha.21 (https://tabler.io)
* @version 1.0.0-alpha.21
* @link https://tabler.io
* Copyright 2018-2020 The Tabler Authors
* Copyright 2018-2020 codecalm.net Paweł Kuna
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
.selectize-control {
padding: 0;
border: 0;
height: auto; }
.selectize-control.multi .selectize-input.has-items {
padding-left: 6px; }
.selectize-control.multi .selectize-input > div {
font-size: 0.75rem;
margin: 0 6px 2px 0;
padding: 2px 8px;
border-radius: 3px;
background-color: rgba(135, 142, 151, 0.1);
color: inherit; }
.selectize-control .remove {
font-size: inherit !important;
font-weight: normal !important;
border-left: 0 !important;
color: #656d77 !important; }
.selectize-control.is-valid {
padding: 0; }
.selectize-control.is-valid .selectize-input {
border-color: #2fb344; }
.selectize-control.is-valid .selectize-input.focus {
box-shadow: 0 0 0 0.25rem rgba(47, 179, 68, 0.25); }
.selectize-control.is-valid .selectize-dropdown {
background: none;
background-color: inherit;
border-color: #e6e8e9;
padding-right: 0; }
.selectize-control.is-invalid {
padding: 0; }
.selectize-control.is-invalid .selectize-input {
border-color: #d63939; }
.selectize-control.is-invalid .selectize-input.focus {
box-shadow: 0 0 0 0.25rem rgba(214, 57, 57, 0.25); }
.selectize-control.is-invalid .selectize-dropdown {
background: none;
background-color: inherit;
border-color: #e6e8e9;
padding-right: 0; }

.selectize-input {
display: flex !important;
border: 1px solid #e6e8e9;
padding: 0.4375rem 0.75rem;
font-size: 0.875rem;
box-shadow: none;
line-height: 1.4285714;
background-color: inherit !important;
color: inherit !important;
flex-wrap: wrap; }
.selectize-input.full {
background-color: inherit; }
.selectize-input.dropdown-active {
border-radius: 3px; }
.selectize-control.single .selectize-input {
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dadcde' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/16px 12px; }
.selectize-input.focus {
border-color: #90b5e2;
box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.25); }
.selectize-input:after {
content: none !important; }

.selectize-dropdown {
height: auto;
background: #ffffff;
padding: 0.4375rem 0;
margin-top: 1px; }
.selectize-dropdown .option,
.selectize-dropdown .option-header {
padding: 0.25rem 0.75rem; }
.selectize-dropdown .active {
background: rgba(101, 109, 119, 0.06);
color: inherit;
cursor: pointer; }

.jqvmap-zoomin,
.jqvmap-zoomout {
height: 1.5rem;
width: 1.5rem;
left: .5rem;
border: 1px solid #e6e8e9;
background: #ffffff;
color: #232e3c;
display: flex;
align-items: center;
justify-content: center;
line-height: 1; }

.jqvmap-zoomin {
top: .5rem; }

.jqvmap-zoomout {
top: 2.5rem; }

.jqvmap-label {
font-family: inherit;
font-size: 0.625rem;
line-height: 1;
padding: .25rem;
background: #232e3c; }

.apexcharts-title-text {
font-weight: 600 !important; }

.apexcharts-tooltip-title {
font-weight: 600 !important;
padding-bottom: .25rem !important; }

.apexcharts-gridline,
.apexcharts-ycrosshairs,
.apexcharts-xaxis-tick {
stroke: #e6e8e9 !important; }

.apexcharts-tooltip {
line-height: 1;
color: #ffffff;
background: #232e3c !important;
border: 0 !important;
border-radius: 3px !important; }

.apexcharts-tooltip-title {
margin: 0 !important;
background: transparent !important;
border: 0 !important; }

.apexcharts-tooltip-series-group {
padding: 0 8px !important; }

.apexcharts-tooltip-marker {
width: .5rem;
height: .5rem; }

.apexcharts-gridline,
.apexcharts-ycrosshairs,
.apexcharts-xaxis-tick {
stroke: #e7eaef; }

.apexcharts-yaxis-label,
.apexcharts-xaxis-label {
fill: #656d77; }

.fc-unthemed .fc-content,
.fc-unthemed .fc-divider,
.fc-unthemed .fc-list-heading td,
.fc-unthemed .fc-list-view,
.fc-unthemed .fc-popover,
.fc-unthemed .fc-row,
.fc-unthemed tbody,
.fc-unthemed td,
.fc-unthemed th,
.fc-unthemed thead {
border-color: #e6e8e9; }

.fc-unthemed .fc-toolbar h2 {
font-size: 1.125rem;
margin: 0; }

.fc-unthemed .fc-widget-header {
border: 0; }

.fc-unthemed .fc-day-header {
padding-bottom: .25rem;
font-weight: 600; }

.fc-unthemed.card-calendar .fc-day-grid-container {
border-bottom: 0;
border-left: 0; }

.fc-unthemed .fc-time {
font-weight: 600; }

.fc-unthemed .fc-event {
border-color: rgba(0, 0, 0, 0.05);
color: #206bc4;
background-color: #edf3fa;
padding: 0 .25rem; }

.flatpickr-input.flatpickr-input {
background: #ffffff; }
.flatpickr-input.flatpickr-input.active {
border-color: #90b5e2;
box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.25); }

.flatpickr-calendar {
background: #ffffff;
border: 1px solid rgba(101, 109, 119, 0.24);
border-radius: 3px;
padding: .5rem;
font-size: inherit;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-top: -1px; }
.flatpickr-calendar:before, .flatpickr-calendar:after {
content: none; }
.flatpickr-calendar .flatpickr-innerContainer,
.flatpickr-calendar .flatpickr-rContainer,
.flatpickr-calendar .dayContainer,
.flatpickr-calendar .flatpickr-days {
width: 100%; }
.flatpickr-calendar .dayContainer,
.flatpickr-calendar .flatpickr-day {
max-width: 100%;
min-width: 0; }
.flatpickr-calendar.inline {
width: 100%;
box-shadow: none;
margin: 0; }

.flatpickr-day {
color: inherit;
border-radius: 3px;
display: flex;
align-items: center;
line-height: 1; }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay, .flatpickr-day.notAllowed, .flatpickr-day.notAllowed.prevMonthDay, .flatpickr-day.notAllowed.nextMonthDay {
color: inherit;
opacity: .2; }
.flatpickr-day.today {
border-color: #e6e8e9; }
.flatpickr-day.selected {
background-color: #206bc4; }

span.flatpickr-weekday {
font-size: 0.625rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
line-height: 1.6;
color: #656d77; }

.flatpickr-months {
margin-bottom: .5rem; }
.flatpickr-months .flatpickr-month {
color: currentColor;
fill: currentColor; }
.flatpickr-months .flatpickr-current-month {
font-weight: 400; }
.flatpickr-months .flatpickr-monthDropdown-months {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
font-weight: inherit; }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
position: static;
color: #656d77; }
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
color: #232e3c; }
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
display: block;
fill: currentColor !important; }
.flatpickr-months .numInputWrapper .cur-year {
font-weight: inherit; }
.flatpickr-months .numInputWrapper .arrowUp,
.flatpickr-months .numInputWrapper .arrowDown {
display: none; }

.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange,
.flatpickr-day.today.inRange,
.flatpickr-day.prevMonthDay.today.inRange,
.flatpickr-day.nextMonthDay.today.inRange,
.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:focus,
.flatpickr-day.nextMonthDay:focus {
background: rgba(101, 109, 119, 0.06);
border-color: transparent; }

.noUi-target {
border: 0;
box-shadow: none;
background: none;
border-radius: 0;
color: #206bc4; }

.noUi-horizontal {
height: 1.25rem;
padding: .5rem 0; }

.noUi-base {
background: rgba(169, 174, 182, 0.24);
border-radius: 1rem; }

.noUi-handle {
width: 1rem;
height: 1rem;
border: 2px solid #ffffff;
box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1);
border-radius: 1rem;
background: currentColor;
outline: 0; }
.noUi-handle:before, .noUi-handle:after {
content: none; }
.noUi-horizontal .noUi-handle {
width: 1rem;
height: 1rem;
top: -0.5rem;
right: -0.5rem;
margin: 1px 1px 0 0; }
.noUi-handle.noUi-active, .noUi-handle:focus {
box-shadow: 0 0 0 1px #f4f6fa, 0 0 0 0.25rem rgba(32, 107, 196, 0.25); }

.noUi-connect {
background: currentColor; }
9 changes: 9 additions & 0 deletions public/tabler/dist/css/tabler-vendors.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7ea59c8

Please sign in to comment.