Skip to content

Commit

Permalink
Make Drupal 10 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
occupant committed Dec 12, 2022
1 parent 18daf52 commit c0d58ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 2 additions & 3 deletions kraken.info.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Kraken
type: theme
core: 8.x
base theme: stable
base theme: stable9
description: 'Kraken is a Drupal base theme that provides integration with the UBC CLF (<a href="https://clf.ubc.ca">Common Look and Feel</a>) for UBC-branded units. <em>We recommend against using this theme for any customizations or modifications</em>. If you require a customized UBC CLF theme, please consider the <a href="https://github.com/ubc-web-services/clf">Drupal CLF theme</a>'
package: kraken
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10

libraries:
- kraken/global
Expand Down
13 changes: 7 additions & 6 deletions kraken.theme
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function kraken_page_attachments_alter(array &$page)
*/
function kraken_preprocess_html(&$variables)
{
$theme_path = \Drupal::service('extension.list.theme');
// Add meta tags and links.
$viewport = [
'#type' => 'html_tag',
Expand All @@ -92,7 +93,7 @@ function kraken_preprocess_html(&$variables)
'#tag' => 'meta',
'#attributes' => [
'name' => 'msapplication-config',
'content' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/browserconfig.xml',
'content' => '/' . $theme_path->getPath('kraken') . '/img/favicons/browserconfig.xml',
],
];

Expand All @@ -110,23 +111,23 @@ function kraken_preprocess_html(&$variables)
'#attributes' => [
'rel' => 'apple-touch-icon',
'sizes' => '180x180',
'href' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/apple-touch-icon.png',
'href' => '/' . $theme_path->getPath('kraken') . '/img/favicons/apple-touch-icon.png',
],
];

$manifest = [
'#tag' => 'link',
'#attributes' => [
'rel' => 'manifest',
'href' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/site.webmanifest',
'href' => '/' . $theme_path->getPath('kraken') . '/img/favicons/site.webmanifest',
],
];

$mask_icon = [
'#tag' => 'link',
'#attributes' => [
'rel' => 'mask-icon',
'href' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/safari-pinned-tab.svg',
'href' => '/' . $theme_path->getPath('kraken') . '/img/favicons/safari-pinned-tab.svg',
'color' => '#002145',
],
];
Expand All @@ -136,7 +137,7 @@ function kraken_preprocess_html(&$variables)
'#attributes' => [
'rel' => 'icon',
'sizes' => 'any',
'href' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/favicon.ico',
'href' => '/' . $theme_path->getPath('kraken') . '/img/favicons/favicon.ico',
],
];

Expand All @@ -145,7 +146,7 @@ function kraken_preprocess_html(&$variables)
'#attributes' => [
'rel' => 'icon',
'type' => 'image/svg+xml',
'href' => '/' . drupal_get_path('theme', 'kraken') . '/img/favicons/favicon.svg',
'href' => '/' . $theme_path->getPath('kraken') . '/img/favicons/favicon.svg',
],
];

Expand Down

0 comments on commit c0d58ff

Please sign in to comment.