Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This project dynamically generates layout regions using CSS Grid, allowing for flexible and unique page structures. It provides a user-friendly interface to configure grid settings and generate CSS on the fly.

This layout forwards grid CSS features to the settings form in an assisted, user-friendly way (WIP). The actual CSS and the regions are created dynamically. Infinite variations are possible!

Regular Layout plugins provide a predefined set of regions, whereas in generic_layout, regions are defined and varied per layout instance using the CSS Grid API. In my opinion CSS Grid is simple enough to be used by 'WYSIWYG designers' but gives max source of truth and control for a the price of learning some CSS. A supportive, intuitive UI is key to success.

The best demo for now is my website https://rollgut.com?debug=true. By appending `?debug=true` every GenericLayout is outlined blue and css from ui_styles is also uncovered. You can use your browser's development tools (1st image attachment) or Visual CSS Editor to visualise the grid, that comes from GenericLayout (as seen in the screenshot).

The CSS modifiers controlling margin, padding and even gap are not part of GenericLayout. They come from implementing drupal/ui_styles of UI Suite. GenericLayout really just concentrates on CSS Grid, it's modulation accross Breakpoints and a proper interface to Drupals API and backend.

Patch Callers of LayoutEntityHelperTrait::getEntitySections() do not account for the view mode is required.

Implementation Details

Due to the infinite variations possible with this layout, a sophisticated CSS solution was required:

This layout differs from the traditional design of providing a static "CSS utility" file and varying the CSS classes per configuration. Instead, a CSS file is generated for every layout and attached as a library to allow caching.

Dynamic Libraries feature

By the time of coding this, i found no Drupal API or module providing "dynamic libraries,", so I've cooked a solution on my own. What sucks here is the GenericLayout instance detection algorithm. You must Save a new entity one time to make its Layouts discoverable.. If someone knows a better API-use / architecture -> please share!

Roadmap

  • Intuitive UI: Create smart (ai driven!?) autocompletions for every textfield
  • Support json import/export. Thats fundamental to integrate Ai Agents but could potentially also serve an extension like Visual CSS Editor (2nd image attachment)

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.0-rc5 Pre-release 10–11 Feb 6, 2025
1.0.0-rc4 Pre-release 10–11 Oct 11, 2024
1.0.0-rc3 Pre-release 10–11 Oct 11, 2024