Skip to content
Snippets Groups Projects
Commit 4d0065d0 authored by Kevin Paxman's avatar Kevin Paxman Committed by Kevin Paxman
Browse files

Code standards.

parent 2859d8dd
No related branches found
No related tags found
2 merge requests!32Tag 1.0.1,!29ISTWCMS-4864: add favicons
...@@ -46,26 +46,26 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) { ...@@ -46,26 +46,26 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) {
// Based on https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs. // Based on https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs.
$favicon = [ $favicon = [
'rel' => 'icon', 'rel' => 'icon',
'href' => base_path() . drupal_get_path('theme','uw_fdsu_theme_resp') . '/favicon.ico', 'href' => base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp') . '/favicon.ico',
]; ];
$variables['page']['#attached']['html_head_link'][] = [$favicon]; $variables['page']['#attached']['html_head_link'][] = [$favicon];
$favicon_svg = [ $favicon_svg = [
'rel' => 'icon', 'rel' => 'icon',
'href' => base_path() . drupal_get_path('theme','uw_fdsu_theme_resp') . '/icon.svg', 'href' => base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp') . '/icon.svg',
'type' => 'image/svg+xml', 'type' => 'image/svg+xml',
]; ];
$variables['page']['#attached']['html_head_link'][] = [$favicon_svg]; $variables['page']['#attached']['html_head_link'][] = [$favicon_svg];
$favicon_apple = [ $favicon_apple = [
'rel' => 'apple-touch-icon', 'rel' => 'apple-touch-icon',
'href' => base_path() . drupal_get_path('theme','uw_fdsu_theme_resp') . '/apple-touch-icon.png', 'href' => base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp') . '/apple-touch-icon.png',
]; ];
$variables['page']['#attached']['html_head_link'][] = [$favicon_apple]; $variables['page']['#attached']['html_head_link'][] = [$favicon_apple];
$favicon_manifest = [ $favicon_manifest = [
'rel' => 'manifest', 'rel' => 'manifest',
'href' => 'data:application/manifest+json,{ 'href' => 'data:application/manifest+json,{
"icons": [ "icons": [
{ "src": "' . base_path() . drupal_get_path('theme','uw_fdsu_theme_resp') . '/icon-192.png", "type": "image/png", "sizes": "192x192" }, { "src": "' . base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp') . '/icon-192.png", "type": "image/png", "sizes": "192x192" },
{ "src": "' . base_path() . drupal_get_path('theme','uw_fdsu_theme_resp') . '/icon-512.png", "type": "image/png", "sizes": "512x512" } { "src": "' . base_path() . drupal_get_path('theme', 'uw_fdsu_theme_resp') . '/icon-512.png", "type": "image/png", "sizes": "512x512" }
] ]
}', }',
]; ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment