Compare commits

...
17 Commits
36 changed files with 1063 additions and 173 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
# npm
node_modules/
*.patch
#*.patch
/.csslintrc
/.eslintrc.json
/.ht.router.php
+5
View File
@@ -23,10 +23,12 @@
"drupal/core-recommended": "^10.4",
"drupal/entity_block": "^2.0",
"drupal/footnotes": "^4.0@RC",
"drupal/linked_field": "^1.7",
"drupal/page_manager": "^4.0@RC",
"drupal/paragraphs": "^1.20",
"drupal/redirect": "^1.12",
"drupal/shield": "^1.8",
"drupal/structure_sync": "^2.0",
"drupal/upgrade_status": "^4.3",
"wikimedia/composer-merge-plugin": "^2.1"
},
@@ -121,6 +123,9 @@
},
"drupal/core": {
"CKEDITOR for summary https://www.drupal.org/project/drupal/issues/2671162":"https://www.drupal.org/files/issues/2025-08-23/2671162-158.patch"
},
"drupal/footnotes": {
"leave paragraphs tags in place":"./patches/footnotes-leave-paragraphs.patch"
}
}
}
Generated
+134 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6bf176d658d431efd6ddb4df31aa6bc4",
"content-hash": "70053163e5a41445ee80f289c51828ff",
"packages": [
{
"name": "asm89/stack-cors",
@@ -5108,6 +5108,58 @@
"issues": "https://www.drupal.org/project/issues/link_attributes"
}
},
{
"name": "drupal/linked_field",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/linked_field.git",
"reference": "8.x-1.7"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/linked_field-8.x-1.7.zip",
"reference": "8.x-1.7",
"shasum": "c304792746a92d105f08931d2b6e09b20ee8d618"
},
"require": {
"drupal/core": "^8.8 || ^9 || ^10 || ^11"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.7",
"datestamp": "1748842765",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "jcnventura",
"homepage": "https://www.drupal.org/user/122464"
},
{
"name": "vitaliyb98",
"homepage": "https://www.drupal.org/user/3514011"
},
{
"name": "yannickoo",
"homepage": "https://www.drupal.org/user/531118"
}
],
"description": "Adds the functionality to link fields to a specific destination.",
"homepage": "https://www.drupal.org/project/linked_field",
"support": {
"source": "https://git.drupalcode.org/project/linked_field"
}
},
{
"name": "drupal/linkit",
"version": "7.0.12",
@@ -6668,6 +6720,87 @@
"source": "https://git.drupalcode.org/project/sophron"
}
},
{
"name": "drupal/structure_sync",
"version": "2.0.8",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/structure_sync.git",
"reference": "2.0.8"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/structure_sync-2.0.8.zip",
"reference": "2.0.8",
"shasum": "3f1bd24d7f048cdd9f49e178af9fa47d291d3525"
},
"require": {
"drupal/core": "^8 || ^9 || ^10 || ^11",
"php": ">=7.1"
},
"require-dev": {
"drush/drush": "^9 || ^10 || ^11 || ^12 || ^13"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "2.0.8",
"datestamp": "1728580642",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
},
"drush": {
"services": {
"drush.services.yml": "^9 || ^10 || ^11 || ^12 || ^13"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "colan",
"homepage": "https://www.drupal.org/user/58704"
},
{
"name": "fidovdbos",
"homepage": "https://www.drupal.org/user/1494332"
},
{
"name": "joachim",
"homepage": "https://www.drupal.org/user/107701"
},
{
"name": "louis-cuny",
"homepage": "https://www.drupal.org/user/3606332"
},
{
"name": "mparker17",
"homepage": "https://www.drupal.org/user/536298"
},
{
"name": "spiderman",
"homepage": "https://www.drupal.org/user/1631"
},
{
"name": "timkruijsen",
"homepage": "https://www.drupal.org/user/3513437"
},
{
"name": "vinlaurens",
"homepage": "https://www.drupal.org/user/2945689"
}
],
"description": "Tool for syncing structural data that is stored as content.",
"homepage": "https://www.drupal.org/project/structure_sync",
"support": {
"source": "https://git.drupalcode.org/project/structure_sync"
}
},
{
"name": "drupal/synonyms",
"version": "2.1.4",
@@ -0,0 +1,25 @@
uuid: c1f6a423-d0ea-44b1-830b-e56a63562c89
langcode: fr
status: true
dependencies:
content:
- 'block_content:logo_link:7c4d9f53-a289-4437-a374-15f8ac471359'
module:
- block_content
theme:
- mathallo
id: mathallo_humanun
theme: mathallo
region: footer
weight: 0
provider: null
plugin: 'block_content:7c4d9f53-a289-4437-a374-15f8ac471359'
settings:
id: 'block_content:7c4d9f53-a289-4437-a374-15f8ac471359'
label: humanun
label_display: '0'
provider: block_content
status: true
info: ''
view_mode: full
visibility: { }
@@ -0,0 +1,8 @@
uuid: 6d872bd0-154d-499f-b2b3-4e5329e74a73
langcode: fr
status: true
dependencies: { }
id: logo_link
label: 'logo link'
revision: false
description: null
@@ -0,0 +1,49 @@
uuid: cc1141d6-5782-432c-9102-8a4b4918fff4
langcode: fr
status: true
dependencies:
config:
- block_content.type.logo_link
- field.field.block_content.logo_link.field_lien
- field.field.block_content.logo_link.field_logo
- image.style.thumbnail
module:
- image
- link
id: block_content.logo_link.default
targetEntityType: block_content
bundle: logo_link
mode: default
content:
field_lien:
type: link_default
weight: 26
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_logo:
type: image_image
weight: 27
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
info:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
hidden: { }
@@ -0,0 +1,39 @@
uuid: 7dfb0049-bde3-4738-8ae9-fd78f513f401
langcode: fr
status: true
dependencies:
config:
- block_content.type.logo_link
- field.field.block_content.logo_link.field_lien
- field.field.block_content.logo_link.field_logo
- image.style.thumbnail
module:
- image
- linked_field
id: block_content.logo_link.default
targetEntityType: block_content
bundle: logo_link
mode: default
content:
field_logo:
type: image
label: hidden
settings:
image_link: ''
image_style: thumbnail
image_loading:
attribute: lazy
third_party_settings:
linked_field:
linked: '1'
type: field
destination: field_lien
advanced:
target: _blank
token: ''
weight: 0
region: content
hidden:
field_lien: true
langcode: true
search_api_excerpt: true
+2
View File
@@ -91,6 +91,7 @@ module:
shield: 0
smart_trim: 0
smtp: 0
structure_sync: 0
system: 0
taxonomy: 0
telephone: 0
@@ -111,6 +112,7 @@ module:
content_translation: 10
views: 10
paragraphs: 11
linked_field: 100
figli_starter_kit: 1000
theme:
seven: 0
+11 -2
View File
@@ -16,13 +16,22 @@ settings:
- bold
- italic
- underline
- link
- bulletedList
- drupalInsertImage
- showBlocks
plugins:
ckeditor5_imageResize:
allow_resize: true
ckeditor5_list:
properties:
reversed: false
startIndex: false
multiBlock: false
image_upload:
status: false
status: true
scheme: public
directory: inline-images
max_size: null
max_dimensions:
width: 1080
height: null
+12
View File
@@ -16,6 +16,7 @@ settings:
- undo
- redo
- heading
- style
- bold
- italic
- bulletedList
@@ -42,5 +43,16 @@ settings:
multiBlock: true
ckeditor5_sourceEditing:
allowed_tags: { }
ckeditor5_style:
styles:
-
label: mathallo
element: '<span class="mathallo-site-name">'
-
label: 'Lien transversal'
element: '<p class="lien-transversal">'
linkit_extension:
linkit_enabled: true
linkit_profile: default
image_upload:
status: false
@@ -0,0 +1,23 @@
uuid: d63a6e6b-64b6-43bd-a58b-2ee3e106a41b
langcode: fr
status: true
dependencies:
config:
- block_content.type.logo_link
- field.storage.block_content.field_lien
module:
- link
id: block_content.logo_link.field_lien
field_name: field_lien
entity_type: block_content
bundle: logo_link
label: Lien
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 0
link_type: 16
field_type: link
@@ -0,0 +1,38 @@
uuid: 727398e0-2cd1-42ba-bafb-cd733f136caa
langcode: fr
status: true
dependencies:
config:
- block_content.type.logo_link
- field.storage.block_content.field_logo
module:
- image
id: block_content.logo_link.field_logo
field_name: field_logo
entity_type: block_content
bundle: logo_link
label: Logo
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg webp'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: true
title_field: false
title_field_required: false
default_image:
uuid: ''
alt: ''
title: ''
width: null
height: null
field_type: image
@@ -0,0 +1,19 @@
uuid: feb6db14-a228-4db7-bd2b-f1f7a7e67add
langcode: fr
status: true
dependencies:
module:
- block_content
- link
id: block_content.field_lien
field_name: field_lien
entity_type: block_content
type: link
settings: { }
module: link
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
@@ -0,0 +1,30 @@
uuid: 816a5b21-af77-44d6-ae56-1929fabe039f
langcode: fr
status: true
dependencies:
module:
- block_content
- file
- image
id: block_content.field_logo
field_name: field_logo
entity_type: block_content
type: image
settings:
target_type: file
display_field: false
display_default: true
uri_scheme: public
default_image:
uuid: ''
alt: ''
title: ''
width: null
height: null
module: image
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
+93 -4
View File
@@ -3,6 +3,10 @@ langcode: en
status: true
dependencies:
module:
- editor
- footnotes
- linkit
- media
- pathologic
_core:
default_config_hash: SYAah-i4HbJnc3ZnKC9NmY4M0UAFYpfobYzxg0eMunM
@@ -10,23 +14,108 @@ name: Footnote
format: footnote
weight: 0
filters:
editor_file_reference:
id: editor_file_reference
provider: editor
status: true
weight: -48
settings: { }
filter_align:
id: filter_align
provider: filter
status: false
weight: -47
settings: { }
filter_autop:
id: filter_autop
provider: filter
status: true
weight: -43
settings: { }
filter_caption:
id: filter_caption
provider: filter
status: false
weight: -46
settings: { }
filter_footnotes:
id: filter_footnotes
provider: footnotes
status: false
weight: -44
settings:
footnotes_collapse: false
footnotes_css: true
footnotes_dialog: false
footnotes_dialog_prevent_bubbling: false
footnotes_footer_disable: false
footnotes_preview_show_text: true
footnotes_preview_character: ''
filter_html:
id: filter_html
provider: filter
status: true
weight: -10
weight: -50
settings:
allowed_html: '<br> <p> <strong> <em> <u> <a href> <ul> <ol reversed start> <li>'
filter_html_help: true
allowed_html: '<br> <p> <strong> <em> <u> <ul> <ol> <li> <img src alt height width data-entity-uuid data-entity-type>'
filter_html_help: false
filter_html_nofollow: false
filter_html_escape:
id: filter_html_escape
provider: filter
status: false
weight: -49
settings: { }
filter_html_image_secure:
id: filter_html_image_secure
provider: filter
status: false
weight: -41
settings: { }
filter_htmlcorrector:
id: filter_htmlcorrector
provider: filter
status: false
weight: -40
settings: { }
filter_image_lazy_load:
id: filter_image_lazy_load
provider: filter
status: false
weight: -39
settings: { }
filter_pathologic:
id: filter_pathologic
provider: pathologic
status: false
weight: 50
weight: -38
settings:
settings_source: global
local_settings:
protocol_style: full
local_paths: ''
keep_language_prefix: true
filter_url:
id: filter_url
provider: filter
status: false
weight: -45
settings:
filter_url_length: 72
linkit:
id: linkit
provider: linkit
status: false
weight: -42
settings:
title: true
media_substitution: metadata
media_embed:
id: media_embed
provider: media
status: false
weight: -37
settings:
default_view_mode: default
allowed_view_modes: { }
allowed_media_types: { }
+38 -13
View File
@@ -5,6 +5,8 @@ dependencies:
module:
- editor
- footnotes
- linkit
- media
- pathologic
_core:
default_config_hash: a0dSxrd1nnzeSvKpvFmtoLpxDd3Nj6E7dQN-MZUi20g
@@ -22,65 +24,71 @@ filters:
id: filter_align
provider: filter
status: false
weight: -41
weight: -42
settings: { }
filter_autop:
id: filter_autop
provider: filter
status: true
weight: -49
status: false
weight: -45
settings: { }
filter_caption:
id: filter_caption
provider: filter
status: false
weight: -40
weight: -41
settings: { }
filter_footnotes:
id: filter_footnotes
provider: footnotes
status: true
weight: 0
weight: -47
settings:
footnotes_collapse: false
footnotes_css: false
footnotes_dialog: false
footnotes_dialog_prevent_bubbling: true
footnotes_footer_disable: true
footnotes_preview_show_text: true
footnotes_preview_show_text: false
footnotes_preview_character: ''
filter_html:
id: filter_html
provider: filter
status: false
weight: -43
weight: -44
settings:
allowed_html: ''
allowed_html: '<span class="mathallo-site-name"> <p class="lien-transversal">'
filter_html_help: true
filter_html_nofollow: false
filter_html_escape:
id: filter_html_escape
provider: filter
status: false
weight: -42
weight: -43
settings: { }
filter_html_image_secure:
id: filter_html_image_secure
provider: filter
status: true
weight: -48
weight: -49
settings: { }
filter_htmlcorrector:
id: filter_htmlcorrector
provider: filter
status: true
weight: -47
weight: -46
settings: { }
filter_image_lazy_load:
id: filter_image_lazy_load
provider: filter
status: false
weight: -39
settings: { }
filter_pathologic:
id: filter_pathologic
provider: pathologic
status: false
weight: 50
weight: -38
settings:
settings_source: global
local_settings:
@@ -91,6 +99,23 @@ filters:
id: filter_url
provider: filter
status: true
weight: -45
weight: -48
settings:
filter_url_length: 72
linkit:
id: linkit
provider: linkit
status: true
weight: -40
settings:
title: true
media_substitution: metadata
media_embed:
id: media_embed
provider: media
status: false
weight: -37
settings:
default_view_mode: default
allowed_view_modes: { }
allowed_media_types: { }
@@ -0,0 +1,11 @@
uuid: 284462f0-456e-4178-a946-51ad5a7d30ee
langcode: fr
status: true
dependencies:
config:
- block_content.type.logo_link
id: block_content.logo_link
target_entity_type_id: block_content
target_bundle: logo_link
default_langcode: site_default
language_alterable: false
+15
View File
@@ -0,0 +1,15 @@
_core:
default_config_hash: PQasQC1X7aWGPpdeZMscZrE9K0RnK_czZQedrwTJor8
attributes:
title:
label: ''
description: ''
target:
label: ''
description: ''
class:
label: ''
description: ''
rel:
label: Relationship
description: ''
+21
View File
@@ -0,0 +1,21 @@
blocks:
-
info: IUF
langcode: fr
uuid: 7c4d9f53-a289-4437-a374-15f8ac471359
bundle: logo_link
revision_id: null
rev_id_current: null
fields:
field_lien:
-
uri: 'https://www.iufrance.fr/'
title: ''
options: { }
field_logo:
-
target_id: '4'
alt: 'Institut Universitaire de France '
title: ''
width: '751'
height: '264'
+13
View File
@@ -0,0 +1,13 @@
diff --git a/src/Plugin/Filter/FootnotesFilter.php b/src/Plugin/Filter/FootnotesFilter.php
index 03bff31..8189be0 100644
--- a/src/Plugin/Filter/FootnotesFilter.php
+++ b/src/Plugin/Filter/FootnotesFilter.php
@@ -168,7 +168,7 @@ class FootnotesFilter extends FilterBase implements ContainerFactoryPluginInterf
// Citations should not contain paragraph tags as they should be inline
// content. This attempts to remove them; however, if the 'Convert line
// breaks filter' runs after this filter, it will still be an issue.
- $markup = str_replace(['<p>', '</p>'], '', $markup);
+ // $markup = str_replace(['<p>', '</p>'], '', $markup);
static::replaceNodeContent($node, $markup);
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<g>
<path d="M497.938,430.063l-126.914-126.91C389.287,272.988,400,237.762,400,200C400,89.719,310.281,0,200,0
C89.719,0,0,89.719,0,200c0,110.281,89.719,200,200,200c37.762,0,72.984-10.711,103.148-28.973l126.914,126.91
C439.438,507.313,451.719,512,464,512c12.281,0,24.563-4.688,33.938-14.063C516.688,479.195,516.688,448.805,497.938,430.063z
M64,200c0-74.992,61.016-136,136-136s136,61.008,136,136s-61.016,136-136,136S64,274.992,64,200z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 878 B

+156 -49
View File
@@ -54,9 +54,9 @@ gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
let smoother = null;
let fn_modale;
// let fn_modale;
let mouse_pos = {x:0,y:0};
// let mouse_pos = {x:0,y:0};
// ___ _ _
// |_ _|_ _ (_) |_
@@ -370,78 +370,185 @@ gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
function onUpdateSmoother(sm){
// console.log('onUpdateSmoother', sm);
// let content = sm.content();
updateFnModalePos();
// updateFnModalePos();
}
function initFootnotes(){
// let container = document.querySelector('main[role="main"]>div.layout-content>.wrapper');
let container = document.body;
fn_modale = document.createElement('div');
fn_modale.classList.add('fn-modale');
container.append(fn_modale);
let fns = document.querySelectorAll('.footnote__citation');
// console.log('fns', fns);
let used_n = [];
for (const fn of fns) {
console.log('fn', fn);
fn.addEventListener('mouseenter', onMouseEnterFN);
fn.addEventListener('mouseleave', onMouseLeaveFN);
// set a random class for icone
let n = Math.round(Math.random() * (_formesclasses.length -1));
while (used_n.includes(n)) {
n = Math.round(Math.random() * (_formesclasses.length -1));
}
used_n.push(n);
fn.querySelector('span.footnote-link').classList.add(`forme-${_formesclasses[n]}`);
// events
// fn.addEventListener('mouseenter', onMouseEnterFN);
// fn.addEventListener('mouseleave', onMouseLeaveFN);
// fn.addEventListener('mousemove', onMouseMove);
fn.addEventListener('click', onClickFootnote);
}
window.addEventListener('mousemove', onMouseMove);
// window.addEventListener('mousemove', onMouseMove);
}
function onMouseEnterFN(event){
console.log('onMouseEnterFN, event:', event);
fn_modale.innerHTML = event.target.dataset.content;
fn_modale.classList.add('visible');
// function onMouseEnterFN(event){
// console.log('onMouseEnterFN, event:', event);
// fn_modale.innerHTML = event.target.querySelector('.footnote-content').innerHTML;
// fn_modale.classList.add('visible');
// fn_modale.style.left = `${event.clientX}px`;
// fn_modale.style.top = `${event.clientY}px`;
}
function onMouseLeaveFN(event){
console.log('onMouseLeaveFN, event:', event);
// fn_modale.innerHTML = event.target.dataset.content;
fn_modale.classList.remove('visible');
// // fn_modale.style.left = `${event.clientX}px`;
// // fn_modale.style.top = `${event.clientY}px`;
// }
// function onMouseLeaveFN(event){
// console.log('onMouseLeaveFN, event:', event);
// fn_modale.classList.remove('visible');
// setTimeout(function(){
// fn_modale.innerHTML = "";
// }, 1000);
// fn_modale.style.left = `${event.clientX}px`;
// fn_modale.style.top = `${event.clientY}px`;
}
function onMouseMove(event){
// console.log('onMouseMove, event:', event);
mouse_pos = {
x:event.clientX,
y:event.clientY
}
updateFnModalePos();
}
function updateFnModalePos(){
if (smoother) {
let cont = smoother.content();
let rect = cont.getBoundingClientRect();
fn_modale.style.left = `${mouse_pos.x - rect.left}px`;
let componsed_mouse_posy = mouse_pos.y - rect.top;
// if (componsed_mouse_posy > window.innerHeight) {
fn_modale.style.top = `${componsed_mouse_posy - fn_modale.clientHeight + 60}px`;
// } else{
// fn_modale.style.top = `${componsed_mouse_posy - fn_modale.clientHeight * 0.7}px`;
// // fn_modale.style.left = `${event.clientX}px`;
// // fn_modale.style.top = `${event.clientY}px`;
// }
console.log('window', window);
function onClickFootnote(event){
event.preventDefault();
event.stopPropagation();
console.log('onClickFN, event:', event);
let fn = event.currentTarget;
let container = fn.offsetParent;
removeModals();
let fn_modale = document.createElement('div');
fn_modale.classList.add('fn-modale');
container.append(fn_modale);
fn_modale.innerHTML = fn.querySelector('.footnote-content').innerHTML;
// contraintes de taille
let decalage = 20;
let maxW = container.clientWidth * 2 / 3;
let maxH = window.innerHeight * 0.3;
fn_modale.style.maxWidth = `${maxW}px`;
fn_modale.style.maxHeight = `${maxH}px`;
fn_modale.style.overflowY = 'auto';
// mesurer la modale (offsetWidth/Height force le layout)
let modW = fn_modale.offsetWidth;
let modH = fn_modale.offsetHeight;
// position de la footnote dans le container
let fnL = fn.offsetLeft;
let fnT = fn.offsetTop;
let fnW = fn.offsetWidth;
let fnH = fn.offsetHeight;
let contW = container.clientWidth;
let contH = container.clientHeight;
let left, top;
// horizontal : droite si on est a gauche, gauche si on est a droite
if (fnL + fnW / 2 > contW / 2) {
// cote droit → modale a gauche de la footnote
left = fnL - modW - decalage;
if (left < decalage) left = decalage;
} else {
console.warn('no smoother');
// cote gauche → modale a droite de la footnote
left = fnL + fnW + decalage;
if (left + modW > contW - decalage) left = contW - modW - decalage;
}
// vertical : bas si on est en haut, haut si on est en bas
if (fnT + fnH / 2 > contH / 2) {
// bas → modale au-dessus de la footnote
top = fnT - modH - decalage;
if (top < decalage) top = decalage;
} else {
// haut → modale en-dessous de la footnote
top = fnT + fnH + decalage;
if (top + modH > contH - decalage) top = contH - modH - decalage;
}
fn_modale.style.left = `${left}px`;
fn_modale.style.top = `${top}px`;
fn_modale.classList.add('visible');
container.addEventListener('click', onClickFNParent);
}
function onClickFNParent(event) {
console.log('onClickFNParent, event:', event);
removeModals();
event.target.removeEventListener('click', onClickFNParent);
}
function removeModals(){
let fn_modales = document.querySelectorAll('div.fn-modale');
for (const fnm of fn_modales) {
fnm.remove();
}
}
// function onMouseMove(event){
// // console.log('onMouseMove, event:', event);
// mouse_pos = {
// x:event.clientX,
// y:event.clientY
// }
// // updateFnModalePos();
// }
// function updateFnModalePos(){
// if (smoother) {
// let cont = smoother.content();
// console.log('cont', cont);
// let rect = cont.getBoundingClientRect();
// // console.log(`mouse_pos.x=${mouse_pos.x} | window.innerWidth/2=${window.innerWidth/2}`);
// let compensed_mouse_pos = {
// x: mouse_pos.x - rect.left,
// y: mouse_pos.y - rect.top + cont.offsetTop
// }
// let decalage = 20;
// if (mouse_pos.x < window.innerWidth/2) {
// fn_modale.style.left = `${compensed_mouse_pos.x + decalage}px`;
// }else{
// fn_modale.style.left = `${compensed_mouse_pos.x - fn_modale.clientWidth - decalage}px`;
// }
// // let componsed_mouse_posy = mouse_pos.y - rect.top + 370;
// if (mouse_pos.y < window.innerHeight / 2) {
// // fn_modale.style.top = `${componsed_mouse_posy - fn_modale.clientHeight + 60}px`;
// fn_modale.style.top = `${compensed_mouse_pos.y + decalage}px`
// } else{
// // fn_modale.style.top = `${componsed_mouse_posy - 60}px`;
// fn_modale.style.top = `${compensed_mouse_pos.y - fn_modale.clientHeight - decalage}px`
// }
// console.log('window', window);
// } else{
// console.warn('no smoother');
// }
// }
// function initVues(){
// console.log('initVues');
@@ -1,6 +1,7 @@
@import "partials/colors";
@import "partials/fonts";
@import "partials/mixins";
@import "wysiwyg";
a, a:visited{
text-decoration: none;
@@ -83,6 +84,36 @@ header[role="banner"]{
form{
display: flex;
align-items: baseline;
background-color: #ddd;
padding: 0.2em 0.5em;
border-radius: 1em;
input.form-search{
background-color: #ddd;
border: none;
outline: none;
&:focus{
outline: none;
}
}
input.form-submit{
-webkit-appearance: none;
appearance: none;
background-color: $bleu_typo;
border: none;
width: 1em;
height: 1em;
cursor: pointer;
-webkit-mask-image: url('/themes/custom/mathallo/assets/img/loupe.svg');
mask-image: url('/themes/custom/mathallo/assets/img/loupe.svg');
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-size: contain;
mask-size: contain;
}
}
}
@@ -426,6 +457,7 @@ main[role="main"]{
}
}
// Article Static Home page teaser
&[role="home-presentation"]{
max-width: 65vw;
@@ -439,65 +471,110 @@ main[role="main"]{
p{
font-size: 1.134em;
vertical-align: top;
display: inline-block;
max-width: 29%;
margin-top: 2em;
box-sizing: border-box;
position: relative;
box-sizing: border-box;
// z-index: 10;
margin-bottom: 6em;
@media (min-width: 1080px){
display: inline-block;
max-width: 28%;
// min-width: 15em;
margin-top: 2em;
margin-bottom: 7em;
&:not(:first-of-type){
margin-left: 6%;
}
transform-origin: top left;
&, &:before{
transition: all 0.6s ease-in-out;
}
&:hover{
// color: $bleu_site;
transform: scale(1.1) translateY(-5px);
&:before{
transform: scale(0.8) translateY(-20px) rotate(-15deg);
}
}
&:before{
content: "";
display: block;
position: absolute;
// background-color: red;
// border: 1px solid red ;
background-size: contain;
$form_wh:10em;
$form_wh:8em;
width:$form_wh; height:$form_wh;
bottom:-$form_wh * 0.9; right:0;
bottom:-$form_wh * 1.1; right:$form_wh / 4;
z-index: -1;
transform-origin: center left;
background-size: contain;
// background-color: $bleu_site;
// border: 1px solid red ;
// mask-size: contain;
// mask-mode: luminance;
}
&.forme-pyramide:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/pyramide.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/pyramide.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/pyramide.svg');
}
&.forme-prct:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/prct.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/prct.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/prct.svg');
}
&.forme-pi:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/pi.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/pi.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/pi.svg');
}
&.forme-infinite:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/infinite.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/infinite.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/infinite.svg');
}
&.forme-supeg:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/supeg.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/supeg.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/supeg.svg');
}
&.forme-cone:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/cone.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/cone.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/cone.svg');
}
&.forme-croissant:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/croissant.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/croissant.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/croissant.svg');
}
&.forme-cube:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/cube.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/cube.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/cube.svg');
}
&.forme-diamant:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/diamant.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/diamant.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/diamant.svg');
}
&.forme-cylindre:before{
background-image: url('/themes/custom/mathallo/assets/img/formes/cylindre.svg');
// content: url('/themes/custom/mathallo/assets/img/formes/cylindre.svg');
// mask-image: url('/themes/custom/mathallo/assets/img/formes/cylindre.svg');
}
}
}
}
h4 a:hover{
color: $rose;
}
}
}
article.node-type-chapitre{
@@ -609,7 +686,7 @@ main[role="main"]{
@mixin front-card{
z-index: 2;
background-color: #fff;
&>*>*{
div.field>div:not(.field-label){
opacity: 1;
}
.field-label{
@@ -621,16 +698,18 @@ main[role="main"]{
@mixin back-card{
z-index: 1;
background-color: rgba(247,247,247,1);
// &>*>*{
// opacity: 0.6;
// }
div.field>div:not(.field-label){
opacity: 0.3;
}
.field-label{
color: inherit;
font-weight: 600;
background-color: rgba(247,247,247,1);
}
}
div.field>div:not(.field-label){
transition: all 0.3s ease-in-out;
}
&.field-principes-reflexion{
@include front-card();
}
@@ -678,9 +757,12 @@ main[role="main"]{
// |_| |_|\___/|_| |_|_____|
article.node-type-static[role="home-presentation"]{
// article.node-type-static[role="home-presentation"]{
// div.body{
}
// }
// }
div.views-home-chapitres{
// display: flex;
@@ -727,6 +809,15 @@ footer[role="contentinfo"]{
background-color: #fff;
box-shadow: 0 5px 15px #000;
padding: 0.2em 2em;
box-sizing: border-box;
position: relative;
div.wrapper{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
position: relative;
width: auto;
#block-mathallo-navigationprincipale-2{
ul{
display: flex;
@@ -741,6 +832,10 @@ footer[role="contentinfo"]{
}
}
}
div#block-mathallo-humanum{
// justify-self: end;
}
}
}
@@ -750,33 +845,88 @@ footer[role="contentinfo"]{
// | |_ / _ \ / _ \| __| '_ \ / _ \| __/ _ \/ __|
// | _| (_) | (_) | |_| | | | (_) | || __/\__ \
// |_| \___/ \___/ \__|_| |_|\___/ \__\___||___/
div.footnote__citations-wrapper{
display: inline;
.footnote__citation{
display: inline;
text-decoration: underline;
text-decoration-style: dashed;
cursor: pointer;
span.footnote-link{
pointer-events: none;
display: inline-block;
$icon_wh:1em;
width: $icon_wh; height: $icon_wh;
text-indent: $icon_wh * 2;
overflow: hidden;
vertical-align:baseline;
background-color: $rose;
// border: 1px solid red;
mask-image: url('/themes/custom/mathallo/assets/img/formes/supeg.svg');
mask-size: contain;
mask-position: center;
mask-repeat: no-repeat;
&.forme-pyramide{
mask-image: url('/themes/custom/mathallo/assets/img/formes/pyramide.svg');
}
&.forme-prct{
mask-image: url('/themes/custom/mathallo/assets/img/formes/prct.svg');
}
&.forme-pi{
mask-image: url('/themes/custom/mathallo/assets/img/formes/pi.svg');
}
&.forme-infinite{
mask-image: url('/themes/custom/mathallo/assets/img/formes/infinite.svg');
}
&.forme-supeg{
mask-image: url('/themes/custom/mathallo/assets/img/formes/supeg.svg');
}
&.forme-cone{
mask-image: url('/themes/custom/mathallo/assets/img/formes/cone.svg');
}
&.forme-croissant{
mask-image: url('/themes/custom/mathallo/assets/img/formes/croissant.svg');
}
&.forme-cube{
mask-image: url('/themes/custom/mathallo/assets/img/formes/cube.svg');
}
&.forme-diamant{
mask-image: url('/themes/custom/mathallo/assets/img/formes/diamant.svg');
}
&.forme-cylindre{
mask-image: url('/themes/custom/mathallo/assets/img/formes/cylindre.svg');
}
}
}
aside.footnote-content{
display:none;
// template.footnote-content{
// display:none;
// }
}
.fn-modale{
@include card;
// display: none;
opacity: 0;
transition: opacity 0.25s ease-in-out;
// transition-delay: ;
position: absolute;
// top:50%; left:50%;
z-index: 200;
max-width: 100em;
max-width: 40em;
padding:1em 1.5em 1em 1em;
border: 1px dashed $bleu_site;
margin: 0;
opacity: 0;
&.visible{
// display: block;
opacity: 1;
transition: opacity 0.25s ease-in-out;
}
img{
max-width: 100%;
height: auto;
}
}
@@ -0,0 +1,21 @@
@import "partials/colors";
@import "partials/fonts";
span.mathallo-site-name{
font-family: 'Fredoka';
text-transform:uppercase;
color: $bleu_site;
font-weight: 500;
}
span.footnotes-preview{
background-color: $rose;
}
p.lien-transversal a{
border: 1px dashed $bleu_site;
padding: 0.6em 0.8em;
border-radius: 7px;
color: $bleu_site;
}
+23
View File
@@ -0,0 +1,23 @@
import { createServer, build } from 'vite'
// Build watcher : écrit les fichiers dist sur disque en continu
const watcher = await build({
build: { watch: {} },
})
// Dev server : HMR sur localhost:5173
const server = await createServer()
await server.listen()
console.log('\n HMR actif + dist générés en watch\n')
const shutdown = async () => {
await Promise.allSettled([
watcher.close(),
server.close(),
])
process.exit(0)
}
process.on('SIGINT', shutdown)
process.on('SIGTERM', shutdown)
@@ -5,6 +5,8 @@ description: mathallo drupal theme based on stark
package: mathallo
core: 0.x
core_version_requirement: ^8 || ^9 || ^10
ckeditor5-stylesheets:
- assets/dist/wysiwyg.css
# libraries:
# - caravane/global
regions:
+1 -1
View File
@@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "node dev.mjs",
"build": "vite build",
"preview": "vite preview"
},
@@ -46,7 +46,7 @@
{% if label_hidden %}
{% if multiple %}
<div{{ attributes }}>
<div{{ attributes.addClass('field') }}>
{% for item in items %}
<div{{ item.attributes }}>{{ item.content }}</div>
{% endfor %}
@@ -57,7 +57,7 @@
{% endfor %}
{% endif %}
{% else %}
<div{{ attributes }}>
<div{{ attributes.addClass('field') }}>
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
@@ -1,7 +1,7 @@
{% apply footnotes_spaceless %}
{# footnotes/footnote-link.html.twig #}
<span class="footnote__citation js-footnote-citation" id="{{ fn.ref_id }}" data-content="{{ fn.text }}">
{{ fn.value|render|trim }}
{# <aside class="footnote-content">{{ fn.text }}</aside> #}
</span>
<div class="footnote__citation js-footnote-citation" id="{{ fn.ref_id }}">
<span class="footnote-link">{{ fn.value|render|trim }}</span>
<template class="footnote-content">{{ fn.text }}</template>
</div>
{% endapply %}
@@ -1,13 +1,12 @@
{% apply footnotes_spaceless %}
{# footnotes/footnote-links.html.twig #}
{%- if footnote_links -%}
<span class="footnote__citations-wrapper">
<div class="footnote__citations-wrapper">
{%- for footnote_link in footnote_links -%}
{% if not loop.first %}
<span class="footnote__citation-separator">, </span>
{% endif %}
{{ footnote_link }}
{%- endfor -%}
</span>
</div>
{%- endif -%}
{% endapply %}
@@ -65,9 +65,14 @@
<article{{ attributes }}>
{{ title_prefix }}
{% if label and not page %}
{# {% if label and not page %} #}
{% if label %}
<h2{{ title_attributes }}>
{% if not page %}
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
{% else %}
{{ label }}
{% endif %}
</h2>
{% endif %}
{{ title_suffix }}
@@ -6,6 +6,7 @@ import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue()],
server: {
hmr: {
host: 'localhost',
},
@@ -16,10 +17,13 @@ export default defineConfig({
build: {
outDir: 'assets/dist',
rollupOptions: {
input: 'assets/js/main.js',
input: {
main: 'assets/js/main.js',
wysiwyg: 'assets/scss/wysiwyg.scss',
},
output: {
entryFileNames: 'main.js',
assetFileNames: 'main.css'
entryFileNames: '[name].js',
assetFileNames: '[name].css',
}
}
},