siemendev / forskel-demo
tbd
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Type:symfony-bundle
Requires
- php: ^7.1.3
- siemendev/forskel: *
- symfony/asset: ^4.2
This package is auto-updated.
Last update: 2025-06-16 09:42:57 UTC
README
This repository is a demo for Forskel. The following steps help you to get into Forskel.
I just want to see it working, no long configuration!
(tbd)
- Open up a symfony project (or create a new one)
- Install the Forskel demo:
$ composer require siemendev/forskel-demo
- Try out generating the demo project in a controller like this:
<?php # /Controller/IndexController.php namespace App\Controller; use siemendev\ForskelBundle\Renderer\TwigRenderer; use siemendev\MyFrontendBundle\Models\components\TeaserComponent; use siemendev\MyFrontendBundle\Models\pages\ContentPage; use siemendev\MyFrontendBundle\Models\sections\HerospaceSection; use siemendev\MyFrontendBundle\Models\sections\TeaserListSection; use siemendev\MyFrontendBundle\Models\components\ImageComponent; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; class IndexController extends AbstractController { /** * @Route("/", name="index") */ public function index(TwigRenderer $forskel) { $image = new ImageComponent(); $image->source = 'https://www.visitdenmark.com/sites/default/files/VDK_Website_images/Tourist_content/Beaches_coast/lokken_beach_denmark.jpg'; $image->alt = 'A nice danish beach.'; $hero = new HerospaceSection(); $hero->headline = 'My herospace'; $hero->text = '<p>This is a herospace. Big shops use them to tease new products or upcoming sales.</p>'; $hero->image = $image; $teaser = new TeaserComponent(); $teaser->headline = 'My teaser'; $teaser->text = '<p>Some informational text about something you would click on.</p>'; $teaser->link = 'https://google.com'; $teaserList = new TeaserListSection(); $teaserList->columns = 3; $teaserList->teasers = [$teaser, $teaser, $teaser]; $page = new ContentPage(); $page->headline = 'My fancy web page'; $page->contents = [$hero, $teaserList]; return $forskel->render($page); } }
I want the deep-dive, tell me how to install the demo completely!
(tbd)