2024-07-10 16:16:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2024-07-15 16:34:28 +02:00
|
|
|
* Functions to support theming in the caravane theme.
|
2024-07-10 16:16:51 +02:00
|
|
|
*/
|
|
|
|
|
2024-07-15 16:34:28 +02:00
|
|
|
function caravane_page_attachments_alter(&$page) {
|
|
|
|
if (getenv('APP_ENV') === 'development') {
|
|
|
|
// $attachments['#attached']['html_head'][] = [['src' => 'http://localhost:5173/@vite/client', 'type' => 'module'],'vite-client'];
|
|
|
|
// $page['#attached']['library'][] = 'http://localhost:5173/@vite/client';
|
|
|
|
// $attachments['#attached']['html_head'][] = [['src' => 'http://localhost:5173/assets/js/main.js', 'type' => 'module'],'vite-main'];
|
|
|
|
// $page['#attached']['library'][] = 'http://localhost:5173/assets/js/main.js';
|
|
|
|
$page['#attached']['library'][] = 'caravane/vitehmr';
|
2024-07-16 17:01:09 +02:00
|
|
|
}else{
|
|
|
|
$page['#attached']['library'][] = 'caravane/global';
|
2024-07-15 16:34:28 +02:00
|
|
|
}
|
|
|
|
}
|
2024-07-10 16:16:51 +02:00
|
|
|
/**
|
|
|
|
* Implements hook_preprocess_HOOK() for html.html.twig.
|
|
|
|
*/
|
|
|
|
function caravane_preprocess_html(&$variables) {
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_preprocess_HOOK() for page.html.twig.
|
|
|
|
*/
|
|
|
|
function caravane_preprocess_page(&$variables) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_preprocess_HOOK() for node.html.twig.
|
|
|
|
*/
|
|
|
|
function caravane_preprocess_node(&$variables) {
|
|
|
|
|
|
|
|
}
|
2024-07-16 17:01:09 +02:00
|
|
|
|
2024-07-31 00:33:21 +02:00
|
|
|
function your_theme_preprocess_block(&$variables) {
|
2024-08-05 21:08:09 +02:00
|
|
|
|
|
|
|
}
|