Skip to content

Commit

Permalink
Merge branch '11.x' of https://github.com/SU-SWS/stanford_profile int…
Browse files Browse the repository at this point in the history
…o 11.x
  • Loading branch information
pookmish committed Nov 8, 2024
2 parents 24d4fd9 + 1d0e25b commit c539c30
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 21 deletions.
56 changes: 52 additions & 4 deletions config/sync/graphql_compose.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ entity_config:
edges_enabled: true
routes_enabled: true
stanford_opportunity:
enabled: false
enabled: true
query_load_enabled: true
edges_enabled: true
routes_enabled: true
stanford_page:
enabled: true
query_load_enabled: true
Expand Down Expand Up @@ -277,11 +280,11 @@ entity_config:
media_tags:
enabled: false
opportunity_sponsor:
enabled: false
enabled: true
opportunity_tag_filters:
enabled: false
enabled: true
opportunity_type:
enabled: false
enabled: true
site_owner_orgs:
enabled: false
stanford_event_groups:
Expand Down Expand Up @@ -658,6 +661,51 @@ field_config:
enabled: true
su_news_topics:
enabled: true
stanford_opportunity:
body:
enabled: true
layout_builder__layout:
enabled: true
su_opp_application_deadline:
enabled: true
su_opp_components:
enabled: true
su_opp_contact_email:
enabled: true
su_opp_contact_name:
enabled: true
su_opp_contact_phone:
enabled: true
su_opp_contact_url:
enabled: true
su_opp_course_code:
enabled: true
su_opp_cta_url:
enabled: true
su_opp_eligibility:
enabled: true
su_opp_image:
enabled: true
su_opp_learn_more:
enabled: true
su_opp_open_date:
enabled: true
su_opp_prerequisites:
enabled: true
su_opp_source:
enabled: true
su_opp_sponsor:
enabled: true
su_opp_start_date:
enabled: true
su_opp_status:
enabled: true
su_opp_summary:
enabled: true
su_opp_tags:
enabled: true
su_opp_type:
enabled: true
stanford_page:
layout_selection:
enabled: true
Expand Down
6 changes: 3 additions & 3 deletions config/sync/metatag.metatag_defaults.front.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ label: 'Front page'
tags:
canonical_url: '[site:url]'
description: '[node:su_page_description|node:summary]'
og_image: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
og_image: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
og_image_alt: '[node:su_page_image:entity:field_media_image:alt|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:alt]'
og_image_url: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
og_image_url: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
og_site_name: '[site:name]'
og_title: '[site:name]'
og_type: website
og_url: '[site:url]'
shortlink: '[site:url]'
title: '[site:name]'
twitter_cards_description: '[node:su_page_description|node:summary]'
twitter_cards_image: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
twitter_cards_image: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
twitter_cards_image_alt: '[node:su_page_image:entity:field_media_image:alt|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:alt]'
twitter_cards_title: '[site:name]'
twitter_cards_type: summary_large_image
6 changes: 3 additions & 3 deletions config/sync/metatag.metatag_defaults.node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ label: Content
tags:
canonical_url: '[node:url]'
description: '[node:su_page_description|node:summary]'
og_image: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
og_image: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
og_image_alt: '[node:su_page_image:entity:field_media_image:alt|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:alt]'
og_image_url: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
og_image_url: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
og_site_name: '[site:name]'
og_title: '[node:title]'
og_type: website
og_url: '[current-page:url:absolute]'
title: '[node:title] | [site:name]'
twitter_cards_description: '[node:su_page_description|node:summary]'
twitter_cards_image: '[node:su_page_image:entity:field_media_image:large|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:large]'
twitter_cards_image: '[node:su_page_image:entity:field_media_image:card_1192x596|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:card_1192x596]'
twitter_cards_image_alt: '[node:su_page_image:entity:field_media_image:alt|node:su_page_banner:entity:su_banner_image:0:entity:field_media_image:alt]'
twitter_cards_title: '[node:title]'
twitter_cards_type: summary_large_image
8 changes: 4 additions & 4 deletions config/sync/metatag.metatag_defaults.node__stanford_news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ tags:
article_tag: '[node:su_news_topics]'
canonical_url: '[node:su_news_source:uri]'
description: '[node:su_news_dek|node:su_news_byline]'
image_src: '[node:su_news_featured_media:entity:field_media_image:large|node:su_news_banner:entity:field_media_image:large]'
og_image: '[node:su_news_featured_media:entity:field_media_image:large|node:su_news_banner:entity:field_media_image:large]'
image_src: '[node:su_news_featured_media:entity:field_media_image:card_1192x596|node:su_news_banner:entity:field_media_image:card_1192x596]'
og_image: '[node:su_news_featured_media:entity:field_media_image:card_1192x596|node:su_news_banner:entity:field_media_image:card_1192x596]'
og_image_alt: '[node:su_news_featured_media:entity:field_media_image:alt|node:su_news_banner:entity:field_media_image:alt]'
og_image_url: '[node:su_news_featured_media:entity:field_media_image:large|node:su_news_banner:entity:field_media_image:large]'
og_image_url: '[node:su_news_featured_media:entity:field_media_image:card_1192x596|node:su_news_banner:entity:field_media_image:card_1192x596]'
og_type: article
twitter_cards_description: '[node:su_news_dek|node:su_news_byline|node:summary]'
twitter_cards_image: '[node:su_news_featured_media:entity:field_media_image:large|node:su_news_banner:entity:field_media_image:large]'
twitter_cards_image: '[node:su_news_featured_media:entity:field_media_image:card_1192x596|node:su_news_banner:entity:field_media_image:card_1192x596]'
twitter_cards_image_alt: '[node:su_news_featured_media:entity:field_media_image:alt|node:su_news_banner:entity:field_media_image:alt]'
twitter_cards_title: '[node:title]'
twitter_cards_type: summary_large_image
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ label: 'Content: Person'
tags:
canonical_url: '[node:su_person_profile_link:uri]'
description: '[node:su_person_full_title|node:su_person_short_title|node:summary]'
image_src: '[node:su_person_photo:entity:field_media_image:large]'
image_src: '[node:su_person_photo:entity:field_media_image:card_1192x596]'
keywords: '[node:su_person_type]'
og_description: '[node:su_person_full_title|node:su_person_short_title]'
og_image: '[node:su_person_photo:entity:field_media_image:large]'
og_image: '[node:su_person_photo:entity:field_media_image:card_1192x596]'
og_image_alt: '[node:su_person_photo:entity:field_media_image:alt|node:title]'
og_image_url: '[node:su_person_photo:entity:field_media_image:large]'
og_image_url: '[node:su_person_photo:entity:field_media_image:card_1192x596]'
og_type: profile
profile_first_name: '[node:su_person_first_name]'
profile_last_name: '[node:su_person_last_name]'
title: '[node:title] | [site:name]'
twitter_cards_description: '[node:su_person_full_title|node:su_person_short_title|node:summary]'
twitter_cards_image: '[node:su_person_photo:entity:field_media_image:large]'
twitter_cards_image: '[node:su_person_photo:entity:field_media_image:card_1192x596]'
twitter_cards_image_alt: '[node:su_person_photo:entity:field_media_image:alt]'
twitter_cards_title: '[node:title]'
twitter_cards_type: summary_large_image
1 change: 1 addition & 0 deletions config/sync/metatag.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ tag_trim_maxlength:
metatag_maxlength_twitter_cards_label2: null
metatag_maxlength_twitter_cards_title: null
tag_scroll_max_height: ''
tag_trim_end: '|.,-:;/+&([{"'''
17 changes: 14 additions & 3 deletions config/sync/node.type.stanford_opportunity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@ dependencies:
- scheduler
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
available_menus: { }
parent: ''
node_revision_delete:
amount:
status: true
settings:
amount: 5
created:
status: false
settings:
age: 1
drafts:
status: false
settings:
age: 1
only_drafts:
status: false
settings:
age: 0
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
Expand Down
10 changes: 10 additions & 0 deletions themes/stanford_basic/dist/js/behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ window.Drupal.behaviors.stanford_basic = {
// Attach Drupal Behavior.
attach: function attach(context, settings) {
(function ($, once) {
// If some embed code contains a caption, make sure the figure respects
// the iframe width of 100%.
$('figure', context).each(function () {
var $iframeWithin = $('iframe', this);
var iframeWidth = $iframeWithin.attr('width');
if ($iframeWithin.length && (!iframeWidth || iframeWidth === '100%')) {
$(this).css('width', '100%');
}
});

// Validate there is a skip link anchor for the main content. If not,
// default to #page-content.
var $title = $('h1', context);
Expand Down
11 changes: 11 additions & 0 deletions themes/stanford_basic/src/js/stanford_basic.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ export default {
// Attach Drupal Behavior.
attach(context, settings) {
(function ($, once) {

// If some embed code contains a caption, make sure the figure respects
// the iframe width of 100%.
$('figure', context).each(function() {
const $iframeWithin = $('iframe', this);
const iframeWidth = $iframeWithin.attr('width');
if ($iframeWithin.length && (!iframeWidth || iframeWidth === '100%')) {
$(this).css('width', '100%');
}
})

// Validate there is a skip link anchor for the main content. If not,
// default to #page-content.
const $title = $('h1', context);
Expand Down

0 comments on commit c539c30

Please sign in to comment.