Skip to content

Commit

Permalink
Initial css
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Griffiths committed Jan 29, 2019
1 parent 57125ed commit a8ef920
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/.idea
/vendor
/node_modules
package-lock.json
composer.phar
composer.lock
phpunit.xml
.phpunit.result.cache
.DS_Store
Thumbs.db
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "david-griffiths/nova-dark-theme",
"description": "A dark theme for Laravel Nova",
"keywords": [
"laravel",
"nova",
"dark",
"theme"
],
"license": "MIT",
"require": {
"php": ">=7.1.0"
},
"autoload": {
"psr-4": {
"DavidGriffiths\\NovaDarkTheme\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"DavidGriffiths\\NovaDarkTheme\\ThemeServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
26 changes: 26 additions & 0 deletions resources/css/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
:root {
--logo: #fff;
--sidebar-icon: #3f3f3f;
}

html {
background: #1D1D1D !important;
filter: invert(100%) contrast(90%) hue-rotate(180deg);
height: auto !important;
}

img {
filter: invert(100%) hue-rotate(180deg);
}

.bg-logo {
background-image: linear-gradient(0deg, #eeeeee 0%, #fff 100%);
}

.w-sidebar * {
color: #5f5f5f !important;
}

.bg-grad-sidebar {
background-image: linear-gradient(0deg, #f0f0f0 0%, #fdfdfd 100%);
}
32 changes: 32 additions & 0 deletions src/ThemeServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace DavidGriffiths\NovaDarkTheme;

use Laravel\Nova\Nova;
use Laravel\Nova\Events\ServingNova;
use Illuminate\Support\ServiceProvider;

class ThemeServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Nova::serving(function (ServingNova $event) {
Nova::style('nova-dark-theme', __DIR__.'/../resources/css/theme.css');
});
}

/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}

0 comments on commit a8ef920

Please sign in to comment.