Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added FAQ Accordion paragraph type
Browse files Browse the repository at this point in the history
pookmish committed Nov 1, 2024
1 parent ca9e29e commit f263c63
Showing 31 changed files with 9,893 additions and 6,940 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ deployment_identifier
bin/*
tmp
reports
.yarn/

# OS X
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
uuid: 4e43efbc-fa41-452d-9e8f-1033f949b6bc
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.stanford_faq.su_faq_description
- field.field.paragraph.stanford_faq.su_faq_headline
- field.field.paragraph.stanford_faq.su_faq_questions
- paragraphs.paragraphs_type.stanford_faq
module:
- paragraphs
- text
id: paragraph.stanford_faq.default
targetEntityType: paragraph
bundle: stanford_faq
mode: default
content:
status:
type: boolean_checkbox
weight: 3
region: content
settings:
display_label: true
third_party_settings: { }
su_faq_description:
type: text_textarea
weight: 1
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
su_faq_headline:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_faq_questions:
type: paragraphs
weight: 2
region: content
settings:
title: Questions/Answers
title_plural: Questions/Answers
edit_mode: closed
closed_mode: summary
autocollapse: all
closed_mode_threshold: 0
add_mode: dropdown
form_display_mode: default
default_paragraph_type: stanford_accordion
features:
add_above: '0'
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
hidden:
created: true
publish_on: true
unpublish_on: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
uuid: 2895bffa-14b5-41cd-bb3a-b0020fb04037
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.stanford_faq.su_faq_description
- field.field.paragraph.stanford_faq.su_faq_headline
- field.field.paragraph.stanford_faq.su_faq_questions
- paragraphs.paragraphs_type.stanford_faq
module:
- entity_reference_revisions
- stanford_fields
- text
id: paragraph.stanford_faq.default
targetEntityType: paragraph
bundle: stanford_faq
mode: default
content:
su_faq_description:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 1
region: content
su_faq_headline:
type: entity_title_heading
label: hidden
settings:
tag: h2
linked: false
third_party_settings: { }
weight: 0
region: content
su_faq_questions:
type: entity_reference_revisions_entity_view
label: hidden
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 2
region: content
hidden:
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_gallery: stanford_gallery
stanford_lists: stanford_lists
stanford_layout: stanford_layout
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 13
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 14
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: 8
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: 11
enabled: false
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_gallery: stanford_gallery
stanford_lists: stanford_lists
stanford_layout: stanford_layout
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 13
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 14
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: 8
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: 11
enabled: false
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_gallery: stanford_gallery
stanford_lists: stanford_lists
stanford_layout: stanford_layout
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 13
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 14
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: 9
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: 11
enabled: false
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_media_caption: stanford_media_caption
stanford_spacer: stanford_spacer
stanford_wysiwyg: stanford_wysiwyg
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 17
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 18
enabled: true
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_layout: stanford_layout
stanford_lists: stanford_lists
stanford_spacer: stanford_spacer
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: -20
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: -19
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: -21
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: -16
enabled: false
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_gallery: stanford_gallery
stanford_lists: stanford_lists
stanford_layout: stanford_layout
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 13
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 14
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: 9
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: 11
enabled: false
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies:
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_card
- paragraphs.paragraphs_type.stanford_entity
- paragraphs.paragraphs_type.stanford_faq
- paragraphs.paragraphs_type.stanford_gallery
- paragraphs.paragraphs_type.stanford_layout
- paragraphs.paragraphs_type.stanford_lists
@@ -39,6 +40,7 @@ settings:
stanford_media_caption: stanford_media_caption
stanford_spacer: stanford_spacer
stanford_wysiwyg: stanford_wysiwyg
stanford_faq: stanford_faq
negate: 0
target_bundles_drag_drop:
stanford_accordion:
@@ -53,6 +55,9 @@ settings:
stanford_entity:
weight: 16
enabled: true
stanford_faq:
weight: 28
enabled: true
stanford_gallery:
weight: 17
enabled: true
@@ -65,6 +70,9 @@ settings:
stanford_media_caption:
weight: 20
enabled: true
stanford_page_title_banner:
weight: 23
enabled: false
stanford_person_cta:
weight: 21
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: 9066b0ab-e64a-4a0d-8b2d-07de1fc155db
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_faq_description
- paragraphs.paragraphs_type.stanford_faq
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
stanford_limited_html: stanford_limited_html
stanford_html: '0'
stanford_minimal_html: '0'
plain_text: '0'
id: paragraph.stanford_faq.su_faq_description
field_name: su_faq_description
entity_type: paragraph
bundle: stanford_faq
label: Description
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
allowed_formats: { }
field_type: text_long
19 changes: 19 additions & 0 deletions config/sync/field.field.paragraph.stanford_faq.su_faq_headline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 95e6f345-83ba-4353-8416-b0420f9849b2
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_faq_headline
- paragraphs.paragraphs_type.stanford_faq
id: paragraph.stanford_faq.su_faq_headline
field_name: su_faq_headline
entity_type: paragraph
bundle: stanford_faq
label: Headline
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
uuid: 6e670c6e-2bda-4615-827b-9a2dd3c6c13e
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_faq_questions
- paragraphs.paragraphs_type.stanford_accordion
- paragraphs.paragraphs_type.stanford_faq
module:
- entity_reference_revisions
id: paragraph.stanford_faq.su_faq_questions
field_name: su_faq_questions
entity_type: paragraph
bundle: stanford_faq
label: Questions/Answers
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:paragraph'
handler_settings:
target_bundles:
stanford_accordion: stanford_accordion
negate: 0
target_bundles_drag_drop:
layout:
weight: 15
enabled: false
stanford_accordion:
weight: 16
enabled: true
stanford_banner:
weight: 17
enabled: false
stanford_card:
weight: 18
enabled: false
stanford_entity:
weight: 19
enabled: false
stanford_faq:
weight: 14
enabled: false
stanford_gallery:
weight: 20
enabled: false
stanford_lists:
weight: 21
enabled: false
stanford_media_caption:
weight: 22
enabled: false
stanford_person_cta:
weight: 23
enabled: false
stanford_schedule:
weight: 24
enabled: false
stanford_spacer:
weight: 25
enabled: false
stanford_wysiwyg:
weight: 26
enabled: false
field_type: entity_reference_revisions
19 changes: 19 additions & 0 deletions config/sync/field.storage.paragraph.su_faq_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 3a102ebf-4a06-478c-baf8-1f5a67d90651
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
id: paragraph.su_faq_description
field_name: su_faq_description
entity_type: paragraph
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
21 changes: 21 additions & 0 deletions config/sync/field.storage.paragraph.su_faq_headline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 29b540b5-e421-47f5-accb-77ab84b1d29d
langcode: en
status: true
dependencies:
module:
- paragraphs
id: paragraph.su_faq_headline
field_name: su_faq_headline
entity_type: paragraph
type: string
settings:
max_length: 255
case_sensitive: false
is_ascii: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
20 changes: 20 additions & 0 deletions config/sync/field.storage.paragraph.su_faq_questions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: e027a6cb-b9bd-4879-a36f-aa0f348aae7a
langcode: en
status: true
dependencies:
module:
- entity_reference_revisions
- paragraphs
id: paragraph.su_faq_questions
field_name: su_faq_questions
entity_type: paragraph
type: entity_reference_revisions
settings:
target_type: paragraph
module: entity_reference_revisions
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
17 changes: 17 additions & 0 deletions config/sync/paragraphs.paragraphs_type.stanford_faq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
uuid: e4bd68ae-4d0c-4ec1-adad-b1698357fb86
langcode: en
status: true
dependencies:
content:
- 'file:file:f217e716-8074-4122-bd5c-7b0f05aef5a9'
module:
- layout_paragraphs
id: stanford_faq
label: 'FAQ - Accordion List'
icon_uuid: f217e716-8074-4122-bd5c-7b0f05aef5a9
icon_default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAACj1JREFUeJzt3c+LHGUawPFvZmM2JK0xsAg5LBoPgkIcRbyJDsY1kWASSG4SQVwUc/PsJXgUb4mbHyL4D0hOinuIQQ/iwYuoRFnQePAQk6BIhGR0ZvbwBtJdb807neq3qt7p/n7gPfT01FPPdD3PVFd31VsgSZIkSZIkSZIkSZIkSZIkSZIkSZKm34YWY+8C/g38C/gnMGhxXZo9i8BF4BPgFPBVr9nchk3Af4AlYMXh6GAsE5pkM5nl3oNsAv4LLGSOK43jU2AvcD1XwL/lCnTTCeBw5pjSuO4D/gF82HMetR4mflt1ATgA3NljXppOW4HnCTVWfbs132NeqzpO3Bzbes1Is2AbcZO802tGq6gmeaDfdDRD9hP/cy7ONUaT9G2VujJgtPayHaTn/BRrpcXY0lpaqb+5HEGkaWWDSAk2i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vOvUWGU3St1XqyoDR2st2kO7s7poWrdSfs5pICTaIlGCDSAk2iJRgg0gJNoiUYINICTaIlGCDqIkNwIuESdoWMsV7iXAO1ZMZ4hWpeiavptfL3NrOfwG7J4z3xlC8P4EHG8Qovv6KT1DZvMvotr4K3N8wVvVEwxXgSIM4xddf8Qkqmz3E2/sb4M7bjPMQ8Hslzq/AjgY5FV9/xSeorI4Rb/OzjH9cu534Eokl4NmG+RRff8UnqKzmgA+It/uxMZbdSJi7oLrs6xPkU3z9FZ+gshsQptupbvtDayz3ds0y7zPZKerF19+kCR4CrtTEmdVxmXCDmNLtJN5u14CHV/n9I8R/6xdMPmXP1DeIzRGPXxq8jn1YIHw8O5z7j4QZRoY9Trjab/j3fqbZQXnV1DfI5ZoYsz4uNXgd+/Iacf7ngTtuPr+D0AzDz18nNE0OU98gBwn/MfsuylLGJcJ3BOtJ3S34jhPuDfN5zXMvZFz31DeI1r9NwGfEtfBlzc/eyrzu4uuv+ATViXuAn0jvHT8i/6yexddf8QmqM48Af1DfHN8Bd7ewzuLrr/gE1anDxDXxG/BAS+srvv6KT1Cde5Nb9bBEmHm9LcXXX/EJqnNzwFHCt+R7Wl5XK/XnzIqaFq3Un1cUSgk2iJRgg0gJNoiUYINICTaIlGCDSAk2iJRgg0gJORtksfJ4a8bYUsqg8vhGrsA5G+Ri5fHTGWNLKc9UHv/QSxZrOMnoyWIXCDd5l9q0Hfie+DLf4swDy8RNsp94FyhNakCYx6DaHMvArh7zSqq7aN/h6HKcIKPcp6RvBj4GnsocVxrHeeA5Cj1IhzDP0V7gNKGbpS6sEG6+k7U5oN2LmuaBVwifZu0kzI0k5XKD8GnVOeAM8HW/6UiSJEmSJEmSJEmSJEmSJEmSJEmSpPXr/4R8FWBDBalGAAAAAElFTkSuQmCC'
description: ''
behavior_plugins:
layout_paragraphs:
enabled: false
available_layouts: { }
3 changes: 3 additions & 0 deletions themes/stanford_basic/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
2 changes: 1 addition & 1 deletion themes/stanford_basic/dist/css/base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/stanford_basic/dist/css/components.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/stanford_basic/dist/css/user_login.css
3,734 changes: 1,848 additions & 1,886 deletions themes/stanford_basic/dist/js/base.js

Large diffs are not rendered by default.

45 changes: 36 additions & 9 deletions themes/stanford_basic/dist/js/behaviors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 7496:
/***/ 8035:
/***/ (function() {

var header = document.getElementById('block-stanford-basic-local-tasks');
@@ -35,7 +35,7 @@ function stickyHeaderOnScroll() {

/***/ }),

/***/ 2696:
/***/ 5644:
/***/ (function() {

/**
@@ -124,6 +124,34 @@ window.Drupal.behaviors.stanford_basic = {
$(this).attr('aria-expanded', 'false');
}
});
$(once('faq-expand-all', '.ptype-stanford-faq', context)).each(function (index, faq) {
var $details = $('details', faq);
$('summary', $details).each(function (sumIndex, summary) {
var $summary = $(summary);
var groupId = $summary.text().toLowerCase().replace(/[^\w]/g, '-').replace(/^-+/, '').replace(/-+$/, '');
$summary.attr('aria-expanded', 'false').attr('aria-controls', "".concat(groupId, "-panel")).attr('id', "".concat(groupId, "-button"));
$summary.next().attr('id', "".concat(groupId, "-panel")).attr('aria-labelledby', "".concat(groupId, "-button"));
});
if ($details.length < 2 || $('.ptype-stanford-faq', faq).length) {
return;
}
var $button = $('<button class="expand-collapse-button expand-all su-button--secondary">' + '<span class="expand-collapse">Expand</span> All' + '<span class="visually-hidden"> Items below.</span>' + '</button>');
$button.click(function () {
$button.toggleClass('expand-all').toggleClass('collapse-all');
var expanded = !$button.hasClass('expand-all');
$('span', $button).text(expanded ? 'Collapse' : 'Expand');
$details.each(function (i, detail) {
$(detail).attr('open', expanded);
$('summary', detail).attr('aria-expanded', expanded).attr('aria-pressed', expanded);
});
});
var $headline = $('.su-faq-headline', faq);
if ($headline.length) {
$headline.append($('<div class="button-wrapper">').append($button));
} else {
$(faq).prepend($('<div class="button-wrapper clearfix">').append($button));
}
});
})(jQuery, once);
},
// Detach Example.
@@ -161,25 +189,24 @@ window.Drupal.behaviors.stanford_basic = {
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
!function() {
"use strict";

// EXTERNAL MODULE: ./src/js/theme/menu/StickyHeaderOnScroll.js
var StickyHeaderOnScroll = __webpack_require__(7496);
;// CONCATENATED MODULE: ./src/js/theme/menu/index.js
var StickyHeaderOnScroll = __webpack_require__(8035);
;// ./src/js/theme/menu/index.js

;// CONCATENATED MODULE: ./src/js/theme/index.js
;// ./src/js/theme/index.js
/**
* Primary roll up file
*/

// The Local Task Menu

// EXTERNAL MODULE: ./src/js/stanford_basic.behavior.js
var stanford_basic_behavior = __webpack_require__(2696);
;// CONCATENATED MODULE: ./src/js/behaviors.js
var stanford_basic_behavior = __webpack_require__(5644);
;// ./src/js/behaviors.js
// Theme code.


31 changes: 16 additions & 15 deletions themes/stanford_basic/package.json
Original file line number Diff line number Diff line change
@@ -10,28 +10,29 @@
"author": "",
"license": "ISC",
"dependencies": {
"@babel/core": "^7.22.1",
"@babel/core": "^7.26.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.22.4",
"autoprefixer": "^10.4.16",
"babel-loader": "^9.1.2",
"css-loader": "^6.8.1",
"@babel/preset-env": "^7.26.0",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"css-loader": "^7.1.2",
"decanter": "^6.3.3",
"drupal-behaviors-loader": "^1.0.1",
"element-closest-polyfill": "^1.0.6",
"element-closest-polyfill": "^1.0.7",
"element-matches-polyfill": "^1.0.0",
"element-qsa-scope": "^1.1.0",
"es6-object-assign": "^1.1.0",
"filemanager-webpack-plugin": "^8.0.0",
"mini-css-extract-plugin": "^2.7.6",
"mini-css-extract-plugin": "^2.9.1",
"node-sass": "^9.0.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"postcss-loader": "^7.3.2",
"postcss-preset-env": "^9.1.4",
"sass-loader": "^13.3.1",
"style-loader": "^3.3.3",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.1",
"webpack-fix-style-only-entries": "^0.6.1"
}
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^10.0.8",
"sass-loader": "^16.0.2",
"style-loader": "^4.0.0",
"webpack": "^5.96.0",
"webpack-cli": "^5.1.4",
"webpack-remove-empty-scripts": "^1.0.4"
},
"packageManager": "yarn@4.5.1"
}
48 changes: 48 additions & 0 deletions themes/stanford_basic/src/js/stanford_basic.behavior.js
Original file line number Diff line number Diff line change
@@ -90,6 +90,54 @@ export default {
}
});

