Skip to content

Commit

Permalink
Changes on design, publish
Browse files Browse the repository at this point in the history
New views to publish like login, logo sidebar, automated alerts generators, changes on design.
  • Loading branch information
Christian committed Feb 18, 2019
1 parent 2337349 commit 7b0e25f
Show file tree
Hide file tree
Showing 183 changed files with 65,711 additions and 62,327 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ php artisan vendor:publish --tag=mage-publish
### Update scripts

```
php artisan vendor:publish --tag=mage-scripts --force
php artisan vendor:publish --tag=mage-assets --force
```
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
}
],
"autoload": {
"files" : [
"src/app/Helpers/IsRoute.php"
],
"psr-4": {
"Omatech\\Mage\\": "src"
}
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"admin-lte": "git://github.com/almasaeed2010/AdminLTE.git#v3-dev",
"@fortawesome/fontawesome-free": "^5.7.2",
"axios": "^0.18.0",
"bootstrap": "^4.3.0",
"datatables": "^1.10.18",
"datatables.net-bs4": "^1.10.19",
"feather-icons": "^4.17.0",
"ionicons": "^4.5.5",
"jquery": "^3.3.1",
"laravel-mix": "^4.0.14",
"open-sans-fonts": "^1.5.0",
"popper.js": "^1.14.7",
"resolve-url-loader": "2.3.1",
"sass": "^1.17.0",
"sass-loader": "7.*",
"source-sans-pro": "^2.45.0",
"select2": "^4.0.6-rc.1",
"sweetalert": "^2.1.2",
"vue-template-compiler": "^2.6.5"
}
Expand Down
2 changes: 2 additions & 0 deletions src/MageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\ServiceProvider;
use Omatech\Mage\App\Providers\ViewServiceProvider;
use Omatech\Mage\App\Providers\HelpersServiceProvider;
use Omatech\Mage\App\Providers\PublishServiceProvider;
use Omatech\Mage\App\Providers\RoutingServiceProvider;
use Omatech\Mage\App\Providers\MiddlewareServiceProvider;
Expand Down Expand Up @@ -41,6 +42,7 @@ public function register()
$this->app->register(ViewServiceProvider::class);
$this->app->register(RoutingServiceProvider::class);
$this->app->register(MiddlewareServiceProvider::class);
$this->app->register(HelpersServiceProvider::class);

$this->app->register(SpatiePermissionsServiceProvider::class);
$this->app->register(SpatieTranslatableServiceProvider::class);
Expand Down
13 changes: 13 additions & 0 deletions src/app/Helpers/GetCurrentGitCommit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

if (!function_exists('getCurrentGitCommit')) {
function getCurrentGitCommit()
{
$commitHash = trim(exec('git log --pretty="%h" -n1 HEAD'));

$commitDate = new \DateTime(trim(exec('git log -n1 --pretty=%ci HEAD')));
$commitDate->setTimezone(new \DateTimeZone('Europe/Madrid'));

return sprintf('#%s - (%s)', $commitHash, $commitDate->format('d/m/Y H:i:s'));
}
}
32 changes: 32 additions & 0 deletions src/app/Providers/HelpersServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Omatech\Mage\App\Providers;

use Illuminate\Support\ServiceProvider;

class HelpersServiceProvider extends ServiceProvider
{
/**
* Register any other events for your application.
*
* @return void
*/
public function boot()
{
$this->helpers();
}

/**
* Register the application middlewares.
*
* @return void
*/
private function helpers()
{
$files = array_diff(scandir(__DIR__.'/../Helpers/'), array('..', '.'));

foreach ($files as $file) {
require_once __DIR__.'/../Helpers/'.$file;
}
}
}
13 changes: 9 additions & 4 deletions src/app/Providers/PublishServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,34 @@ private function assets()
__DIR__.'/../../resources/dist/mage.js' => public_path('vendor/mage/mage.js'),
__DIR__.'/../../resources/dist/mage.css' => public_path('vendor/mage/mage.css'),
__DIR__.'/../../resources/dist/mix-manifest.json' => public_path('vendor/mage/mix-manifest.json'),
], 'mage-scripts');
__DIR__.'/../../resources/img/' => public_path('vendor/mage/img/'),
], 'mage-publish');

$this->publishes([
__DIR__.'/../../resources/dist/mage.js' => public_path('vendor/mage/mage.js'),
__DIR__.'/../../resources/dist/mage.css' => public_path('vendor/mage/mage.css'),
__DIR__.'/../../resources/dist/mix-manifest.json' => public_path('vendor/mage/mix-manifest.json'),
__DIR__.'/../../resources/img/' => public_path('vendor/mage/img/'),
__DIR__.'/../../resources/favicon/' => public_path('vendor/mage/favicon/'),
], 'mage-publish');
], 'mage-assets');
}

private function fonts()
{
$this->publishes([
__DIR__.'/../../resources/dist/fonts' => public_path('fonts'),
], 'mage-publish');

$this->publishes([
__DIR__.'/../../resources/dist/fonts' => public_path('fonts'),
], 'mage-assets');
}

private function views()
{
$this->publishes([
__DIR__.'/../../resources/views/components/sidebar/sections/extends' => resource_path('views/vendor/mage/components/sidebar/sections/extends'),
__DIR__.'/../../resources/views/components/sidebar/logo.blade.php' => resource_path('views/vendor/mage/components/sidebar/logo.blade.php'),
__DIR__.'/../../resources/views/components/favicon.blade.php' => resource_path('views/vendor/mage/components/favicon.blade.php'),
__DIR__.'/../../resources/views/pages/auth' => resource_path('views/vendor/mage/pages/auth'),
], 'mage-publish');
}
}
Binary file not shown.
Loading

0 comments on commit 7b0e25f

Please sign in to comment.