PHP code example of diesdasdigital / kirby-3-teein
1. Go to this page and download the library: Download diesdasdigital/kirby-3-teein library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
diesdasdigital / kirby-3-teein example snippets
use function Teein\Html\Elements\div;
use function Teein\Html\Text\text;
return div()(
text('Hello, World!')
);
namespace Test\Components;
namespace Test\Components;
use function Teein\Html\Text\text;
use function Teein\Html\Elements\div;
use function Teein\Html\Attributes\class_;
function grid(array $children)
{
return div(class_("grid"))(
div(class_("grid__column"))(
...array_map(function ($child) {
return $child;
}, $children)
));
}
use function Test\Components\grid;
use function Teein\Html\Elements\div;
use function Teein\Html\Text\text;
return div()(
grid([
div()(text('Column')),
div()(text('Column')),
div()(text('Column'))
])
);