$(once('faq-expand-all', '.ptype-stanford-faq', context)).each((index, faq) => {
const $details = $('details', faq);

$('summary', $details).each((sumIndex, summary) => {
const $summary = $(summary);
const groupId = $summary.text()
.toLowerCase()
.replace(/[^\w]/g, '-')
.replace(/^-+/, '')
.replace(/-+$/, '');

$summary.attr('aria-expanded', 'false')
.attr('aria-controls', `${groupId}-panel`)
.attr('id', `${groupId}-button`);
$summary.next().attr('id', `${groupId}-panel`)
.attr('aria-labelledby', `${groupId}-button`);
});

if ($details.length < 2 || $('.ptype-stanford-faq', faq).length) {
return;
}

const $button = $(
'<button class="expand-collapse-button expand-all su-button--secondary">' +
'<span class="expand-collapse">Expand</span> All' +
'<span class="visually-hidden"> Items below.</span>' +
'</button>',
);
$button.click(function () {
$button.toggleClass('expand-all').toggleClass('collapse-all');
const expanded = !$button.hasClass('expand-all');

$('span', $button).text(expanded ? 'Collapse' : 'Expand');
$details.each((i, detail) => {
$(detail).attr('open', expanded);
$('summary', detail).attr('aria-expanded', expanded)
.attr('aria-pressed', expanded);
});
});

const $headline = $('.su-faq-headline', faq);
if ($headline.length) {
$headline.append($('<div class="button-wrapper">').append($button));
} else {
$(faq).prepend($('<div class="button-wrapper clearfix">').append($button));
}
});

})(jQuery, once);
},

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@charset 'UTF-8';

