move assets to resources directory
2
.bowerrc
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"directory": "resources/assets/bower_components"
|
||||
"directory": "resources/src/bower_components"
|
||||
}
|
||||
|
|
|
|||
5
.gitignore
vendored
|
|
@ -3,8 +3,5 @@
|
|||
vendor/*
|
||||
storage/textures/*
|
||||
node_modules/*
|
||||
resources/cache/*
|
||||
resources/assets/bower_components/*
|
||||
assets/css/*
|
||||
assets/js/*
|
||||
resources/src/bower_components/*
|
||||
koala-config.json
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
if (! function_exists('get_real_ip')) {
|
||||
|
||||
function get_real_ip()
|
||||
|
|
@ -54,7 +56,11 @@ if (! function_exists('assets')) {
|
|||
function assets($relative_uri)
|
||||
{
|
||||
// add query string to fresh cache
|
||||
return url("assets/$relative_uri")."?v=".config('app.version');
|
||||
if (Str::startsWith($relative_uri, 'css') || Str::startsWith($relative_uri, 'js')) {
|
||||
return url("resources/dist/$relative_uri")."?v=".config('app.version');
|
||||
} else {
|
||||
return url("resources/$relative_uri");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
3
assets/js/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
*
|
||||
!public/
|
||||
!.gitignore
|
||||
74
gulpfile.js
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: prpr
|
||||
* @Date: 2016-07-21 13:38:26
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-09-03 21:38:43
|
||||
* @Last Modified time: 2016-09-14 22:36:51
|
||||
*/
|
||||
|
||||
var gulp = require('gulp'),
|
||||
|
|
@ -15,58 +15,60 @@ var gulp = require('gulp'),
|
|||
|
||||
require('laravel-elixir-replace');
|
||||
|
||||
var path = require('path');
|
||||
var version = require('./package.json').version;
|
||||
|
||||
var vendor_js = [
|
||||
'resources/assets/bower_components/jquery/dist/jquery.min.js',
|
||||
'resources/assets/bower_components/bootstrap/dist/js/bootstrap.min.js',
|
||||
'resources/assets/bower_components/AdminLTE/dist/js/app.min.js',
|
||||
'resources/assets/bower_components/bootstrap-fileinput/js/fileinput.min.js',
|
||||
'resources/assets/bower_components/bootstrap-fileinput/js/locales/zh.js',
|
||||
'resources/assets/bower_components/iCheck/icheck.min.js',
|
||||
'resources/assets/bower_components/toastr/toastr.min.js',
|
||||
'resources/assets/bower_components/sweetalert2/dist/sweetalert2.min.js',
|
||||
'resources/assets/bower_components/es6-promise/es6-promise.min.js'
|
||||
'resources/src/bower_components/jquery/dist/jquery.min.js',
|
||||
'resources/src/bower_components/bootstrap/dist/js/bootstrap.min.js',
|
||||
'resources/src/bower_components/AdminLTE/dist/js/app.min.js',
|
||||
'resources/src/bower_components/bootstrap-fileinput/js/fileinput.min.js',
|
||||
'resources/src/bower_components/bootstrap-fileinput/js/locales/zh.js',
|
||||
'resources/src/bower_components/iCheck/icheck.min.js',
|
||||
'resources/src/bower_components/toastr/toastr.min.js',
|
||||
'resources/src/bower_components/sweetalert2/dist/sweetalert2.min.js',
|
||||
'resources/src/bower_components/es6-promise/es6-promise.min.js'
|
||||
];
|
||||
|
||||
var vendor_css = [
|
||||
'resources/assets/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
'resources/assets/bower_components/AdminLTE/dist/css/AdminLTE.min.css',
|
||||
'resources/assets/bower_components/bootstrap-fileinput/css/fileinput.min.css',
|
||||
'resources/assets/bower_components/font-awesome/css/font-awesome.min.css',
|
||||
'resources/assets/bower_components/iCheck/skins/square/blue.css',
|
||||
'resources/assets/bower_components/toastr/toastr.min.css',
|
||||
'resources/assets/bower_components/sweetalert2/dist/sweetalert2.min.css'
|
||||
'resources/src/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
'resources/src/bower_components/AdminLTE/dist/css/AdminLTE.min.css',
|
||||
'resources/src/bower_components/bootstrap-fileinput/css/fileinput.min.css',
|
||||
'resources/src/bower_components/font-awesome/css/font-awesome.min.css',
|
||||
'resources/src/bower_components/iCheck/skins/square/blue.css',
|
||||
'resources/src/bower_components/toastr/toastr.min.css',
|
||||
'resources/src/bower_components/sweetalert2/dist/sweetalert2.min.css'
|
||||
];
|
||||
|
||||
var replacements = [
|
||||
['@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);', ''],
|
||||
['blue.png', '"../images/blue.png"'],
|
||||
['blue@2x.png', '"../images/blue@2x.png"'],
|
||||
['../img/loading.gif', '"../images/loading.gif"'],
|
||||
['../img/loading-sm.gif', '"../images/loading-sm.gif"']
|
||||
['../fonts/fontawesome', '../../fonts/fontawesome'],
|
||||
['blue.png', '"../../images/blue.png"'],
|
||||
['blue@2x.png', '"../../images/blue@2x.png"'],
|
||||
['../img/loading.gif', '"../../images/loading.gif"'],
|
||||
['../img/loading-sm.gif', '"../../images/loading-sm.gif"']
|
||||
];
|
||||
|
||||
elixir(function(mix) {
|
||||
mix
|
||||
.scripts(vendor_js.concat([
|
||||
'resources/assets/js/utils.js'
|
||||
]), 'assets/js/app.min.js', './')
|
||||
]), 'resources/dist/js/app.min.js', './')
|
||||
|
||||
.styles(vendor_css, 'assets/css/app.min.css', './')
|
||||
.replace('assets/css/app.min.css', replacements)
|
||||
.styles(vendor_css, 'resources/dist/css/app.min.css', './')
|
||||
.replace('resources/dist/css/app.min.css', replacements)
|
||||
|
||||
// copy fonts & images
|
||||
.copy([
|
||||
'resources/assets/bower_components/bootstrap/dist/fonts/**',
|
||||
'resources/assets/bower_components/font-awesome/fonts/**'
|
||||
], 'assets/fonts/')
|
||||
'resources/src/bower_components/bootstrap/dist/fonts/**',
|
||||
'resources/src/bower_components/font-awesome/fonts/**'
|
||||
], 'resources/fonts/')
|
||||
.copy([
|
||||
'resources/assets/bower_components/iCheck/skins/square/blue.png',
|
||||
'resources/assets/bower_components/iCheck/skins/square/blue@2x.png',
|
||||
'resources/assets/bower_components/bootstrap-fileinput/img/loading.gif',
|
||||
'resources/assets/bower_components/bootstrap-fileinput/img/loading-sm.gif'
|
||||
], 'assets/images/')
|
||||
'resources/src/bower_components/iCheck/skins/square/blue.png',
|
||||
'resources/src/bower_components/iCheck/skins/square/blue@2x.png',
|
||||
'resources/src/bower_components/bootstrap-fileinput/img/loading.gif',
|
||||
'resources/src/bower_components/bootstrap-fileinput/img/loading-sm.gif'
|
||||
], 'resources/images/')
|
||||
|
||||
.task('sass')
|
||||
.task('uglify');
|
||||
|
|
@ -74,16 +76,16 @@ elixir(function(mix) {
|
|||
|
||||
// compile sass
|
||||
gulp.task('sass', function () {
|
||||
gulp.src('resources/assets/sass/*.scss')
|
||||
gulp.src('resources/src/sass/*.scss')
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(cleanCss())
|
||||
.pipe(gulp.dest('./assets/css'));
|
||||
.pipe(gulp.dest('./resources/dist/css'));
|
||||
});
|
||||
|
||||
gulp.task('uglify', function() {
|
||||
gulp.src('resources/assets/js/*.js')
|
||||
gulp.src('resources/src/js/*.js')
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('./assets/js'));
|
||||
.pipe(gulp.dest('./resources/dist/js'));
|
||||
});
|
||||
|
||||
// release
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 382 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 518 KiB After Width: | Height: | Size: 518 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
|
|
@ -2,24 +2,24 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-06-04 20:55:09
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-08-28 13:32:56
|
||||
* @Last Modified time: 2016-09-14 22:35:45
|
||||
*/
|
||||
|
||||
$font_stack: Ubuntu, 'Segoe UI', 'Microsoft Yahei', 'Microsoft Jhenghei', sans-serif;
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('../fonts/ubuntu.woff2') format('woff2');
|
||||
src: url('../../fonts/ubuntu.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Minecraft';
|
||||
src: url('../fonts/minecraft.eot');
|
||||
src: url('../fonts/minecraft.eot') format('embedded-opentype'),
|
||||
url('../fonts/minecraft.woff2') format('woff2'),
|
||||
url('../fonts/minecraft.woff') format('woff'),
|
||||
url('../fonts/minecraft.ttf') format('truetype'),
|
||||
url('../fonts/minecraft.svg#minecraft') format('svg');
|
||||
src: url('../../fonts/minecraft.eot');
|
||||
src: url('../../fonts/minecraft.eot') format('embedded-opentype'),
|
||||
url('../../fonts/minecraft.woff2') format('woff2'),
|
||||
url('../../fonts/minecraft.woff') format('woff'),
|
||||
url('../../fonts/minecraft.ttf') format('truetype'),
|
||||
url('../../fonts/minecraft.svg#minecraft') format('svg');
|
||||
}
|
||||
|
||||
body, h1, h2, h3, h4, h5, h6, .logo {
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
@section('title', '个性化')
|
||||
|
||||
@section('style')
|
||||
<link rel="stylesheet" href="{{ assets('libs/skins/_all-skins.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/_all-skins.min.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- App Styles -->
|
||||
<link rel="stylesheet" href="{{ assets('css/app.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ assets('libs/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('css/admin.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<!-- App Styles -->
|
||||
<link rel="stylesheet" href="{{ assets('css/app.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('libs/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('css/auth.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- App Styles -->
|
||||
<link rel="stylesheet" href="{{ assets('css/app.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ assets('libs/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('css/index.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- App Styles -->
|
||||
<link rel="stylesheet" href="{{ assets('css/app.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ url('assets/libs/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('css/skinlib.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@
|
|||
</div><!-- /.container -->
|
||||
</div><!-- /.content-wrapper -->
|
||||
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.msp.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.msp.js') }}"></script>
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ label[for="type-cape"] {
|
|||
</div><!-- /.container -->
|
||||
</div><!-- /.content-wrapper -->
|
||||
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.msp.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.msp.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@
|
|||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.msp.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.msp.js') }}"></script>
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
@section('title', '配置生成')
|
||||
|
||||
@section('style')
|
||||
<link rel="stylesheet" href="{{ assets('libs/highlight/styles/arduino-light.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/highlight/styles/arduino-light.css') }}">
|
||||
<style> pre { border: 0; } td[class='key'], td[class='value'] { border-top: 0 !important; } </style>
|
||||
@endsection
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ Cape: http://skins.minecraft.net/MinecraftCloaks/%s.png
|
|||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript" src="{{ assets('/libs/highlight/highlight.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/highlight/highlight.min.js') }}"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('pre').each(function(i, block) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- App Styles -->
|
||||
<link rel="stylesheet" href="{{ assets('css/app.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ assets('libs/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ assets('vendor/skins/'.Option::get('color_scheme').'.min.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ assets('css/user.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@
|
|||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('libs/skin-preview/three.msp.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ assets('vendor/skin-preview/three.msp.js') }}"></script>
|
||||
|
||||
@endsection
|
||||
|
||||
|
|
|
|||