diff --git a/public_html/pages/component.php b/public_html/pages/component.php new file mode 100644 index 0000000000000000000000000000000000000000..b41af1ba624fce03b74ea3e8e48db44ed85b8092 --- /dev/null +++ b/public_html/pages/component.php @@ -0,0 +1,59 @@ +<?php + +$sComponent=(isset($_GET['id']) ? preg_replace('/[^a-z]/', '', $_GET['id']) : ''); +echo "DEBUG: sComponent = $sComponent<br>"; + + +$aComponents=[ + 'infobox'=>[ + 'label'=>'Infobox', + 'description'=>'', + 'method'=>'getInfobox', + 'examples'=>[ + [ + 'description'=>'Success infobox with progress', + 'params'=>[ + 'type'=>'success', + 'bgcolor'=>'', + 'icon'=>'far fa-thumbs-up', + 'text'=>'Likes', + 'number'=>"41,410", + 'progressvalue'=>70, + 'progresstext'=>'70% Increase in 30 Days' + ] + ], + ] + ], +]; + +if(!isset($aComponents[$sComponent])){ + echo ' + <h2>Ooops</h2> + <p>Maybe there is a typo ... the component <strong>"'.$sComponent.'"</strong> was not found.</p> + '; +} else { + + + $aComp=$aComponents[$sComponent]; + echo $renderAdminLTE->addRow( + '<h2>'.$aComp['label'].'</h2>' + ) + .$renderAdminLTE->addRow( + '<h3>Syntax</h3> + <pre>echo $renderAdminLTE-><strong>'.$aComp['method'].'</strong>($aOptions)</pre> + ' + ); + + foreach($aComp['examples'] as $aExample){ + echo $renderAdminLTE->addRow( + '<h4>'.$aExample['description'].'</h4>' + ) + .$renderAdminLTE->addRow( + showExample('$renderAdminLTE->'.$aComp['method'].'('.var_export($aExample['params'], 1).')') + ); + } + +; +} + +; \ No newline at end of file