-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General updates applying BEM and USWDS structures (#19)
- Loading branch information
1 parent
3fac121
commit 62945bc
Showing
74 changed files
with
1,687 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Preprocess function for blocks. | ||
*/ | ||
|
||
/** | ||
* Implements hook_preprocess_block(). | ||
*/ | ||
function bixaluswds_preprocess_block(&$variables) { | ||
$variables['content']['#attributes']['block'] = $variables['attributes']['id']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
starter_theme/config/install/block.block.bixaluswds_main_menu.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- system.menu.main | ||
module: | ||
- system | ||
theme: | ||
- starter_theme | ||
id: bixaluswds_main_menu | ||
theme: starter_theme | ||
region: header | ||
weight: 0 | ||
provider: null | ||
plugin: 'system_menu_block:main' | ||
settings: | ||
id: 'system_menu_block:main' | ||
label: 'Main navigation' | ||
label_display: '0' | ||
provider: system | ||
level: 1 | ||
depth: 2 | ||
expand_all_items: true | ||
visibility: { } |
22 changes: 22 additions & 0 deletions
22
starter_theme/config/install/block.block.bixaluswds_sitebranding.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- system | ||
theme: | ||
- starter_theme | ||
id: bixaluswds_sitebranding | ||
theme: starter_theme | ||
region: header | ||
weight: -2 | ||
provider: null | ||
plugin: system_branding_block | ||
settings: | ||
id: system_branding_block | ||
label: 'Site branding' | ||
label_display: '0' | ||
provider: system | ||
use_site_logo: true | ||
use_site_name: true | ||
use_site_slogan: false | ||
visibility: { } |
19 changes: 19 additions & 0 deletions
19
starter_theme/config/install/block.block.starter_theme_content.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- system | ||
theme: | ||
- starter_theme | ||
id: starter_theme_content | ||
theme: starter_theme | ||
region: content | ||
weight: -3 | ||
provider: null | ||
plugin: system_main_block | ||
settings: | ||
id: system_main_block | ||
label: 'Main page content' | ||
label_display: '0' | ||
provider: system | ||
visibility: { } |
19 changes: 19 additions & 0 deletions
19
starter_theme/config/install/block.block.starter_theme_messages.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- system | ||
theme: | ||
- starter_theme | ||
id: starter_theme_messages | ||
theme: starter_theme | ||
region: admin | ||
weight: -3 | ||
provider: null | ||
plugin: system_messages_block | ||
settings: | ||
id: system_messages_block | ||
label: 'Status messages' | ||
label_display: '0' | ||
provider: system | ||
visibility: { } |
17 changes: 17 additions & 0 deletions
17
starter_theme/config/install/block.block.starter_theme_page_title.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
theme: | ||
- starter_theme | ||
id: starter_theme_page_title | ||
theme: starter_theme | ||
region: content | ||
weight: -4 | ||
provider: null | ||
plugin: page_title_block | ||
settings: | ||
id: page_title_block | ||
label: 'Page title' | ||
label_display: '0' | ||
provider: core | ||
visibility: { } |
19 changes: 19 additions & 0 deletions
19
starter_theme/config/install/block.block.starter_theme_primary_local_tasks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
theme: | ||
- starter_theme | ||
id: starter_theme_primary_local_tasks | ||
theme: starter_theme | ||
region: admin | ||
weight: -4 | ||
provider: null | ||
plugin: local_tasks_block | ||
settings: | ||
id: local_tasks_block | ||
label: 'Primary tabs' | ||
label_display: '0' | ||
provider: core | ||
primary: true | ||
secondary: false | ||
visibility: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Processing External Links | ||
*/ | ||
|
||
(() => { | ||
|
||
// Enable external links behavior. | ||
// `extlinkjs-ignore` attribute should be added to all icons in order to not render the uswds external links icon | ||
const externalLinks = document.querySelectorAll('a[href^="https"]:not([extlinkjs-ignore])'); | ||
const title_translated = Drupal.t('External link opens in new window'); | ||
|
||
// Process external links. | ||
if (externalLinks.length) { | ||
for (let i = 0; i < externalLinks.length; i++) { | ||
externalLinks[i].classList.add('usa-link--external'); | ||
externalLinks[i].setAttribute('target', '_blank'); | ||
externalLinks[i].setAttribute('title', title_translated); | ||
if (!new URL(externalLinks[i].href).hostname.endsWith(".gov")) { | ||
externalLinks[i].setAttribute('rel', 'noreferrer'); | ||
} | ||
} | ||
} | ||
|
||
})(); |
Oops, something went wrong.