From aabf9b8a703183fe4e220eb7378dfd090fb5bfd4 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 22 Jun 2019 15:23:02 -0700 Subject: [PATCH] Some adjustments to begin working on a dark theme --- .../assets/styles/components/typography.css | 12 +++++ resources/assets/styles/main.css | 1 + resources/scripts/components/App.tsx | 9 ++-- .../components/ServerOverviewContainer.tsx | 7 +++ .../components/account/AccountOverview.tsx | 7 +++ .../components/account/DesignElements.tsx | 49 +++++++++++++++++++ resources/scripts/routers/AccountRouter.tsx | 38 ++++++++++++++ .../pterodactyl/templates/base/core.blade.php | 13 ++--- tailwind.js | 22 ++++----- 9 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 resources/assets/styles/components/typography.css create mode 100644 resources/scripts/components/ServerOverviewContainer.tsx create mode 100644 resources/scripts/components/account/AccountOverview.tsx create mode 100644 resources/scripts/components/account/DesignElements.tsx create mode 100644 resources/scripts/routers/AccountRouter.tsx diff --git a/resources/assets/styles/components/typography.css b/resources/assets/styles/components/typography.css new file mode 100644 index 000000000..679688f1a --- /dev/null +++ b/resources/assets/styles/components/typography.css @@ -0,0 +1,12 @@ +@import url('//fonts.googleapis.com/css?family=Rubik:300,400,500&display=swap'); +@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans:500&display=swap'); + +h1, h2, h3, h4, h5, h6 { + @apply .font-medium; + font-family: 'IBM Plex Sans', -apple-system, '"Roboto"', 'system-ui', 'sans-serif'; +} + +p { + @apply .text-neutral-200; + letter-spacing: 0.015em; +} diff --git a/resources/assets/styles/main.css b/resources/assets/styles/main.css index 01a28e8dc..d77937e72 100644 --- a/resources/assets/styles/main.css +++ b/resources/assets/styles/main.css @@ -9,6 +9,7 @@ /** * Pterodactyl Specific CSS */ +@import "components/typography.css"; @import "components/animations.css"; @import "components/authentication.css"; @import "components/forms.css"; diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index 9405bf524..c5b4d9f84 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -5,16 +5,19 @@ import AuthenticationRouter from '@/routers/AuthenticationRouter'; import { Provider } from 'react-redux'; import { persistor, store } from '@/redux/configure'; import { PersistGate } from 'redux-persist/integration/react'; +import AccountRouter from '@/routers/AccountRouter'; +import ServerOverviewContainer from '@/components/ServerOverviewContainer'; class App extends React.PureComponent { render () { return ( - -
- + +
+ +
diff --git a/resources/scripts/components/ServerOverviewContainer.tsx b/resources/scripts/components/ServerOverviewContainer.tsx new file mode 100644 index 000000000..20891bac9 --- /dev/null +++ b/resources/scripts/components/ServerOverviewContainer.tsx @@ -0,0 +1,7 @@ +import * as React from 'react'; + +export default class ServerOverviewContainer extends React.PureComponent { + render () { + return

Test

; + } +} diff --git a/resources/scripts/components/account/AccountOverview.tsx b/resources/scripts/components/account/AccountOverview.tsx new file mode 100644 index 000000000..3bff15eed --- /dev/null +++ b/resources/scripts/components/account/AccountOverview.tsx @@ -0,0 +1,7 @@ +import * as React from 'react'; + +export default class AccountOverview extends React.PureComponent { + render () { + return null; + } +} diff --git a/resources/scripts/components/account/DesignElements.tsx b/resources/scripts/components/account/DesignElements.tsx new file mode 100644 index 000000000..66950b6da --- /dev/null +++ b/resources/scripts/components/account/DesignElements.tsx @@ -0,0 +1,49 @@ +import * as React from 'react'; + +export default class DesignElements extends React.PureComponent { + render () { + return ( +
+
+
+

A Special Announcement

+
+

Your demands have been received: Dark Mode will be default in Pterodactyl 0.8!

+
+
+
+

Form Elements

+
+ + +

+ This is some descriptive helper text to explain how things work. +

+
+ + +
+ + +
+
+
+
+ ); + } +} diff --git a/resources/scripts/routers/AccountRouter.tsx b/resources/scripts/routers/AccountRouter.tsx new file mode 100644 index 000000000..46119c1ee --- /dev/null +++ b/resources/scripts/routers/AccountRouter.tsx @@ -0,0 +1,38 @@ +import * as React from 'react'; +import { BrowserRouter, Route, Switch } from 'react-router-dom'; +import { CSSTransition, TransitionGroup } from 'react-transition-group'; +import FlashMessageRender from '@/components/FlashMessageRender'; +import DesignElements from '@/components/account/DesignElements'; + +export default class AccountRouter extends React.PureComponent { + render () { + return ( + + ( + + +
+ + + + + +

+ © 2015 - 2019  + + Pterodactyl Software + +

+
+
+
+ )} + /> +
+ ); + } +} diff --git a/resources/themes/pterodactyl/templates/base/core.blade.php b/resources/themes/pterodactyl/templates/base/core.blade.php index 6fdb68687..c726c4f9f 100644 --- a/resources/themes/pterodactyl/templates/base/core.blade.php +++ b/resources/themes/pterodactyl/templates/base/core.blade.php @@ -1,14 +1,7 @@ -@extends('templates/wrapper') +@extends('templates/wrapper', [ + 'css' => ['body' => 'bg-neutral-800'], +]) @section('container')
@endsection - -@section('below-container') -
-
-

