-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgin.theme
executable file
·33 lines (28 loc) · 871 Bytes
/
gin.theme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* @file
* gin.theme
*/
/**
* Load include files which contain additional theming logic.
*/
foreach (glob(\Drupal::service('extension.list.theme')->getPath('gin') . '/includes/*.theme') as $file) {
include $file;
}
/**
* Set Gin CSS on top of all other CSS files.
*/
function gin_css_alter(&$css, $assets) {
// Use anything greater than 100 to have it load after the theme
// as CSS_AGGREGATE_THEME is set to 100.
// Let's be on the safe side and assign a high number to it.
$base_css = \Drupal::service('extension.list.theme')->getPath('gin') . '/dist/css/base/gin.css';
if (isset($css[$base_css])) {
$css[$base_css]['group'] = 200;
}
// The gin-custom.css file should be loaded just after our gin.css file.
$custom_css = 'public://gin-custom.css';
if (isset($css[$custom_css])) {
$css[$custom_css]['group'] = 201;
}
}