Homepage blokken

:information_source: Summary Build a custom homepage with configurable block components
:hammer_and_wrench: Repository Manuel Kostka / Discourse / Blocks / Homepage Blocks · GitLab
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This component combines features from Right Sidebar Blocks and the custom homepage route. It initializes the route and allows you to organize content blocks on the homepage, offering flexibility in layout and content presentation.

Below are two example views: the first shows a homepage with basic blocks stacked on top of each other, while the second demonstrates the same layout with custom styles applied:

Editing blocks

You can customize blocks through the component settings. Each block is added by specifying its Ember component name:

After adding a block, you can adjust its properties using available parameters:

Available blocks

You can add any Ember component using its component name. Additionally, I have a collection of blocks available at Blocks · GitLab. These are primarily variations from Right Sidebar Blocks.

For detailed information on each block, like the component name, available parameters and template layout, refer to their README file.

23 likes

This is really cool, Manuel, good job! :+1:

4 likes

@nolo kan dit ook gebruikt worden om aangepaste pagina’s te maken en ze toe te voegen aan de zijbalknavigatie?

Dit is een layout-oplossing voor de aangepaste homepage-route. Natuurlijk kun je iets soortgelijks gebruiken op andere nieuwe routes. Maar het creëren van deze routes en het integreren ervan in je app is een andere taak.

1 like

Fout: Poging om een dynamisch component op te lossen met een stringdefinitie, block-banner in een strict mode template. In strict mode is het gebruik van strings om componentdefinities op te lossen verboden. Je kunt de componentdefinitie in plaats daarvan importeren en direct gebruiken.
Ik krijg deze foutmelding.

1 like

Thanks for reporting @xin_wei. Though I can’t reproduce, on Discourse version 3.6.0.beta1-dev and using my block component from Manuel Kostka / Discourse / Blocks / Banner · GitLab.