Skip to content

Commit d78189d

Browse files
committed
Improve dash design
1 parent 9d8830a commit d78189d

File tree

3 files changed

+68
-16
lines changed

3 files changed

+68
-16
lines changed

resources/assets/styles/components/miscellaneous.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,45 @@ code {
2626
animation: offlineblink 2s infinite alternate;
2727
}
2828
}
29+
30+
/**
31+
* Usage indicator labels for the server listing.
32+
*/
33+
.usage {
34+
@apply .flex-1 .text-center .relative;
35+
36+
& > .indicator-title {
37+
@apply .text-xs .uppercase .font-hairline .bg-white .absolute .text-grey;
38+
margin-top:-9px;
39+
padding: 0 8px;
40+
left: 50%;
41+
transform: translate(-50%, 0);
42+
}
43+
}
44+
45+
/**
46+
* Flex boxes for server listing on user dashboard.
47+
*/
48+
.server-box {
49+
@apply .pb-4;
50+
51+
@screen smx {
52+
@apply .w-1/2 .pr-4;
53+
54+
&:nth-of-type(2n) {
55+
padding-right: 0;
56+
}
57+
}
58+
59+
@screen md {
60+
@apply .w-1/3 .pr-4;
61+
62+
&:nth-of-type(3n) {
63+
padding-right: 0;
64+
}
65+
}
66+
67+
& > .content {
68+
@apply .border .border-grey-light .bg-white .rounded .p-4 .justify-between .leading-normal;
69+
}
70+
}

resources/themes/pterodactyl/templates/base/core.blade.php

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,33 @@
3333
@endsection
3434

3535
@section('container')
36-
<div class="w-full m-auto mt-8 animate fadein sm:block md:flex">
36+
<div class="w-full m-auto mt-8 animate fadein sm:flex flex-wrap content-start">
3737
@foreach($servers as $server)
38-
<div class="w-full mr-4 flex flex-col">
39-
<div class="border border-grey-light bg-white rounded p-4 justify-between leading-normal">
38+
<div class="server-box">
39+
<div class="content">
4040
<div class="float-right">
4141
<div class="indicator {{ ['online', 'offline'][rand(0, 1)] }}"></div>
4242
</div>
4343
<div class="mb-4">
44-
{{--@if ($server->owner_id !== Auth::user()->id)--}}
45-
{{--<p class="text-sm text-grey-dark flex items-center">--}}
46-
{{--<svg class="fill-current text-grey w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">--}}
47-
{{--<path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z" ></path>--}}
48-
{{--</svg>--}}
49-
{{--Restricted Access--}}
50-
{{--</p>--}}
51-
{{--@endif--}}
5244
<div class="text-black font-bold text-xl">{{ $server->name }}</div>
53-
{{--<div class="flex text-center">--}}
54-
{{--<div class="flex-1">68%</div>--}}
55-
{{--<div class="flex-1">124 / 1024 Mb</div>--}}
56-
{{--</div>--}}
45+
</div>
46+
<div class="mb-0 flex">
47+
<div class="usage">
48+
<div class="indicator-title">CPU</div>
49+
</div>
50+
<div class="usage">
51+
<div class="indicator-title">Memory</div>
52+
</div>
53+
</div>
54+
<div class="mb-4 flex text-center">
55+
<div class="inline-block border border-grey-lighter border-l-0 p-4 flex-1">
56+
<span class="font-bold text-xl">{{ rand(1, 200) }}</span>
57+
<span class="font-light text-sm">%</span>
58+
</div>
59+
<div class="inline-block border border-grey-lighter border-l-0 border-r-0 p-4 flex-1">
60+
<span class="font-bold text-xl">{{ rand(128, 2048) }}</span>
61+
<span class="font-light text-sm">Mb</span>
62+
</div>
5763
</div>
5864
<div class="flex items-center">
5965
<div class="text-sm">
@@ -65,7 +71,7 @@
6571
</div>
6672
@endforeach
6773
</div>
68-
<div class="w-full m-auto mt-4">
74+
<div class="w-full m-auto mt-0">
6975
<p class="text-right text-grey-dark text-xs">
7076
{!! trans('strings.copyright', ['year' => date('Y')]) !!}
7177
</p>

tailwind.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ module.exports = {
171171
'md': '768px',
172172
'lg': '992px',
173173
'xl': '1200px',
174+
175+
'smx': {'max': '767px'},
176+
'mdx': {'max': '991px'},
177+
'lgx': {'max': '1999px'},
174178
},
175179

176180

0 commit comments

Comments
 (0)