Commit b759a483 authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - added loremipsum element

parent f2c94dda
<?php
/*
|------------------------------------------------------------------------------------------------
| Information
......@@ -21,8 +20,9 @@
| Dependencies
|------------------------------------------------------------------------------------------------
*/
use View;
use Ceetrox\Views\Limitless\Element\LoremIpsum\JoshtronicLoremIpsum;
use View;
/*
|------------------------------------------------------------------------------------------------
......@@ -39,6 +39,7 @@
public $methodAllocation = [
'Limitless::ElementCardStart' => 'cardStart',
'Limitless::ElementCardStop' => 'cardStop',
'Limitless::LoremIpsum' => 'loremIpsum',
'Limitless::Divider' => 'divider',
'Limitless::Example' => 'example',
];
......@@ -55,7 +56,6 @@
|--------------------------------------------------------------------------------------------
| Method "cardStart"
|--------------------------------------------------------------------------------------------
| Method "CardStart"
*/
public function cardStart($parameters)
{
......@@ -80,6 +80,20 @@
}
/*
|--------------------------------------------------------------------------------------------
| Method "loremIpsum"
|--------------------------------------------------------------------------------------------
*/
public function loremIpsum($parameters)
{
return View('Limitless::Element.LoremIpsum.LoremIpsum')
->withLength( isset($parameters['length'])
? (ctype_digit((string)$parameters['length']) ? $parameters['length'] : 0)
: 0 );
}
/*
|--------------------------------------------------------------------------------------------
| Method "divider"
......
This diff is collapsed.
{{-- Layout Reference --}}
@extends('Limitless::Help.Layout.Master')
@section('Limitless::Content')
{{-- Description --}}
@Limitless::ElementCardStart(['title' => "Lorem Ipsum", 'icon' => 'icon-bubble-lines3'])
<p>Generates Lorem ipsum based on passed parameter <i>length</i>.</p>
@Limitless::ElementCardStop
{{-- Elements --}}
@Limitless::ElementCardStart(['title' => "Fragments", 'icon' => 'icon-grid5'])
<div class="bg-dark rounded py-2 px-3 mb-3">
<h6 class="mb-0 font-weight-semibold">LoremIpsum</h6>
<p class="mb-3 text-muted">Generates Lorem ipsum based on passed parameter <i>length</i>.</p>
<p class="font-italic font-size-lg">Parameters</p>
<div class="row mt-2">
@Limitless::TableStart([ 'extra' => ['class' => 'table table-xs table-striped'] ])
@Limitless::TableAutofillHeader([
['name' => 'Key'],
['name' => 'Type'],
['name' => 'Description']
])
@Limitless::TableAutofillBody([
[
['value' => 'length'],
['value' => '<i>Integer|Numeric String</i> [Default = <code>0</code>]', 'secure' => false],
['value' => 'The length of random words to generate.']
]
])
@Limitless::TableStop
</div>
</div>
@Limitless::ElementCardStop
{{-- Sample Output --}}
@Limitless::ElementCardStart(['title' => "Sample Output", 'icon' => 'icon-display4' ] )
@Limitless::LoremIpsum(['length' => 10])
@Limitless::Divider
@Limitless::LoremIpsum(['length' => '20'])
@Limitless::ElementCardStop
@php
$example = base64_decode("QExpbWl0bGVzczo6TG9yZW1JcHN1bShbJ2xlbmd0aCcgPT4gMTBdKQpATGltaXRsZXNzOjpEaXZpZGVyCkBMaW1pdGxlc3M6OkxvcmVtSXBzdW0oWydsZW5ndGgnID0+ICcyMCddKQ==");
@endphp
{{-- Sample Code --}}
@Limitless::ElementCardStart(['title' => "Sample Code", 'icon' => 'icon-circle-code' ] )
@Limitless::Codemirror([ 'language' => 'javascript', 'theme' => 'zenburn', 'value' => $example ])
@Limitless::ElementCardStop
@stop
@php
$output = (new Ceetrox\Views\Limitless\Element\LoremIpsum\Attachments\Core())->words($length);
@endphp
{{ $output }}
\ No newline at end of file
......@@ -51,15 +51,18 @@
case "example":
$path = 'Limitless::Element.Example.Documentation.Index';
break;
case "divider":
$path = 'Limitless::Element.Divider.Documentation.Index';
break;
case "card":
$path = 'Limitless::Element.Card.Documentation.Index';
break;
case "codemirror":
$path = 'Limitless::Codemirror.Documentation.Index';
break;
case "divider":
$path = 'Limitless::Element.Divider.Documentation.Index';
break;
case "loremipsum":
$path = 'Limitless::Element.LoremIpsum.Documentation.Index';
break;
case "navigation":
$path = 'Limitless::Navigation.Documentation.Index';
break;
......
......@@ -28,9 +28,10 @@
@Limitless::NavigationMenuSectionTitle(['title' => 'Elements'])
@Limitless::NavigationMenuItem(['url' => '?page=example', 'target' => '_self', 'icon' => 'icon-exclamation', 'title' => 'Example'])
@Limitless::NavigationMenuItem(['url' => '?page=card', 'target' => '_self', 'icon' => 'icon-newspaper', 'title' => 'Card'])
@Limitless::NavigationMenuItem(['url' => '?page=table', 'target' => '_self', 'icon' => 'icon-table2', 'title' => 'Table'])
@Limitless::NavigationMenuItem(['url' => '?page=codemirror', 'target' => '_self', 'icon' => 'icon-circle-code', 'title' => 'Code Mirror'])
@Limitless::NavigationMenuItem(['url' => '?page=navigation', 'target' => '_self', 'icon' => 'icon-menu8', 'title' => 'Navigation'])
@Limitless::NavigationMenuItem(['url' => '?page=divider', 'target' => '_self', 'icon' => 'icon-minus2', 'title' => 'Divider'])
@Limitless::NavigationMenuItem(['url' => '?page=loremipsum', 'target' => '_self', 'icon' => 'icon-bubble-lines3', 'title' => 'Lorem Ipsum'])
@Limitless::NavigationMenuItem(['url' => '?page=navigation', 'target' => '_self', 'icon' => 'icon-menu8', 'title' => 'Navigation'])
@Limitless::NavigationMenuItem(['url' => '?page=table', 'target' => '_self', 'icon' => 'icon-table2', 'title' => 'Table'])
@Limitless::NavigationStop
@stop
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