Commit 2af84351 authored by Marco Schmiedel's avatar Marco Schmiedel

fix

parent 9bb85d7d
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2021-12-20 15:08:24
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Commands\BashColorDemoCommand;
......@@ -30,7 +30,7 @@
| Class "BashColorDemoCommand"
|------------------------------------------------------------------------------------------------
*/
class BashColorDemoCommand extends Command
class BashColorDemoCommand extends Command
{
/*
......@@ -54,7 +54,7 @@
*/
public function handle()
{
$this->info( TerminalManager::demo() );
$this->info( TerminalManager::showColorDemo() );
}
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-13 07:39:40
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Commands\CodebeautifierCommand;
......@@ -21,9 +21,9 @@
| Dependencies
|------------------------------------------------------------------------------------------------
*/
use Ceetrox\Managers\DirectoryManager\DirectoryManager;
use Ceetrox\Managers\TerminalManager\TerminalManager;
use Ceetrox\Managers\BeautifyManager\BeautifyManager;
use Ceetrox\Managers\DirectoryManager\DirectoryManager;
use Illuminate\Console\Command;
......@@ -32,7 +32,7 @@
| Class "CodebeautifierCommand"
|------------------------------------------------------------------------------------------------
*/
class CodebeautifierCommand extends Command
class CodebeautifierCommand extends Command
{
/*
......@@ -64,14 +64,19 @@
/*
|----------------------------------------------------------------------------------------
| Check if the given file exists.
| Check if the given path is a single file...
*/
if(file_exists($path) and !is_dir($path))
{
$this->singleCleaning($path);
$this->cleaning($path);
return;
}
/*
|----------------------------------------------------------------------------------------
| Abort if the given path is not a directory...
*/
elseif(!is_dir($path))
{
$this->error('Please enter a valid path!');
......@@ -81,47 +86,51 @@
/*
|----------------------------------------------------------------------------------------
| Drop info for a wrong file path.
| Ask if the command must clean the whole path...
*/
$this->error($path);
if ($this->confirm('This is not a valid php file. Do you want to clean the whole path?'))
{
dd( DirectoryManager::getFilesWithFiletypeForDirectory($path, 'php') );
$paths = DirectoryManager::getFilesWithFiletypeForDirectory($path, 'php');
foreach($paths as $path)
{
$this->cleaning($path);
}
}
}
/*
|--------------------------------------------------------------------------------------------
| Method "singleCleaning"
| Method "cleaning"
|--------------------------------------------------------------------------------------------
*/
private function singleCleaning($file)
private function cleaning($file)
{
/*
|----------------------------------------------------------------------------------------
| Copy a backup to the vendor folder.
| Copy a backup to the vendor folder...
*/
copy( $file, __DIR__.'/BACKUP_'.time().md5(microtime()) );
/*
|----------------------------------------------------------------------------------------
| Boot the Beautifier class.
| Boot the Beautifier class...
*/
$beauty = new BeautifyManager();
/*
|----------------------------------------------------------------------------------------
| Analyse the given file.
| Analyse the given file...
*/
$beauty -> analyseDocument($file);
/*
|----------------------------------------------------------------------------------------
| Render the given file.
| Render the given file...
*/
$beauty -> renderDocument($file);
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 07:37:59
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Managers\BeautifyManager;
......@@ -28,7 +28,7 @@
| Class "BeautifyManager"
|------------------------------------------------------------------------------------------------
*/
class BeautifyManager
class BeautifyManager
{
/*
|--------------------------------------------------------------------------------------------
......@@ -354,7 +354,10 @@
*/
$classes = $this->matchBetweenTwoPatterns($this->content, $openPattern, $closePattern);
// Exit when now class was found
/*
|----------------------------------------------------------------------------------------
| Exit when now class was found
*/
if($classes == false)
{
exit();
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: %author%
| Date: %timestasmp%
| Update: %timestasmp%
|
*/
%namespace%
......
<?php
/*
|------------------------------------------------------------------------------------------------
| Information
|------------------------------------------------------------------------------------------------
|
| This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Managers\DirectoryManager;
/*
|------------------------------------------------------------------------------------------------
| Dependencies
|------------------------------------------------------------------------------------------------
*/
/*
|------------------------------------------------------------------------------------------------
| Class "DirectoryManager"
|------------------------------------------------------------------------------------------------
*/
class DirectoryManager
{
/*
|--------------------------------------------------------------------------------------------
| Method "getFilesWithFiletypeForDirectory"
|--------------------------------------------------------------------------------------------
*/
static function getFilesWithFiletypeForDirectory($directory, $type)
{
$files = glob($directory . '/*');
$data = array();
foreach ($files as $file)
{
if (is_dir($file))
{
$data = array_merge($data, self::getFilesWithFiletypeForDirectory($file, $type));
}
elseif (substr($file, ( strlen($type) +1 ) * -1 ) == '.'.$type)
{
$data[] = $file;
}
}
return $data;
$files = glob($directory . '/*');
$data = array();
foreach ($files as $file) {
if (is_dir($file)) {
$data = array_merge($data, self::getFilesWithFiletypeForDirectory($file, $type));
} elseif (substr($file,-4) == '.'.$type) {
$data[] = $file;
}
}
return $data;
}
}
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 13:45:45
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Sidekick\Managers\PicassoManager;
......@@ -30,7 +30,7 @@
| Class "AssetHelper"
|------------------------------------------------------------------------------------------------
*/
class AssetHelper
class AssetHelper
{
/*
......@@ -43,6 +43,7 @@
*/
static function generateAssetTag($configCls, $currentNamespace, $currentFolder, $currentKey)
{
/*
|----------------------------------------------------------------------------------------
| Define a defaultempty return value.
......@@ -61,6 +62,7 @@
*/
foreach ($configCls->assetAllocation[$currentKey] as $asset)
{
/*
|--------------------------------------------------------------------------------
| Check if the asset is a external url or a private hostet path.
......@@ -71,11 +73,13 @@
|----------------------------------------------------------------------------
| Build array for the secure publisher in case of a private path.
*/
$path = __DIR__ . '/../Views/' . $currentNamespace . '/' . $currentFolder . '/' . $asset;
$path = __DIR__ . '/../../Views/' . $currentNamespace . '/' . $currentFolder . '/' . $asset;
$array = [
'path' => $path,
'code' => md5(env('APP_KEY') . $path)
];
}
else
{
......@@ -93,7 +97,7 @@
|--------------------------------------------------------------------------------
| Get the correct mimetype of the source.
*/
$RP = new ResourcePublisher();
$RP = new ResourcePublisherManager();
$mime = $RP->getMime($path);
/*
......@@ -130,6 +134,8 @@
*/
static function resolveAssetTagCategory($__env, $type)
{
/*
|----------------------------------------------------------------------------------------
| First define a virtual storage for all elements that should be send to the master
......@@ -149,6 +155,7 @@
*/
foreach ($__env->getSections() as $section)
{
/*
|------------------------------------------------------------------------------------
| Filter the picasso tags with preg_match_all.
......@@ -161,6 +168,8 @@
*/
if ($picassoTag[0])
{
/*
|--------------------------------------------------------------------------------
| Loop all found picasso tags.
......@@ -218,6 +227,7 @@
*/
if ($type == 'javascript')
{
$storage .= '<script src="' . $url . '"></script>';
}
}
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 13:40:18
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Sidekick\Managers\PicassoManager;
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 08:54:32
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Sidekick\Managers\ResourcePublisherManager;
......@@ -29,7 +29,7 @@
| Class "ResourcePublisherManager"
|------------------------------------------------------------------------------------------------
*/
class ResourcePublisherManager
class ResourcePublisherManager
{
/*
......@@ -167,7 +167,6 @@
{
dd('PATH NOT FOUND');
}
}
}
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2021-12-23 19:51:17
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Managers\TerminalManager;
......@@ -28,7 +28,7 @@
| Class "TerminalManager"
|------------------------------------------------------------------------------------------------
*/
class TerminalManager
class TerminalManager
{
/*
......@@ -95,11 +95,11 @@
/*
|--------------------------------------------------------------------------------------------
| Method "demo"
| Method "showColorDemo"
|--------------------------------------------------------------------------------------------
| This method generates all available terminal colors for a demo output.
| Method "demo" This method generates all available terminal colors for a demo output.
*/
static function demo()
static function showColorDemo()
{
/*
|----------------------------------------------------------------------------------------
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 13:15:28
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Providers\CommandServiceProvider;
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 13:14:23
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Providers;
......@@ -31,7 +31,7 @@
| Class "CoreServiceProvider"
|------------------------------------------------------------------------------------------------
*/
class CoreServiceProvider extends ServiceProvider
class CoreServiceProvider extends ServiceProvider
{
/*
......
......@@ -10,7 +10,7 @@
| sidekick package.
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2022-04-12 13:16:30
| Update: 2022-04-13 08:07:22
|
*/
namespace Ceetrox\Providers\PicassoServiceProvider;
......@@ -31,7 +31,7 @@
| Class "PicassoServiceProvider"
|------------------------------------------------------------------------------------------------
*/
class PicassoServiceProvider extends ServiceProvider
class PicassoServiceProvider extends ServiceProvider
{
/*
......@@ -80,7 +80,7 @@
| This route can load non public files when you follow their implemented security
| pattern.
*/
Route::get('ceetrox/sidekick/resource/private/{var}', 'Ceetrox\Sidekick\Managers\ResourcePublisherManager@stageSecure');
Route::get('ceetrox/sidekick/resource/private/{var}', 'Ceetrox\Sidekick\Managers\ResourcePublisherManager\ResourcePublisherManager@stageSecure');
}
......
......@@ -39,9 +39,17 @@
public $methodAllocation = [
'Limitless::ElementCardStart' => 'cardStart',
'Limitless::ElementCardStop' => 'cardStop',
'Limitless::Example' => 'example',
];
public $assetAllocation = [
'Limitless::Example' => [
'Example/example.js',
'Example/example.css'
]
];
/*
|--------------------------------------------------------------------------------------------
| Method "CardStart"
......@@ -62,6 +70,11 @@
return View('Limitless::Element.Card.Stop');
}
public function example()
{
return View('Limitless::Element.Example.Div');
}
}
......
<div id="limitlessElementExampleDiv"></div>
#limitlessElementExampleDiv{
border:1px solid white;
padding:10px;
}
$(document).ready(function(){
$('#limitlessElementExampleDiv').html("This div was created by custom javascript and stylesheet files ...");
});
......@@ -37,16 +37,12 @@
|--------------------------------------------------------------------------------------------
*/
public $methodAllocation = [
'Limitless::Help' => 'exampleManagement',
'Limitless::Help' => 'internalNavigation',
];
/*
|--------------------------------------------------------------------------------------------
| Method "exampleManagement"
|--------------------------------------------------------------------------------------------
*/
public function exampleManagement($parameters)
public function internalNavigation($parameters)
{
return View('Limitless::Help.Pages.Home');
......
......@@ -13,6 +13,7 @@
The raw design is available via the emulated <a target="_blank" href="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/layout_1/LTR/dark/full/index.html')}}"> <u>CDN</u> </a> of the <i>ceetrox/sidekick</i> package.
@Limitless::ElementCardStop
@Limitless::Example
@stop
......
......@@ -15,7 +15,7 @@
<link rel="shortcut icon" type="image/x-icon" href="@yield('Limitless::GlobalFavicon')">
@endif
<!-- Global stylesheets -->
{{-- Global stylesheets --}}
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/css/icons/icomoon/styles.min.css')}}" rel="stylesheet" type="text/css">
<link href="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/layout_1/LTR/dark/full/assets/css/bootstrap.min.css')}}" rel="stylesheet" type="text/css">
......@@ -25,18 +25,21 @@
<link href="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/layout_1/LTR/dark/full/assets/css/colors.min.css')}}" rel="stylesheet" type="text/css">
<link href="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/fontawesome/css/allmin.css')}}" rel="stylesheet" type="text/css">
@php
echo Polaris\Picasso\Generators\AssetHelperGenerator::resolveAssetTagCategory($__env,'stylesheet');
@endphp
@php
echo Ceetrox\Sidekick\Managers\PicassoManager\AssetHelper::resolveAssetTagCategory($__env,'stylesheet');
@endphp
{{-- Hide picasso / enable for debug --}}
<style>picasso{display:none;}</style>
<!-- Global javascripts -->
{{-- Global javascripts --}}
<script src="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/main/jquery.min.js')}}"></script>
<script src="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/main/bootstrap.bundle.min.js')}}"></script>
<script src="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/loaders/blockui.min.js')}}"></script>
<script src="{{secure_url('/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/layout_1/LTR/dark/full/assets/js/app.js')}}"></script>
@php
echo Polaris\Picasso\Generators\AssetHelperGenerator::resolveAssetTagCategory($__env,'javascript');
echo Ceetrox\Sidekick\Managers\PicassoManager\AssetHelper::resolveAssetTagCategory($__env,'javascript');
@endphp
@yield('Limitless::Stylesheet')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment