WIP: Enabled metronic frontend

This commit is contained in:
Deon George
2017-12-04 23:37:14 +11:00
parent 02087feef2
commit 78788468f5
130 changed files with 26168 additions and 11 deletions

View File

@@ -36,4 +36,11 @@ class LoginController extends Controller
{
$this->middleware('guest')->except('logout');
}
public function showLoginForm()
{
return view('auth.login',[
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
]);
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use Image;
class MediaController extends Controller
{
/**
* Create a generic image
*
* @param $width
* @param $height
* @return mixed
*/
public function image($width,$height,$color='#ccc') {
$io = Image::canvas($width,$height,$color);
$io->text(sprintf('IMAGE-%sx%s',$width,$height),$width/2,$height/2,function($font) {
$font->file(5);
$font->align('center');
$font->valign('middle');
});
return $io->response();
}
}

View File

@@ -2,10 +2,131 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Lipsum;
class WelcomeController extends Controller
{
private $cachetime = 86400;
private function _sample_data() {
return [
'site_aboutus'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
'site_address'=>'1 Road Street,<br>Town or City, State, Postcode<br>Country',
'site_description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
'site_email'=>'sales@example.com',
'site_fax'=>'+1 234 567 8910',
'site_logo'=>'/image/generic/150/20/fff',
'site_phone'=>'+1 234 567 8910',
'site_slider'=>TRUE,
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
'site_topmenu'=>['Option1'=>['url'=>'#','name'=>'a'],'Option 2'=>['url'=>'#','name'=>'List','children'=>[['url'=>'#','name'=>'A'],['url'=>'#','name'=>'B']]]],
'page_activity'=>[
[
'image_small'=>'/image/generic/150/100/fff',
'image_large'=>'/image/generic/450/200/aaa',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/eee',
'image_large'=>'/image/generic/650/200/999',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/ddd',
'image_large'=>'/image/generic/850/300/888',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/ccc',
'image_large'=>'/image/generic/450/200/777',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
],
'page_activityintro'=>'Here are some of the the things we\'ve been doing',
'page_blockquote'=>[
[
'title'=>'Block Quote',
'icon'=>'fa fa-rocket',
'image'=>'/image/generic/150/75/ddd',
],
],
'page_servicebox'=>[
[
'title'=>'Box 1',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
[
'title'=>'Box 2',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
[
'title'=>'Box 3',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
],
'page_steps'=>[
[
'title'=>'Step 1',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Step 2',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Step 3',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_tabs'=>[
[
'title'=>'Title #1',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Title #2',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Title #3',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_testimonials'=>[
[
'name'=>'First Last #1',
'title'=>'Title',
'photo'=>'/image/generic/200/100/999',
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'name'=>'First Last #2',
'title'=>'Title',
'photo'=>'/image/generic/200/100/333',
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_title'=>'Welcome',
];
}
/**
* Show the application splash screen.
*
@@ -13,6 +134,6 @@ class WelcomeController extends Controller
*/
public function show()
{
return view('welcome');
return view('welcome',$this->_sample_data());
}
}