Tabbed content

This commit is contained in:
calcu1on 2025-01-29 20:29:41 -05:00
parent bdc3361ac5
commit ee2b1a8755
9 changed files with 269 additions and 6 deletions

View File

@ -34,6 +34,7 @@
"drupal/jsonapi_permission_access": "1.0.1",
"drupal/layout_builder_admin_theme": "^2.0",
"drupal/layout_builder_iframe_modal": "^1.3",
"drupal/layout_builder_restrictions": "^3.0",
"drupal/layout_builder_styles": "^2.0",
"drupal/mailsystem": "^4.5",
"drupal/migrate_plus": "^6.0",
@ -45,6 +46,7 @@
"drupal/upgrade_status": "^4.3",
"drupal/views_bulk_operations": "^4.2",
"drupal/views_json_source": "^2.0",
"drupal/webform": "^6.3@beta",
"drupal/workflow": "^1.8",
"drush/drush": "^13",
"mglaman/composer-drupal-lenient": "^1.0",

207
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7715ba9b44e29f0c86822734e3ebd944",
"content-hash": "a69ae602dcd0a11e9813dd2e7ec9caa8",
"packages": [
{
"name": "asm89/stack-cors",
@ -2937,6 +2937,101 @@
"issues": "https://www.drupal.org/project/issues/3169342?categories=All"
}
},
{
"name": "drupal/layout_builder_restrictions",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/layout_builder_restrictions.git",
"reference": "3.0.1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/layout_builder_restrictions-3.0.1.zip",
"reference": "3.0.1",
"shasum": "8c55b4d04b9852077eaf7a587f236a036d4fd28f"
},
"require": {
"drupal/core": "^10 || ^11"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.0.1",
"datestamp": "1733841259",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "The University of Texas at Austin",
"homepage": "https://www.drupal.org/university-of-texas-at-austin",
"role": "Maintainer"
},
{
"name": "Eirik Morland (eiriksm)",
"homepage": "https://www.drupal.org/u/eiriksm",
"role": "Maintainer"
},
{
"name": "eiriksm",
"homepage": "https://www.drupal.org/user/1014468"
},
{
"name": "gravelpot",
"homepage": "https://www.drupal.org/user/748208"
},
{
"name": "jeff cardwell",
"homepage": "https://www.drupal.org/user/2913129"
},
{
"name": "lreynaga",
"homepage": "https://www.drupal.org/user/3400232"
},
{
"name": "mark_fullmer",
"homepage": "https://www.drupal.org/user/2612816"
},
{
"name": "mmarler",
"homepage": "https://www.drupal.org/user/500192"
},
{
"name": "ricksta",
"homepage": "https://www.drupal.org/user/311042"
},
{
"name": "texas_tater",
"homepage": "https://www.drupal.org/user/753614"
},
{
"name": "twfahey",
"homepage": "https://www.drupal.org/user/3403722"
},
{
"name": "utexas",
"homepage": "https://www.drupal.org/user/3716409"
}
],
"description": "Manage which fields & layouts are available in Layout Builder",
"homepage": "https://www.drupal.org/project/layout_builder_restrictions",
"keywords": [
"Drupal",
"Layout Builder Restrictions"
],
"support": {
"source": "https://git.drupalcode.org/project/layout_builder_restrictions",
"issues": "https://www.drupal.org/project/issues/layout_builder_restrictions"
}
},
{
"name": "drupal/layout_builder_styles",
"version": "2.1.0",
@ -3776,6 +3871,113 @@
"issues": "https://www.drupal.org/project/issues/views_json_source"
}
},
{
"name": "drupal/webform",
"version": "6.3.0-beta1",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/webform.git",
"reference": "6.3.0-beta1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/webform-6.3.0-beta1.zip",
"reference": "6.3.0-beta1",
"shasum": "f712d463e883b678d7147b5c80bd8f9da72f13f8"
},
"require": {
"drupal/core": "^10.3 || ^11.0"
},
"require-dev": {
"drupal/address": "^2.0",
"drupal/captcha": "^2.0",
"drupal/chosen": "^4.0",
"drupal/clientside_validation": "^4.1",
"drupal/clientside_validation_jquery": "*",
"drupal/devel": "^5.3",
"drupal/entity": "^1.5",
"drupal/entity_print": "^2.15",
"drupal/hal": "^2.0",
"drupal/jquery_ui": "^1.7",
"drupal/jquery_ui_button": "^2.1",
"drupal/jquery_ui_checkboxradio": "^2.1",
"drupal/jquery_ui_datepicker": "^2.1",
"drupal/mailsystem": "^4.5",
"drupal/metatag": "^2.0",
"drupal/paragraphs": "^1.18",
"drupal/select2": "1.x-dev",
"drupal/smtp": "^1.4",
"drupal/styleguide": "^2.1",
"drupal/telephone_validation": "2.x-dev",
"drupal/token": "^1.15",
"drupal/webform_access": "*",
"drupal/webform_attachment": "*",
"drupal/webform_clientside_validation": "*",
"drupal/webform_devel": "*",
"drupal/webform_entity_print": "*",
"drupal/webform_node": "*",
"drupal/webform_options_limit": "*",
"drupal/webform_scheduled_email": "*",
"drupal/webform_share": "*",
"drupal/webform_ui": "*"
},
"suggest": {
"drupal/jquery_ui_buttons": "Provides jQuery UI Checkboxradio library. Required by the Webform jQueryUI Buttons module. The Webform jQueryUI Buttons module is deprecated because jQueryUI is no longer maintained.",
"drupal/jquery_ui_datepicker": "Provides jQuery UI Datepicker library. Required to support datepickers. The Webform jQueryUI Datepicker module is deprecated because jQueryUI is no longer maintained."
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "6.3.0-beta1",
"datestamp": "1736275819",
"security-coverage": {
"status": "not-covered",
"message": "Beta releases are not covered by Drupal security advisories."
}
},
"drush": {
"services": {
"drush.services.yml": ">=11"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Jacob Rockowitz (jrockowitz)",
"homepage": "https://www.drupal.org/u/jrockowitz",
"role": "Maintainer"
},
{
"name": "Contributors",
"homepage": "https://www.drupal.org/node/7404/committers",
"role": "Contributor"
},
{
"name": "liam morland",
"homepage": "https://www.drupal.org/user/493050"
},
{
"name": "quicksketch",
"homepage": "https://www.drupal.org/user/35821"
},
{
"name": "torotil",
"homepage": "https://www.drupal.org/user/865256"
}
],
"description": "Enables the creation of webforms and questionnaires.",
"homepage": "https://drupal.org/project/webform",
"support": {
"source": "https://git.drupalcode.org/project/webform",
"issues": "https://www.drupal.org/project/issues/webform?version=8.x",
"docs": "https://www.drupal.org/docs/8/modules/webform",
"forum": "https://drupal.stackexchange.com/questions/tagged/webform"
}
},
{
"name": "drupal/workflow",
"version": "1.8.0",
@ -15592,7 +15794,8 @@
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"drupal/entity_clone": 10
"drupal/entity_clone": 10,
"drupal/webform": 10
},
"prefer-stable": true,
"prefer-lowest": false,