- {!! trans('strings.copyright', ['year' => date('Y')]) !!} -

-
-@endsection diff --git a/tailwind.js b/tailwind.js index 499f220d5..1ca42c0cb 100644 --- a/tailwind.js +++ b/tailwind.js @@ -12,7 +12,6 @@ we've done our very best to explain each section. View the full documentation at https://tailwindcss.com. - |------------------------------------------------------------------------------- | The default config |------------------------------------------------------------------------------- @@ -60,7 +59,7 @@ let colors = { 'primary-600': 'hsl(214, 95%, 36%)', // dark 'primary-700': 'hsl(215, 96%, 32%)', 'primary-800': 'hsl(216, 98%, 25%)', // darker - 'primary-900': 'hsl(218, 100%, 17%)', //darkest + 'primary-900': 'hsl(218, 100%, 17%)', // darkest // Color used the most in the design and make up the majority of the UI. 'neutral-50': 'hsl(216, 33%, 97%)', @@ -163,10 +162,10 @@ module.exports = { 'lg': '992px', 'xl': '1200px', - 'xsx': {'max': '575px'}, - 'smx': {'max': '767px'}, - 'mdx': {'max': '991px'}, - 'lgx': {'max': '1999px'}, + 'xsx': { 'max': '575px' }, + 'smx': { 'max': '767px' }, + 'mdx': { 'max': '991px' }, + 'lgx': { 'max': '1999px' }, }, /* @@ -189,6 +188,7 @@ module.exports = { fonts: { 'sans': [ + 'Rubik', '-apple-system', 'BlinkMacSystemFont', '"Helvetica Neue"', @@ -209,7 +209,7 @@ module.exports = { 'Monaco', 'Consolas', 'monospace', - ] + ], }, /* @@ -394,7 +394,7 @@ module.exports = { | */ - borderColors: global.Object.assign({default: colors['neutral-400']}, colors), + borderColors: global.Object.assign({ default: colors['neutral-400'] }, colors), /* |----------------------------------------------------------------------------- @@ -469,7 +469,7 @@ module.exports = { '1/6': '16.66667%', '5/6': '83.33333%', 'full': '100%', - 'screen': '100vw' + 'screen': '100vw', }, /* @@ -504,7 +504,7 @@ module.exports = { '48': '12rem', '64': '16rem', 'full': '100%', - 'screen': '100vh' + 'screen': '100vh', }, /* @@ -543,7 +543,7 @@ module.exports = { minHeight: { '0': '0', 'full': '100%', - 'screen': '100vh' + 'screen': '100vh', }, /*