Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ff2balex
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lex gaMe
ff2balex
Commits
cd6332be
Commit
cd6332be
authored
5 months ago
by
Lucie Bader
Browse files
Options
Downloads
Patches
Plain Diff
Correction affichage tooltips
parent
f66780c1
No related branches found
No related tags found
2 merge requests
!8
Test final
,
!5
Ajout manuel d'un mot dans un ou plusieurs lexique(s)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
barre_latérale/sidebar.html
+36
-4
36 additions, 4 deletions
barre_latérale/sidebar.html
barre_latérale/sidebar.js
+18
-11
18 additions, 11 deletions
barre_latérale/sidebar.js
with
54 additions
and
15 deletions
barre_latérale/sidebar.html
+
36
−
4
View file @
cd6332be
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
background-color
:
rgba
(
0
,
0
,
0
,
0.75
);
background-color
:
rgba
(
0
,
0
,
0
,
0.75
);
color
:
#fff
;
color
:
#fff
;
font-size
:
1
2
px
!important
;
font-size
:
1
4
px
!important
;
font-weight
:
lighter
!important
;
font-weight
:
lighter
!important
;
padding
:
6px
10px
;
padding
:
6px
10px
;
border-radius
:
5px
;
border-radius
:
5px
;
...
@@ -238,7 +238,6 @@
...
@@ -238,7 +238,6 @@
background
:
none
;
background
:
none
;
border
:
none
;
border
:
none
;
cursor
:
pointer
;
cursor
:
pointer
;
font-size
:
16px
;
padding
:
2px
;
padding
:
2px
;
transition
:
transform
0.2s
ease-in-out
;
transition
:
transform
0.2s
ease-in-out
;
width
:
15%
;
width
:
15%
;
...
@@ -251,13 +250,46 @@
...
@@ -251,13 +250,46 @@
filter
:
brightness
(
0
)
saturate
(
100%
)
invert
(
40%
)
sepia
(
0%
)
saturate
(
0%
)
hue-rotate
(
0deg
);
filter
:
brightness
(
0
)
saturate
(
100%
)
invert
(
40%
)
sepia
(
0%
)
saturate
(
0%
)
hue-rotate
(
0deg
);
transition
:
filter
0.3s
ease-in-out
;
transition
:
filter
0.3s
ease-in-out
;
}
}
.lexique-highlight-toggle
[
data-active
=
"true"
]
.feutre-icon
{
.lexique-highlight-toggle
[
data-active
=
"true"
]
.feutre-icon
{
filter
:
brightness
(
0
)
saturate
(
100%
)
invert
(
83%
)
sepia
(
89%
)
saturate
(
588%
)
hue-rotate
(
360deg
);
filter
:
brightness
(
0
)
saturate
(
100%
)
invert
(
83%
)
sepia
(
89%
)
saturate
(
588%
)
hue-rotate
(
360deg
);
}
}
.lexique-highlight-toggle
:hover
{
transform
:
scale
(
1.1
);
/* Cibler les tooltips à l'intérieur d'un bouton de surlignage */
button
.lexique-highlight-toggle
.tooltip
{
/* Réinitialiser toute influence du style global du bouton */
all
:
unset
;
/* Appliquer les styles désirés pour le tooltip */
display
:
block
;
box-sizing
:
border-box
;
position
:
absolute
;
bottom
:
120%
;
left
:
50%
;
transform
:
translateX
(
-50%
)
translateY
(
-5px
);
background-color
:
rgba
(
0
,
0
,
0
,
0.75
);
color
:
#fff
;
font-size
:
14px
;
font-weight
:
lighter
;
padding
:
6px
10px
;
border-radius
:
5px
;
white-space
:
normal
;
overflow-wrap
:
break-word
;
width
:
180px
;
text-align
:
center
;
opacity
:
0
;
transition
:
opacity
0.3s
ease-in-out
,
transform
0.2s
ease-in-out
;
pointer-events
:
none
;
z-index
:
10
;
line-height
:
normal
;
}
/* Lors du survol du conteneur, afficher le tooltip */
button
.lexique-highlight-toggle
:hover
.tooltip
{
opacity
:
1
;
transform
:
translateX
(
-50%
)
translateY
(
-5px
);
}
}
/* Autres styles divers */
/* Autres styles divers */
.lexicon-section
{
.lexicon-section
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
...
...
This diff is collapsed.
Click to expand it.
barre_latérale/sidebar.js
+
18
−
11
View file @
cd6332be
...
@@ -278,24 +278,31 @@ function displayLexiconsWithCheckbox(lexicons) {
...
@@ -278,24 +278,31 @@ function displayLexiconsWithCheckbox(lexicons) {
lexiquesContainer
.
appendChild
(
lexiqueDiv
);
lexiquesContainer
.
appendChild
(
lexiqueDiv
);
});
});
// Ajustement dynamique des tooltips
pour éviter qu'ils ne soient coupés
// Ajustement dynamique des tooltips
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
menu
=
document
.
getElementById
(
"
menu
"
);
const
menuRect
=
menu
.
getBoundingClientRect
();
const
containers
=
document
.
querySelectorAll
(
'
.tooltip-container
'
);
const
containers
=
document
.
querySelectorAll
(
'
.tooltip-container
'
);
const
menuRect
=
document
.
getElementById
(
"
menu
"
).
getBoundingClientRect
();
containers
.
forEach
(
container
=>
{
containers
.
forEach
(
container
=>
{
container
.
classList
.
remove
(
'
left
'
,
'
right
'
);
const
tooltip
=
container
.
querySelector
(
'
.tooltip
'
);
const
rect
=
container
.
getBoundingClientRect
();
if
(
!
tooltip
)
return
;
// Si le conteneur est trop proche du bord gauche du menu
if
(
rect
.
left
<
menuRect
.
left
+
50
)
{
tooltip
.
style
.
left
=
'
50%
'
;
container
.
classList
.
add
(
"
left
"
);
tooltip
.
style
.
transform
=
'
translateX(-50%) translateY(-5px)
'
;
const
tooltipRect
=
tooltip
.
getBoundingClientRect
();
if
(
tooltipRect
.
left
<
menuRect
.
left
)
{
const
overflowLeft
=
menuRect
.
left
-
tooltipRect
.
left
;
tooltip
.
style
.
transform
=
`translateX(calc(-100% +
${
overflowLeft
}
px)) translateY(-5px)`
;
}
}
// Si le conteneur est trop proche du bord droit du menu
else
if
(
tooltipRect
.
right
>
menuRect
.
right
)
{
else
if
(
r
ect
.
right
>
menuRect
.
right
-
50
)
{
const
overflowRight
=
tooltipR
ect
.
right
-
menuRect
.
right
;
container
.
classList
.
add
(
"
right
"
)
;
tooltip
.
style
.
transform
=
`translateX(calc(-100% -
${
overflowRight
}
px)) translateY(-5px)`
;
}
}
});
});
},
100
);
},
100
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment