Loading modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.json +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,14 @@ "wysiwyg": true } }, "image_url": { "title": "Image URL", "type": "string", "format": "image", "options": { "grid_columns": 6 } }, "hidden": { "title": "hidden", "type": "string" Loading modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.twig +7 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,10 @@ Sample twig template. <div>{{- text|striptags('') -}}</div> <div>{{ formatted_text|raw }}</div> {% if image_url %} <figure> <img src="{{ image_url }}" /> <figcaption>This is the image for URL <em>{{ image_url }}</em>.</figcaption> </figure> {% endif %} modules/patternkit_media_library/README.md 0 → 100644 +31 −0 Original line number Diff line number Diff line ## Introduction The Patternkit Media Library Support module allows you to use Drupal's media library browser to select images for patterns. This module will add a button to image fields. You can click this button to open the media library browser in a modal window. ## Installation Enable this module (e.g., `drush en patternkit_media_library`). ## Configuration You can configure this module at path `/admin/config/user-interface/patternkit/media-library`. ### Bundled styles You can choose whether to load supplemental styles for the media library browser. This feature relies on templates from [Media Library Theme Reset](https://www.drupal.org/project/media_library_theme_reset). ## Example This module adds the media library browser button to patterns where both: * `type` = `string` * `format` = `image` See [example.json](modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.json). modules/patternkit_media_library/config/install/patternkit_media_library.settings.yml 0 → 100644 +1 −0 Original line number Diff line number Diff line use_styles: false modules/patternkit_media_library/config/schema/patternkit_media_library.schema.yml 0 → 100644 +7 −0 Original line number Diff line number Diff line patternkit_media_library.settings: type: config_object label: 'Patternkit Media Library Module Settings' mapping: use_styles: type: boolean label: 'Boolean that sets whether to load bundled styles for the media library browser.' Loading
modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.json +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,14 @@ "wysiwyg": true } }, "image_url": { "title": "Image URL", "type": "string", "format": "image", "options": { "grid_columns": 6 } }, "hidden": { "title": "hidden", "type": "string" Loading
modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.twig +7 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,10 @@ Sample twig template. <div>{{- text|striptags('') -}}</div> <div>{{ formatted_text|raw }}</div> {% if image_url %} <figure> <img src="{{ image_url }}" /> <figcaption>This is the image for URL <em>{{ image_url }}</em>.</figcaption> </figure> {% endif %}
modules/patternkit_media_library/README.md 0 → 100644 +31 −0 Original line number Diff line number Diff line ## Introduction The Patternkit Media Library Support module allows you to use Drupal's media library browser to select images for patterns. This module will add a button to image fields. You can click this button to open the media library browser in a modal window. ## Installation Enable this module (e.g., `drush en patternkit_media_library`). ## Configuration You can configure this module at path `/admin/config/user-interface/patternkit/media-library`. ### Bundled styles You can choose whether to load supplemental styles for the media library browser. This feature relies on templates from [Media Library Theme Reset](https://www.drupal.org/project/media_library_theme_reset). ## Example This module adds the media library browser button to patterns where both: * `type` = `string` * `format` = `image` See [example.json](modules/patternkit_example/lib/patternkit/src/atoms/example/src/example.json).
modules/patternkit_media_library/config/install/patternkit_media_library.settings.yml 0 → 100644 +1 −0 Original line number Diff line number Diff line use_styles: false
modules/patternkit_media_library/config/schema/patternkit_media_library.schema.yml 0 → 100644 +7 −0 Original line number Diff line number Diff line patternkit_media_library.settings: type: config_object label: 'Patternkit Media Library Module Settings' mapping: use_styles: type: boolean label: 'Boolean that sets whether to load bundled styles for the media library browser.'