View File

@ -38,10 +38,11 @@ h4 {
}
#block-dchadwick-primary-local-tasks {
width: 100%;
width: auto;
position: fixed;
bottom: 0;
left: 0;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
}
#block-dchadwick-primary-local-tasks > ul {

View File

@ -0,0 +1,12 @@
.tabbed-content {
display: flex;
}
.tabbed-content .tab-labels {
flex: 0 1 25%;
}
.tabbed-content .tab-content {
flex: 0 1 75%;
}

View File

@ -11,3 +11,16 @@ two_row:
icon_map:
- [top]
- [bottom]
tabbed_content:
label: 'Tabbed Content'
category: 'DC Layouts'
template: templates/layouts/tabbed-content
library: dchadwick/tabbed-content
regions:
label_side:
label: Label Side
content_side:
label: Content Side
icon_map:
- [first, second]

View File

@ -34,3 +34,12 @@ articles:
- core/drupal
- core/once
tabbed-content:
css:
theme:
css/tabbed-content.css: {}
js:
js/tabbedContent.js: { }
dependencies:
- core/drupal
- core/once

View File

@ -0,0 +1,7 @@
((Drupal, once) => {
Drupal.behaviors.tabbedContent = {
attach(context) {
// console.log("hello");
},
};
})(Drupal, once);

View File

@ -1,8 +1,9 @@
#block-dchadwick-primary-local-tasks {
width: 100%;
width: auto;
position: fixed;
bottom: 0;
left: 0;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
> ul {

View File

@ -0,0 +1,15 @@
{{ attach_library('dchadwick/tabbed-content') }}
{% if content %}
<div {{ attributes.addClass('tabbed-content') }}>
{% if content.label_side %}
<div {{ region_attributes.label_side.addClass('tab-labels') }}>
{{ content.label_side }}
</div>
{% endif %}
{% if content.content_side %}
<div {{ region_attributes.content_side.addClass('tab-content') }}>
{{ content.content_side }}
</div>
{% endif %}
</div>
{% endif %}