Compare commits

...
4 Commits
Author SHA1 Message Date
bachir 38be780911 leshed_helpers_taxonomy_term_delete 2026-10-20 17:24:42 +02:00
bachir 82ee0fd7dd special chars escaping on title fixe 2026-10-20 17:24:15 +02:00
bachir 0f9241b2eb date range mobile display fix 2026-10-20 17:23:36 +02:00
bachir 4f7cc17611 more blur under burger menu 2026-10-20 17:21:01 +02:00
5 changed files with 26 additions and 4 deletions
@@ -30,6 +30,24 @@ function leshed_helpers_taxonomy_term_update(EntityInterface $entity) {
leshed_helpers_ensure_term_alias($entity); leshed_helpers_ensure_term_alias($entity);
} }
/**
* Supprime l'alias d'URL quand un terme d'un vocabulaire géré est supprimé.
*/
function leshed_helpers_taxonomy_term_delete(EntityInterface $entity) {
if (!($entity instanceof TermInterface)) {
return;
}
$vid = $entity->bundle();
if (!isset(LESHED_HELPERS_VOCABULARIES[$vid])) {
return;
}
$internal_path = '/' . LESHED_HELPERS_VOCABULARIES[$vid] . '/' . $entity->id();
$storage = \Drupal::entityTypeManager()->getStorage('path_alias');
$storage->delete($storage->loadByProperties(['path' => $internal_path]));
}
function leshed_helpers_ensure_term_alias(EntityInterface $entity) { function leshed_helpers_ensure_term_alias(EntityInterface $entity) {
if (!($entity instanceof TermInterface)) { if (!($entity instanceof TermInterface)) {
return; return;
File diff suppressed because one or more lines are too long
@@ -1,6 +1,7 @@
@use "sass:math"; @use "sass:math";
@use "fluid" as *; @use "fluid" as *;
@use "../abstracts/breakpoints" as *;
@mixin event-date-time($ref: 10em){ @mixin event-date-time($ref: 10em){
display: flex; display: flex;
@@ -15,6 +16,9 @@
// dérivent de --ref : le bloc entier rétrécit en lock-step, sans désaligner // dérivent de --ref : le bloc entier rétrécit en lock-step, sans désaligner
// la grille par rapport à la typo. NB : les em sont convertis via px() sur // la grille par rapport à la typo. NB : les em sont convertis via px() sur
// hypothèse d'un contexte de 16px. // hypothèse d'un contexte de 16px.
@media #{$mobile}{
$ref:calc($ref * 0.7);
}
--ref: #{fluid-clamp(px($ref), $min: math.div(px($ref), 1.5))}; --ref: #{fluid-clamp(px($ref), $min: math.div(px($ref), 1.5))};
time{ time{
position: relative; position: relative;
@@ -83,8 +83,8 @@ header[role="banner"]{
width:100vw; width:100vw;
padding: 0 calc((100vw - $layout_width) / 2) 0 calc((100vw - $layout_width) / 2); padding: 0 calc((100vw - $layout_width) / 2) 0 calc((100vw - $layout_width) / 2);
background-color: rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.5);
backdrop-filter: blur(7px); backdrop-filter: blur(9px);
height: 0; height: 0;
overflow: hidden; overflow: hidden;
+1 -1
View File
@@ -91,7 +91,7 @@ function leshed_preprocess_page_title(&$variables) {
$base_url = \Drupal\Core\Url::fromUserInput($base_paths[$route_name]); $base_url = \Drupal\Core\Url::fromUserInput($base_paths[$route_name]);
$variables['title'] = [ $variables['title'] = [
'#markup' => '<a href="' . $base_url->toString() . '">' . \Drupal\Component\Utility\Html::escape($base_title) . '</a> | ' . \Drupal\Component\Utility\Html::escape($term_part), '#markup' => '<a href="' . $base_url->toString() . '">' . \Drupal\Component\Utility\Html::escape(\Drupal\Component\Utility\Html::decodeEntities($base_title)) . '</a> | ' . \Drupal\Component\Utility\Html::escape(\Drupal\Component\Utility\Html::decodeEntities($term_part)),
]; ];
} }