Skip to content

Commit

Permalink
Merge pull request #24 from mjamilasfihani/development
Browse files Browse the repository at this point in the history
Minor update
  • Loading branch information
mjamilasfihani authored Jul 17, 2021
2 parents d796c86 + f57acf8 commit de7d0b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This library only need one file to be loaded.

Open `AssetsLoader.php` and you will see the prototype there (for pre-loader page, if you set to true the jQuery will be autoloaded).

Tips : Change your default route to `Landing.php` and it will display Coming Soon page. So you can more focus to finish your project :)
Tips : Change your default route to `Landing.php` and it will display Coming Soon page. So you can more focus to finish your project :)
8 changes: 3 additions & 5 deletions app/Controllers/Landing.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

class Landing extends BaseController
{

public function index()
{
return $this->__render('_landing_message', ['text' => 'Coming Soon']);
return self::render('_landing_message', ['text' => 'Coming Soon']);
}

//--------------------------------------------------------------------

protected function __render(string $name = '', array $data = [], array $options = [])
protected static function render(string $name = '', array $data = [], array $options = [])
{
// Load the html helper
helper('html');
Expand All @@ -28,5 +27,4 @@ protected function __render(string $name = '', array $data = [], array $options
// Render it
return $template->render(view($name, $data, $options));
}

}
}
14 changes: 7 additions & 7 deletions app/Libraries/AssetsLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,16 @@
* return $template->render(view('welcome_message'));
*/

use App\Config\App;

class AssetsLoader
{

/**
* Assets Loader Version
*
* @var const VERSION
*/
const VERSION = '1.3.0';
const VERSION = '1.3.1';

/**
* Default CSS
Expand Down Expand Up @@ -262,18 +263,18 @@ class AssetsLoader
public function __construct(array $css = [], array $js = [], string $jquery = null)
{
// Load the config from app/Config/App.php
$app = config('App');
$config = new App();

// Set the config of charset
if ($this->charset == null)
{
$this->charset = $app->charset;
$this->charset = $config->charset;
}

// Set the config of language
if ($this->language == null)
{
$this->language = $app->defaultLocale;
$this->language = $config->defaultLocale;
}

// Set the config of favicon
Expand Down Expand Up @@ -490,5 +491,4 @@ public function render($view)
{
return $this->__header() . $view . $this->__footer();
}

}
}

0 comments on commit de7d0b5

Please sign in to comment.