npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@magnolia/grid-light-module

v1.1.4

Published

Light module for managing viewports configuration and integrating a Grid JS field

Downloads

130

Readme

GRID Light Module for Magnolia CMS

The GRID Light Module for Magnolia CMS provides a way to manage viewports configuration and integrate a Grid JavaScript field.

Requirements

Ensure the following modules are installed in your Magnolia CMS bundle:

  • Pages Viewports Extension
  • JavaScript UI module

Features

  • Viewports Configuration - decoration of the pages-viewports-extension, allows for setting the custom viewports in a page template.
  • Grid JS Field Include - JS field that can be used in the dialog definition.
  • Grid JS Field Webresources - contains resources for Grid settings based on the custom viewports.
  • Config for actions in dialog

Usage

Installation

  • Download the grid-light-module package.
  • Place it into your light modules directory.

Viewports Configuration

  • Define the custom viewports in the page template definition:
$type: viewportsExtensionSiteSpa
templateViewportList:
  - id: desktop
    displayName: Desktop
    defaultViewport: true
  - id: tablet
    displayName: tablet
    width: 768
    height: 667
  • Or define the custom viewports in the pages-viewports-extension decoration:
templateViewportsConfigurationImpl:
  class: info.magnolia.pages.viewports.config.DefaultTemplateViewportsConfiguration
  templateViewportList:
      id: desktop
      displayName: Desktop
      defaultViewport: true
    - id: tablet
      displayName: tablet
      width: 768
      height: 667

Settings of the default viewport will be applied for viewports using Automatic Settings.

Add default values for the components

  • Update the page template definition to add default values for specific viewports:
areas:
  main:
    title: Main Area
    availableComponents:
      Headline:
        id: spa-lm:components/headline
      Text:
        id: spa-lm:components/text
    defaultValues:
      Headline:
        templateId: spa-lm:components/headline
        viewportDefaultValues:
          - id: desktop
            columns: 8
          - id: tablet
            columns: 12
      Text:
        templateId: spa-lm:components/text
        viewportDefaultValues:
          - id: desktop
            offset: 1
            newLine: true
            hide: true

Use Grid JS field include

Example component's dialog definition:

form:
  $type: tabbedForm
  implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
  tabs:
    layout: !include:/grid/includes/grid.yaml

actions: !include:/grid/includes/dialogActions.yaml