Adjust filename of source files

This commit is contained in:
printempw 2017-07-03 20:54:19 +08:00
parent d9abb7c99f
commit b873ffef9c
45 changed files with 104 additions and 111 deletions

View File

@ -106,7 +106,7 @@ class OptionForm
$hintContent = trans("options.$this->id.hint");
}
$this->hint = view('vendor.option-form.hint')->with('hint', $hintContent)->render();
$this->hint = view('common.option-form.hint')->with('hint', $hintContent)->render();
return $this;
}
@ -358,7 +358,7 @@ class OptionForm
$this->assignValues();
return view('vendor.option-form.main')->with(array_merge(get_object_vars($this)))->render();
return view('common.option-form.main')->with(array_merge(get_object_vars($this)))->render();
}
/**
@ -414,7 +414,7 @@ class OptionFormItem
$hintContent = trans("options.$this->parentId.$this->id.hint");
}
$this->hint = view('vendor.option-form.hint')->with('hint', $hintContent)->render();
$this->hint = view('common.option-form.hint')->with('hint', $hintContent)->render();
return $this;
}
@ -453,7 +453,7 @@ class OptionFormText extends OptionFormItem
{
public function render()
{
return view('vendor.option-form.text')->with([
return view('common.option-form.text')->with([
'id' => $this->id,
'value' => $this->value,
'disabled' => $this->disabled
@ -478,7 +478,7 @@ class OptionFormCheckbox extends OptionFormItem
public function render()
{
return view('vendor.option-form.checkbox')->with([
return view('common.option-form.checkbox')->with([
'id' => $this->id,
'value' => $this->value,
'label' => $this->label,
@ -500,7 +500,7 @@ class OptionFormTextarea extends OptionFormItem
public function render()
{
return view('vendor.option-form.textarea')->with([
return view('common.option-form.textarea')->with([
'id' => $this->id,
'rows' => $this->rows,
'value' => $this->value,
@ -522,7 +522,7 @@ class OptionFormSelect extends OptionFormItem
public function render()
{
return view('vendor.option-form.select')->with([
return view('common.option-form.select')->with([
'id' => $this->id,
'options' => $this->options,
'selected' => $this->value,
@ -562,12 +562,12 @@ class OptionFormGroup extends OptionFormItem
$item['value'] = option($item['id']);
}
$rendered[] = view('vendor.option-form.'.$item['type'])->with([
$rendered[] = view('common.option-form.'.$item['type'])->with([
'id' => $item['id'],
'value' => $item['value']
]);
}
return view('vendor.option-form.group')->with('items', $rendered);
return view('common.option-form.group')->with('items', $rendered);
}
}

View File

@ -39,7 +39,7 @@ if (! function_exists('assets')) {
function assets($relativeUri)
{
// add query string to fresh cache
if (Str::startsWith($relativeUri, 'styles') || Str::startsWith($relativeUri, 'scripts')) {
if (Str::startsWith($relativeUri, 'css') || Str::startsWith($relativeUri, 'js')) {
return url("resources/assets/dist/$relativeUri")."?v=".config('app.version');
} elseif (Str::startsWith($relativeUri, 'lang')) {
return url("resources/$relativeUri");
@ -92,61 +92,27 @@ if (! function_exists('json')) {
}
}
if (! function_exists('bs_footer')) {
if (! function_exists('bs_footer_extra')) {
function bs_footer($page_identification = "")
function bs_footer_extra()
{
$content = "";
$scripts = [
assets('scripts/app.min.js'),
assets('lang/'.config('app.locale').'/locale.js'),
];
if ($page_identification !== "") {
$scripts[] = assets("scripts/$page_identification.js");
}
foreach ($scripts as $script) {
$content .= "<script type=\"text/javascript\" src=\"$script\"></script>\n";
}
$content .= '<script>'.option("custom_js").'</script>';
$extraContents = [];
Event::fire(new App\Events\RenderingFooter($extraContents));
return $content . implode("\n", $extraContents);
return implode("\n", $extraContents);
}
}
if (! function_exists('bs_header')) {
if (! function_exists('bs_header_extra')) {
function bs_header($page_identification = "")
function bs_header_extra()
{
$content = "";
$styles = [
assets('styles/app.min.css'),
assets('styles/skins/'.Option::get('color_scheme').'.min.css')
];
if ($page_identification !== "") {
$styles[] = assets("styles/$page_identification.css");
}
foreach ($styles as $style) {
$content .= "<link rel=\"stylesheet\" href=\"$style\">\n";
}
$content .= '<style>'.option("custom_css").'</style>';
$extraContents = [];
Event::fire(new App\Events\RenderingHeader($extraContents));
return $content . implode("\n", $extraContents);
return implode("\n", $extraContents);
}
}

View File

@ -36,7 +36,7 @@ var vendorScripts = [
'es6-promise/dist/es6-promise.auto.min.js',
'sweetalert2/dist/sweetalert2.min.js',
'jqPaginator/dist/1.2.0/jqPaginator.min.js',
'resources/assets/dist/scripts/general.js',
'resources/assets/dist/js/general.js',
];
var vendorStyles = [
@ -83,38 +83,36 @@ elixir((mix) => {
.task('compile-es6')
.task('compile-sass')
.scripts(convertNpmRelativePath(vendorScripts), distPath + 'scripts/app.min.js', './')
.styles(convertNpmRelativePath(vendorStyles), distPath + 'styles/app.min.css', './')
.replace(distPath + 'styles/app.min.css', styleReplacements)
.replace(distPath + 'scripts/app.min.js', scriptReplacements)
.scripts(convertNpmRelativePath(vendorScripts), distPath + 'js/app.js', './')
.styles(convertNpmRelativePath(vendorStyles), distPath + 'css/style.css', './')
.replace(distPath + 'css/style.css', styleReplacements)
.replace(distPath + 'js/app.js', scriptReplacements)
// copy fonts & images
.copy(convertNpmRelativePath(fonts), distPath + 'fonts/')
.copy(convertNpmRelativePath(images), distPath + 'images/')
.copy(convertNpmRelativePath(['admin-lte/dist/css/skins']), distPath + 'styles/skins')
.copy(convertNpmRelativePath(['admin-lte/dist/css/skins']), distPath + 'css/skins')
.copy(
['skin-preview/**', 'Chart.min.js'].map(relativePath => `${srcPath}vendor/${relativePath}`),
distPath + 'scripts/'
distPath + 'js/'
);
});
// compile sass
gulp.task('compile-sass', () => {
gulp.src(srcPath + 'styles/*.scss')
gulp.src(srcPath + 'sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(cleanCss())
.pipe(gulp.dest(distPath + 'styles'));
.pipe(gulp.dest(distPath + 'css'));
});
gulp.task('compile-es6', () => {
gulp.src(srcPath + 'scripts/*.js')
gulp.src(srcPath + 'js/*.js')
.pipe(babel({ presets: ['es2015'] }))
.pipe(uglify())
.pipe(gulp.dest(distPath + 'scripts'));
.pipe(gulp.dest(distPath + 'js'));
});
gulp.task
// delete cache files
gulp.task('clear', () => {
clearCache();
@ -168,10 +166,10 @@ gulp.task('zip', () => {
gulp.task('watch', () => {
// watch .scss files
gulp.watch(srcPath + 'styles/*.scss', ['compile-sass'], () => notify({ message: 'Sass files compiled!' }));
gulp.watch(srcPath + 'sass/*.scss', ['compile-sass'], () => notify({ message: 'Sass files compiled!' }));
// watch .js files
gulp.watch(srcPath + 'scripts/*.js', ['compile-es6'], () => notify({ message: 'ES6 scripts compiled!' }));
gulp.watch(srcPath + 'scripts/general.js', ['scripts']);
gulp.watch(srcPath + 'js/*.js', ['compile-es6'], () => notify({ message: 'ES6 scripts compiled!' }));
gulp.watch(srcPath + 'js/general.js', ['scripts']);
});
function convertNpmRelativePath(paths) {

View File

@ -19,7 +19,7 @@ $(document).ready(function() {
});
$.extend(true, $.fn.dataTable.defaults, {
language: trans('vendor.datatables'),
language: trans('common.datatables'),
scrollX: true,
pageLength: 25,
autoWidth: false,

View File

@ -3,7 +3,7 @@
@section('title', trans('general.customize'))
@section('style')
<link rel="stylesheet" href="{{ assets('styles/skins/_all-skins.min.css') }}">
<link rel="stylesheet" href="{{ assets('css/skins/_all-skins.min.css') }}">
@endsection
@section('content')
@ -63,5 +63,3 @@ var current_skin = "{{ option('color_scheme') }}";
</script>
@endsection

View File

@ -82,7 +82,7 @@
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<script type="text/javascript" src="{{ assets('scripts/Chart.min.js') }}"></script>
<script type="text/javascript" src="{{ assets('js/Chart.min.js') }}"></script>
@endsection

View File

@ -8,7 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('admin') !!}
@include('common.dependencies.style', ['module' => 'admin'])
@yield('style')
</head>
@ -38,9 +38,9 @@
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
@include('vendor.language')
@include('common.language')
@include('vendor.user-menu')
@include('common.user-menu')
</ul>
</div>
</nav>
@ -89,7 +89,7 @@
</div><!-- ./wrapper -->
<!-- App Scripts -->
{!! bs_footer('admin') !!}
@include('common.dependencies.script', ['module' => 'admin'])
@if (option('check_update'))
<script>

View File

@ -40,8 +40,11 @@
@section('script')
<script type="text/javascript">
$(document).ready(function() {
$('.box-body').css('min-height', $('.content-wrapper').height() - $('.content-header').outerHeight() - 120);
});
$(document).ready(function () {
$('.box-body').css(
'min-height',
$('.content-wrapper').height() - $('.content-header').outerHeight() - 120
);
});
</script>
@endsection

View File

@ -40,8 +40,11 @@
@section('script')
<script type="text/javascript">
$(document).ready(function() {
$('.box-body').css('min-height', $('.content-wrapper').height() - $('.content-header').outerHeight() - 120);
});
$(document).ready(function() {
$('.box-body').css(
'min-height',
$('.content-wrapper').height() - $('.content-header').outerHeight() - 120
);
});
</script>
@endsection

View File

@ -7,8 +7,9 @@
{!! bs_favicon() !!}
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('auth') !!}
<script>blessing.redirect_to = '<?php echo session('last_requested_path') ?>';</script>
@include('common.dependencies.style', ['module' => 'auth'])
<script>blessing.redirect_to = "{{ session('last_requested_path') }}";</script>
</head>
<body class="hold-transition login-page">
@ -21,7 +22,7 @@
</div>
<!-- App Scripts -->
{!! bs_footer('auth') !!}
@include('common.dependencies.script', ['module' => 'auth'])
@yield('script')
</body>

View File

@ -0,0 +1,11 @@
<script type="text/javascript" src="{{ assets('js/app.js') }}"></script>
<script type="text/javascript" src="{{ assets('lang/'.config('app.locale').'/locale.js') }}"></script>
@if (isset($module))
<script type="text/javascript" src="{{ assets('js/'.$module.'.js') }}"></script>
@endif
<!-- User custom scripts -->
<script type="text/javascript">{!! option('custom_js') !!}</script>
{{-- Content added by plugins dynamically --}}
{!! bs_footer_extra() !!}

View File

@ -0,0 +1,13 @@
<!-- Bundled styles -->
<link rel="stylesheet" href="{{ assets('css/style.css') }}">
<!-- AdminLTE color scheme -->
<link rel="stylesheet" href="{{ assets('css/skins/'.option('color_scheme').'.min.css') }}">
@if (isset($module))
<link rel="stylesheet" href="{{ assets('css/'.$module.'.css') }}">
@endif
<!-- User custom styles -->
<style>{!! option('custom_css') !!}</style>
{{-- Content added by plugins dynamically --}}
{!! bs_header_extra() !!}

View File

@ -11,7 +11,7 @@
@endforeach
@if ($renderWithOutTable)
@each('vendor.option-form.item', $items, 'item')
@each('common.option-form.item', $items, 'item')
@else
<table class="table">
<tbody>
@ -22,7 +22,7 @@
@endunless
<td class="value">
@include('vendor.option-form.item', compact('item'))
@include('common.option-form.item', compact('item'))
</td>
</tr>
@endforeach

View File

@ -14,8 +14,8 @@
</div>
</div><!-- /.box-body -->
<script type="text/javascript" src="{{ assets('scripts/three.min.js') }}"></script>
<script type="text/javascript" src="{{ assets('scripts/three.msp.js') }}"></script>
<script type="text/javascript" src="{{ assets('js/three.min.js') }}"></script>
<script type="text/javascript" src="{{ assets('js/three.msp.js') }}"></script>
<script>
// Default Steve Skin: https://minecraft.net/images/steve.png

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title>@yield('title') - Blessing Skin Server</title>
<link rel="stylesheet" type="text/css" href="{{ assets('styles/install.css') }}">
<link rel="stylesheet" type="text/css" href="{{ assets('css/install.css') }}">
</head>
<body class="container">

View File

@ -8,10 +8,10 @@
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('index') !!}
@include('common.dependencies.style', ['module' => 'index'])
<script type="text/javascript">
var changeWrapperHeight = function() {
var changeWrapperHeight = function () {
document.getElementsByClassName('wrapper')[0].style.height = window.innerHeight + 'px';
};
</script>
@ -42,10 +42,10 @@
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
@include('vendor.language')
@include('common.language')
@if (!is_null($user))
@include('vendor.user-menu')
@include('common.user-menu')
@else {{-- Anonymous User --}}
<!-- User Account Menu -->
<li class="dropdown user user-menu">
@ -131,7 +131,7 @@
</div>
<!-- App Scripts -->
{!! bs_footer() !!}
@include('common.dependencies.script', ['module' => 'index'])
<script>
$(window).scroll(function(event) {

View File

@ -6,7 +6,7 @@
<meta name="robots" content="noindex,nofollow" />
<title>{{ trans('setup.wizard.master.title') }}</title>
<link rel="shortcut icon" href="{{ assets('dist/images/favicon.ico') }}">
<link rel="stylesheet" type="text/css" href="{{ assets('dist/styles/install.css') }}">
<link rel="stylesheet" type="text/css" href="{{ assets('dist/css/install.css') }}">
@yield('style')
</head>

View File

@ -8,7 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('skinlib') !!}
@include('common.dependencies.style', ['module' => 'skinlib'])
@yield('style')
</head>
@ -78,7 +78,7 @@
</li>
@endunless
</ul>
@unless (isset($with_out_filter))
<form class="navbar-form navbar-left" id="search-form" role="search">
<div class="form-group">
@ -92,10 +92,10 @@
<ul class="nav navbar-nav">
<li><a href="{{ url('skinlib/upload') }}"><i class="fa fa-upload" aria-hidden="true"></i> <span class="description-text">{{ trans('skinlib.general.upload-new-skin') }}</span></a></li>
@include('vendor.language')
@include('common.language')
@if (!is_null($user))
@include('vendor.user-menu')
@include('common.user-menu')
@else {{-- Anonymous User --}}
<!-- User Account Menu -->
<li class="dropdown user user-menu">
@ -130,7 +130,7 @@
</div><!-- ./wrapper -->
<!-- App Scripts -->
{!! bs_footer('skinlib') !!}
@include('common.dependencies.script', ['module' => 'skinlib'])
@yield('script')

View File

@ -18,7 +18,7 @@
<div class="row">
<div class="col-md-8">
<div class="box box-primary">
@include('vendor.texture-preview')
@include('common.texture-preview')
<div class="box-footer">
@if (is_null($user)) {{-- Not logged in --}}
@ -97,13 +97,13 @@
@if (!is_null($user))
@if ($texture->uploader == $user->uid)
@include('vendor.manage-panel', [
@include('common.manage-panel', [
'title' => trans('skinlib.show.delete-texture')." / ".trans('skinlib.privacy.change-privacy'),
'message' => trans('skinlib.show.notice')
])
@elseif ($user->isAdmin())
@include('vendor.manage-panel', [
@include('common.manage-panel', [
'title' => trans('skinlib.show.manage-panel'),
'message' => trans('skinlib.show.notice-admin')
])

View File

@ -81,7 +81,7 @@ label[for="type-cape"] {
</div>
<div class="col-md-6">
<div class="box box-default">
@include('vendor.texture-preview')
@include('common.texture-preview')
</div>
</div>
</div>

View File

@ -53,7 +53,7 @@
<div class="col-md-4">
<div class="box box-default">
@include('vendor.texture-preview')
@include('common.texture-preview')
<div class="box-footer">
<button class="btn btn-primary" data-toggle="modal" data-target="#modal-use-as">{{ trans('user.closet.use-as.button') }}</button>

View File

@ -8,7 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('user') !!}
@include('common.dependencies.style', ['module' => 'user'])
@yield('style')
</head>
@ -36,9 +36,9 @@
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
@include('vendor.language')
@include('common.language')
@include('vendor.user-menu')
@include('common.user-menu')
</ul>
</div>
</nav>
@ -92,7 +92,7 @@
</div><!-- ./wrapper -->
<!-- App Scripts -->
{!! bs_footer('user') !!}
@include('common.dependencies.script', ['module' => 'user'])
@yield('script')
</body>

View File

@ -139,8 +139,8 @@
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript" src="{{ assets('scripts/three.min.js') }}"></script>
<script type="text/javascript" src="{{ assets('scripts/three.msp.js') }}"></script>
<script type="text/javascript" src="{{ assets('js/three.min.js') }}"></script>
<script type="text/javascript" src="{{ assets('js/three.msp.js') }}"></script>
@endsection