// Add theme customizations here.

.ptype-stanford-faq {

.expand-collapse-button {
float: right;
flex: 1;
white-space: nowrap;
margin-left: 20px;

&::after {
margin-left: 5px;
content: '+';
text-decoration: none;
background: none;
color: $su-color-digital-red;
}

&:hover::after{
color: $su-color-black;
text-underline: none;
}

&.collapse-all {
&::after {
content: '-';
}
}
}
}

.su-faq-headline {
display: flex;
justify-content: space-between;
}

.su-faq-questions {
margin: 3rem 0;

> .paragraph-item {
margin-bottom: 0;

&:not(:last-child) {
details {
border-bottom: 0;
}
}
}

details {
margin: 0;
}

.ds-entity--stanford-accordion {
width: 100%;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@charset 'UTF-8';

@import 'accrdion-list';
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

.content {
.paragraph-item {
@include modular-spacing("margin-bottom", 5);
&:not(.ptype-stanford-accordion) {
@include modular-spacing("margin-bottom", 5);
}

&.ptype-stanford-accordion {
&:last-child {
@include modular-spacing("margin-bottom", 5);
}
}
}
}
3 changes: 2 additions & 1 deletion themes/stanford_basic/src/scss/components/index.scss
Original file line number Diff line number Diff line change
@@ -39,4 +39,5 @@
'secondary-nav/index',
'stanford-page/index',
'wysiwyg/index',
'spacer/index';
'spacer/index',
'accordion-list/index';
4 changes: 2 additions & 2 deletions themes/stanford_basic/webpack.config.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ const path = require("path");
const Webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries");
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
const FileManagerPlugin = require('filemanager-webpack-plugin');
const autoprefixer = require('autoprefixer')({ grid: true });

@@ -96,7 +96,7 @@ var webpackConfig = {
]
},
plugins: [
new FixStyleOnlyEntriesPlugin(),
new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin({
filename: '[name].css',
}),
12,533 changes: 7,510 additions & 5,023 deletions themes/stanford_basic/yarn.lock

Large diffs are not rendered by default.

0 comments on commit f263c63

Please sign in to comment.