rdrew
1 month ago
commit
fa264ca415
5 changed files with 49 additions and 0 deletions
@ -0,0 +1,8 @@
|
||||
name: theme_overrides_scholar |
||||
type: module |
||||
description: Provides additional functionality for the site. |
||||
package: Custom |
||||
core_version_requirement: ^9 || ^10 |
||||
|
||||
libraries: |
||||
- theme_overrides_scholar/global |
@ -0,0 +1,11 @@
|
||||
# Custom module library for general purposes. |
||||
global: |
||||
js: |
||||
js/theme-overrides-scholar.js: {} |
||||
css: |
||||
theme: |
||||
css/theme-overrides-scholar.css: {} |
||||
dependencies: |
||||
- core/drupalSettings |
||||
#- theme_overrides/jquery-labelauty |
||||
|
@ -0,0 +1,27 @@
|
||||
<?php |
||||
|
||||
/** |
||||
* @file |
||||
* Primary module hooks for theme_overrides_scholar module. |
||||
*/ |
||||
|
||||
|
||||
use Drupal\Core\Asset\AttachedAssetsInterface; |
||||
|
||||
|
||||
/** |
||||
* Implements hook_css_alter(). |
||||
*/ |
||||
function theme_overrides_scholar_css_alter(&$css, AttachedAssetsInterface $assets) { |
||||
|
||||
$library = \Drupal::service('library.discovery')->getLibraryByName('theme_overrides_scholar', 'global'); |
||||
$path = $library['css'][0]['data']; |
||||
|
||||
if (isset($css[$path])) { |
||||
$css[$path]['group'] = 300; |
||||
} |
||||
} |
||||
|
||||
function theme_overrides_scholar_page_attachments(&$variables) { |
||||
$variables['#attached']['library'][] = 'theme_overrides_scholar/global'; |
||||
} |
Loading…
Reference in new issue