Fix the theme selector.
This commit is contained in:
parent
0042c3bbe4
commit
bc2d5088c5
19 changed files with 17936 additions and 1311 deletions
|
@ -61,12 +61,12 @@ class AppServiceProvider extends ServiceProvider
|
|||
config([$setting->key => $setting->value]);
|
||||
}
|
||||
|
||||
if(!file_exists(base_path('themes')."/".config("SETTINGS::SYSTEM:THEME"))){
|
||||
if(!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))){
|
||||
config(['SETTINGS::SYSTEM:THEME' => "default"]);
|
||||
}
|
||||
|
||||
if(config('theme.active') == null){
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default");
|
||||
if(config('SETTINGS::SYSTEM:THEME') !== config('theme.active')){
|
||||
Theme::set(config("SETTINGS::SYSTEM:THEME"), "default");
|
||||
}
|
||||
|
||||
// Set Mail Config
|
||||
|
|
|
@ -9,7 +9,7 @@ return [
|
|||
| It will assign the default active theme to be used if one is not set during
|
||||
| runtime.
|
||||
*/
|
||||
'active' => null,
|
||||
'active' => "default",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
2503
package-lock.json
generated
2503
package-lock.json
generated
File diff suppressed because it is too large
Load diff
17
package.json
17
package.json
|
@ -1,29 +1,24 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "vite",
|
||||
"prod": "npm run production",
|
||||
"production": "vite build",
|
||||
"dev:default": "vite --config themes/default/vite.config.js",
|
||||
"build:default": "vite build --config themes/default/vite.config.js",
|
||||
"dev:1day2die": "vite --config themes/1day2die/vite.config.js",
|
||||
"build:1day2die": "vite build --config themes/1day2die/vite.config.js"
|
||||
"production": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.25",
|
||||
"bootstrap": "^4.6.0",
|
||||
"jquery": "^3.5",
|
||||
"laravel-vite-plugin": "^0.7.3",
|
||||
"lodash": "^4.17.19",
|
||||
"popper.js": "^1.16",
|
||||
"postcss": "^8.1.14",
|
||||
"resolve-url-loader": "^3.1.2",
|
||||
"sass": "^1.32.1",
|
||||
"sass-loader": "^10.1.1",
|
||||
"vite": "^4.0.4"
|
||||
"sass-loader": "^10.1.1"
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
"tinymce": "^6.3.1"
|
||||
"tinymce": "^6.3.1",
|
||||
"vite": "^4.0.4",
|
||||
"laravel-vite-plugin": "^0.7.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
12
resources/css/adminlte.min.css
vendored
Normal file
12
resources/css/adminlte.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
5
resources/css/slim.min.css
vendored
Normal file
5
resources/css/slim.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
21
resources/css/stylesheet.css
vendored
Normal file
21
resources/css/stylesheet.css
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #3A4047;
|
||||
border-radius: 9px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover{
|
||||
background: #2E3339;
|
||||
}
|
||||
::-webkit-scrollbar-track{
|
||||
background: #343a40;
|
||||
border-radius: 10px;
|
||||
box-shadow: inset 7px 10px 12px #343a40;
|
||||
}
|
||||
.nav-link>span,
|
||||
.nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
2733
resources/js/adminlte.js
vendored
Normal file
2733
resources/js/adminlte.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
resources/js/alpine.js
vendored
Normal file
5
resources/js/alpine.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
resources/js/app.js
vendored
Normal file
6
resources/js/app.js
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
require('./adminlte');
|
||||
require('./slim.kickstart.min')
|
||||
require('./bootstrap');
|
||||
|
||||
|
||||
|
41
resources/js/bootstrap.js
vendored
Normal file
41
resources/js/bootstrap.js
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
// window._ = require('lodash');
|
||||
|
||||
/**
|
||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
||||
* code may be modified to fit the specific needs of your application.
|
||||
*/
|
||||
|
||||
try {
|
||||
window.Popper = require('popper.js').default;
|
||||
window.$ = window.jQuery = require('jquery');
|
||||
|
||||
require('bootstrap');
|
||||
} catch (e) {}
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// window.Pusher = require('pusher-js');
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||
// forceTLS: true
|
||||
// });
|
10872
resources/js/jquery.js
vendored
Normal file
10872
resources/js/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
2972
resources/js/slim.kickstart.min.js
vendored
Normal file
2972
resources/js/slim.kickstart.min.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
19
resources/sass/_variables.scss
vendored
Normal file
19
resources/sass/_variables.scss
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Body
|
||||
$body-bg: #f8fafc;
|
||||
|
||||
// Typography
|
||||
$font-family-sans-serif: 'Nunito', sans-serif;
|
||||
$font-size-base: 0.9rem;
|
||||
$line-height-base: 1.6;
|
||||
|
||||
// Colors
|
||||
$blue: #3490dc;
|
||||
$indigo: #6574cd;
|
||||
$purple: #9561e2;
|
||||
$pink: #f66d9b;
|
||||
$red: #e3342f;
|
||||
$orange: #f6993f;
|
||||
$yellow: #ffed4a;
|
||||
$green: #38c172;
|
||||
$teal: #4dc0b5;
|
||||
$cyan: #6cb2eb;
|
7
resources/sass/app.scss
vendored
Normal file
7
resources/sass/app.scss
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Fonts
|
||||
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback");
|
||||
|
||||
// Bootstrap
|
||||
@import "../css/stylesheet.css";
|
||||
@import "../css/adminlte.min.css";
|
||||
@import "../css/slim.min.css";
|
|
@ -30,7 +30,7 @@
|
|||
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
|
||||
{!! htmlScriptTagJsApi() !!}
|
||||
@endif
|
||||
@vite('themes/default/sass/app.scss')
|
||||
@vite('resources/sass/app.scss')
|
||||
</head>
|
||||
@yield('content')
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
<!-- tinymce -->
|
||||
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
|
||||
@vite('themes/default/sass/app.scss')
|
||||
@vite('resources/sass/app.scss')
|
||||
</head>
|
||||
|
||||
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
||||
|
|
18
themes/default/vite.config.js → vite.config.js
vendored
18
themes/default/vite.config.js → vite.config.js
vendored
|
@ -1,20 +1,13 @@
|
|||
import { defineConfig } from "vite";
|
||||
import laravel from "laravel-vite-plugin";
|
||||
import path from "path";
|
||||
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel({
|
||||
input: [
|
||||
"themes/default/sass/app.scss",
|
||||
"themes/default/js/app.js"
|
||||
],
|
||||
buildDirectory: "default",
|
||||
input: "resources/sass/app.scss"
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
name: "blade",
|
||||
handleHotUpdate({ file, server }) {
|
||||
|
@ -29,9 +22,8 @@ export default defineConfig({
|
|||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/themes/default/js',
|
||||
'~bootstrap': path.resolve('node_modules/bootstrap'),
|
||||
'@': '/resources/js/'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
});
|
Loading…
Reference in a new issue