Skip to content

Commit 6c6a3c9

Browse files
authored
Merge pull request pterodactyl#615 from Pterodactyl/feature/customized-theme
Feature/customized theme
2 parents 0e37298 + 1e94bd5 commit 6c6a3c9

File tree

11 files changed

+217
-52
lines changed

11 files changed

+217
-52
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,42 +35,44 @@ SOFTWARE.
3535
![](http://static.s3.pterodactyl.io/PhraseApp-parrot.png)
3636
A huge thanks to [PhraseApp](https://phraseapp.com) who provide us the software to help translate this project.
3737

38-
Ace Editor - [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) - [homepage](https://ace.c9.io)
38+
Ace Editor [license](https://github.com/ajaxorg/ace/blob/master/LICENSE) [homepage](https://ace.c9.io)
3939

40-
AdminLTE - [license](https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) - [homepage](https://almsaeedstudio.com)
40+
AdminLTE [license](https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) [homepage](https://almsaeedstudio.com)
4141

42-
Animate.css - [license](https://github.com/daneden/animate.css/blob/master/LICENSE) - [homepage](http://daneden.github.io/animate.css/)
42+
Animate.css [license](https://github.com/daneden/animate.css/blob/master/LICENSE) [homepage](http://daneden.github.io/animate.css/)
4343

44-
AnsiUp - [license](https://github.com/drudru/ansi_up/blob/master/Readme.md#license) - [homepage](https://github.com/drudru/ansi_up)
44+
AnsiUp [license](https://github.com/drudru/ansi_up/blob/master/Readme.md#license) [homepage](https://github.com/drudru/ansi_up)
4545

46-
Async.js - [license](https://github.com/caolan/async/blob/master/LICENSE) - [homepage](https://github.com/caolan/async/)
46+
Async.js [license](https://github.com/caolan/async/blob/master/LICENSE) [homepage](https://github.com/caolan/async/)
4747

48-
Bootstrap - [license](https://github.com/twbs/bootstrap/blob/master/LICENSE) - [homepage](http://getbootstrap.com)
48+
Bootstrap [license](https://github.com/twbs/bootstrap/blob/master/LICENSE) [homepage](http://getbootstrap.com)
4949

50-
BootStrap Notify - [license](https://github.com/mouse0270/bootstrap-notify/blob/master/LICENSE) - [homepage](http://bootstrap-notify.remabledesigns.com)
50+
BootStrap Notify [license](https://github.com/mouse0270/bootstrap-notify/blob/master/LICENSE) [homepage](http://bootstrap-notify.remabledesigns.com)
5151

52-
Chart.js - [license](https://github.com/chartjs/Chart.js/blob/master/LICENSE.md) - [homepage](http://www.chartjs.org)
52+
Chart.js [license](https://github.com/chartjs/Chart.js/blob/master/LICENSE.md) [homepage](http://www.chartjs.org)
5353

54-
FontAwesome - [license](http://fontawesome.io/license/) - [homepage](http://fontawesome.io)
54+
FontAwesome [license](http://fontawesome.io/license/) [homepage](http://fontawesome.io)
5555

56-
FontAwesome Animations - [license](https://github.com/l-lin/font-awesome-animation#license) - [homepage](https://github.com/l-lin/font-awesome-animation)
56+
FontAwesome Animations [license](https://github.com/l-lin/font-awesome-animation#license) [homepage](https://github.com/l-lin/font-awesome-animation)
5757

58-
jQuery - [license](https://github.com/jquery/jquery/blob/master/LICENSE.txt) - [homepage](http://jquery.com)
58+
jQuery [license](https://github.com/jquery/jquery/blob/master/LICENSE.txt) [homepage](http://jquery.com)
5959

60-
Laravel Framework - [license](https://github.com/laravel/framework/blob/5.4/LICENSE.md) - [homepage](https://laravel.com)
60+
Laravel Framework [license](https://github.com/laravel/framework/blob/5.4/LICENSE.md) [homepage](https://laravel.com)
6161

62-
Lodash - [license](https://github.com/lodash/lodash/blob/master/LICENSE) - [homepage](https://lodash.com/)
62+
Lodash [license](https://github.com/lodash/lodash/blob/master/LICENSE) [homepage](https://lodash.com/)
6363

64-
Select2 - [license](https://github.com/select2/select2/blob/master/LICENSE.md) - [homepage](https://select2.github.io)
64+
Select2 [license](https://github.com/select2/select2/blob/master/LICENSE.md) [homepage](https://select2.github.io)
6565

66-
Socket.io - [license](https://github.com/socketio/socket.io/blob/master/LICENSE) - [homepage](http://socket.io)
66+
Socket.io [license](https://github.com/socketio/socket.io/blob/master/LICENSE) [homepage](http://socket.io)
6767

68-
Socket.io File Upload - [license](https://github.com/vote539/socketio-file-upload/blob/master/server.js#L1-L27) - [homepage](https://github.com/vote539/socketio-file-upload)
68+
Socket.io File Upload [license](https://github.com/vote539/socketio-file-upload/blob/master/server.js#L1-L27) [homepage](https://github.com/vote539/socketio-file-upload)
6969

70-
SweetAlert - [license](https://github.com/t4t5/sweetalert/blob/master/LICENSE) - [homepage](http://t4t5.github.io/sweetalert/)
70+
SweetAlert [license](https://github.com/t4t5/sweetalert/blob/master/LICENSE) [homepage](http://t4t5.github.io/sweetalert/)
7171

7272
Typeahead — [license](https://github.com/bassjobsen/Bootstrap-3-Typeahead/blob/master/bootstrap3-typeahead.js)[homepage](https://github.com/bassjobsen/Bootstrap-3-Typeahead)
7373

74+
particles.js — [license](https://github.com/VincentGarreau/particles.js/blob/master/LICENSE.md)[homepage](http://vincentgarreau.com/particles.js/)
75+
7476
### Additional License Information
7577
Some Javascript and CSS used within the panel is licensed under a `MIT` or `Apache 2.0`. Please check their respective header files for more information.
7678

app/Console/Commands/MakeUser.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
namespace Pterodactyl\Console\Commands;
2626

2727
use Illuminate\Console\Command;
28-
use Pterodactyl\Repositories\oldUserRepository;
28+
use Pterodactyl\Repositories\UserRepository;
29+
use Pterodactyl\Services\Users\UserCreationService;
2930

3031
class MakeUser extends Command
3132
{
@@ -49,12 +50,20 @@ class MakeUser extends Command
4950
*/
5051
protected $description = 'Create a user within the panel.';
5152

53+
/**
54+
* @var \Pterodactyl\Services\Users\UserCreationService
55+
*/
56+
protected $creationService;
57+
5258
/**
5359
* Create a new command instance.
5460
*/
55-
public function __construct()
61+
public function __construct(
62+
UserCreationService $creationService
63+
)
5664
{
5765
parent::__construct();
66+
$this->creationService = $creationService;
5867
}
5968

6069
/**
@@ -78,8 +87,8 @@ public function handle()
7887
$data['root_admin'] = is_null($this->option('admin')) ? $this->confirm('Is this user a root administrator?') : $this->option('admin');
7988

8089
try {
81-
$user = new oldUserRepository;
82-
$user->create($data);
90+
91+
$this->creationService->handle($data);
8392

8493
return $this->info('User successfully created.');
8594
} catch (\Exception $ex) {

public/themes/pterodactyl/css/pterodactyl.css

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,44 @@
2323
@import 'checkbox.css';
2424

2525
.login-page {
26-
height: auto;
26+
background: #10529f;
27+
}
28+
29+
.login-logo {
30+
color: white;
31+
font-weight: bold;
32+
}
33+
34+
.login-copyright {
35+
color: white;
36+
}
37+
38+
.login-copyright a, .login-copyright a:hover {
39+
color: white;
40+
font-weight: bold;
41+
}
42+
43+
.particles-js-canvas-el {
44+
position: absolute;
2745
}
2846

2947
.login-box, .register-box {
30-
width: 40%;
31-
max-width: 500px;
32-
margin: 7% auto;
48+
position: absolute;
49+
margin: -180px 0 0 -180px;
50+
left: 50%;
51+
top: 50%;
52+
height: 360px;
53+
width: 360px;
54+
z-index: 100;
3355
}
3456

3557
@media (max-width:768px) {
36-
.login-box, .register-box {
58+
.login-box {
3759
width: 90%;
38-
margin-top: 20px
60+
margin-top: 20px;
61+
margin: 5%;
62+
left: 0;
63+
top: 0;
3964
}
4065
}
4166

@@ -282,6 +307,7 @@ tr:hover + tr.server-description {
282307
position: absolute;
283308
bottom: 5px;
284309
right: 10px;
310+
color: white;
285311
}
286312

287313
input.form-autocomplete-stop[readonly] {

public/themes/pterodactyl/vendor/adminlte/admin.min.css

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/themes/pterodactyl/vendor/adminlte/app.min.js

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/themes/pterodactyl/vendor/adminlte/colors/skin-blue.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"particles": {
3+
"number": {
4+
"value": 80,
5+
"density": {
6+
"enable": true,
7+
"value_area": 800
8+
}
9+
},
10+
"color": {
11+
"value": "#ffffff"
12+
},
13+
"shape": {
14+
"type": "circle",
15+
"stroke": {
16+
"width": 0,
17+
"color": "#000000"
18+
},
19+
"polygon": {
20+
"nb_sides": 5
21+
},
22+
"image": {
23+
"src": "img/github.svg",
24+
"width": 100,
25+
"height": 100
26+
}
27+
},
28+
"opacity": {
29+
"value": 0.40246529723245905,
30+
"random": false,
31+
"anim": {
32+
"enable": false,
33+
"speed": 1,
34+
"opacity_min": 0.1,
35+
"sync": false
36+
}
37+
},
38+
"size": {
39+
"value": 1,
40+
"random": true,
41+
"anim": {
42+
"enable": false,
43+
"speed": 40,
44+
"size_min": 0.1,
45+
"sync": false
46+
}
47+
},
48+
"line_linked": {
49+
"enable": true,
50+
"distance": 150,
51+
"color": "#ffffff",
52+
"opacity": 0.4,
53+
"width": 1
54+
},
55+
"move": {
56+
"enable": true,
57+
"speed": 5,
58+
"direction": "none",
59+
"random": false,
60+
"straight": false,
61+
"out_mode": "out",
62+
"bounce": false,
63+
"attract": {
64+
"enable": false,
65+
"rotateX": 600,
66+
"rotateY": 1200
67+
}
68+
}
69+
},
70+
"interactivity": {
71+
"detect_on": "canvas",
72+
"events": {
73+
"onhover": {
74+
"enable": true,
75+
"mode": "repulse"
76+
},
77+
"onclick": {
78+
"enable": false,
79+
"mode": "repulse"
80+
},
81+
"resize": true
82+
},
83+
"modes": {
84+
"grab": {
85+
"distance": 400,
86+
"line_linked": {
87+
"opacity": 1
88+
}
89+
},
90+
"bubble": {
91+
"distance": 400,
92+
"size": 40,
93+
"duration": 2,
94+
"opacity": 8,
95+
"speed": 3
96+
},
97+
"repulse": {
98+
"distance": 200,
99+
"duration": 0.4
100+
},
101+
"push": {
102+
"particles_nb": 4
103+
},
104+
"remove": {
105+
"particles_nb": 2
106+
}
107+
}
108+
},
109+
"retina_detect": true
110+
}

public/themes/pterodactyl/vendor/particlesjs/particles.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/themes/pterodactyl/layouts/admin.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<span>{{ Settings::get('company', 'Pterodactyl') }}</span>
6262
</a>
6363
<nav class="navbar navbar-static-top">
64-
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
64+
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
6565
<span class="sr-only">Toggle navigation</span>
6666
<span class="icon-bar"></span>
6767
<span class="icon-bar"></span>

resources/themes/pterodactyl/layouts/auth.blade.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,31 @@
4747
<![endif]-->
4848
@show
4949
</head>
50-
<body class="hold-transition login-page">
50+
<body id="particles-js" class="hold-transition login-page">
5151
<div class="login-box">
5252
<div class="login-logo">
5353
{{ Settings::get('company', 'Pterodactyl') }}
5454
</div>
5555
@yield('content')
56-
<p class="small text-muted">
56+
<p class="small login-copyright text-center">
5757
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/" target="_blank">Pterodactyl Software</a>.<br />
5858
</p>
59-
<div class="login-corner-info muted small">
60-
<strong><i class="fa fa-fw {{ $appIsGit ? 'fa-git-square' : 'fa-code-fork' }}"></i></strong> {{ $appVersion }}<br />
61-
<strong><i class="fa fa-fw fa-clock-o"></i></strong> {{ round(microtime(true) - LARAVEL_START, 3) }}s
62-
</div>
6359
</div>
60+
<div class="login-corner-info small">
61+
<strong><i class="fa fa-fw {{ $appIsGit ? 'fa-git-square' : 'fa-code-fork' }}"></i></strong> {{ $appVersion }}<br />
62+
<strong><i class="fa fa-fw fa-clock-o"></i></strong> {{ round(microtime(true) - LARAVEL_START, 3) }}s
63+
</div>
64+
6465
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
6566
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
6667
{!! Theme::js('js/autocomplete.js') !!}
68+
{!! Theme::js('vendor/particlesjs/particles.min.js') !!}
69+
<script type="text/javascript">
70+
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
71+
$(function () {
72+
particlesJS.load('particles-js', '{!! Theme::url('vendor/particlesjs/particles.json') !!}', function() {});
73+
})
74+
</script>
6775

6876
@if(config('pterodactyl.lang.in_context')) {!! Theme::js('vendor/phraseapp/phraseapp.js') !!} @endif
6977
</body>

0 commit comments

Comments
 (0)