From fb490f8ac8ccc78b6a37c0a256e9ebbd2d093dc9 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 22 Apr 2021 19:08:37 +0200 Subject: [PATCH] description complete sur mouseover --- module/rdd-utility.js | 2 ++ styles/simple.css | 10 ++++++++++ templates/dialog-roll-chant.html | 2 +- templates/dialog-roll-danse.html | 2 +- templates/dialog-roll-jeu.html | 2 +- templates/dialog-roll-musique.html | 2 +- templates/dialog-roll-oeuvre.html | 2 +- templates/dialog-roll-recettecuisine.html | 8 ++------ templates/partial-description-overflow.html | 8 ++++++++ 9 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 templates/partial-description-overflow.html diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 5d690f0c..2efb0b21 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -157,6 +157,7 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-alchimie.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', // Partials + 'systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html', 'systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.html', 'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html', 'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html', @@ -164,6 +165,7 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html', 'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html', 'systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html', + // Calendrier 'systems/foundryvtt-reve-de-dragon/templates/calendar-template.html', 'systems/foundryvtt-reve-de-dragon/templates/calendar-editor-template.html', diff --git a/styles/simple.css b/styles/simple.css index d7fdb732..08607232 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -447,6 +447,16 @@ table {border: 1px solid #7a7971;} font-size: 0.70rem; text-align: right; } +.poesie-overflow { + color: rgba(82, 17, 131, 0.9); + max-height: 2.5rem; + overflow: hidden; +} +.poesie-overflow:hover { + max-height: unset; + overflow: visible; +} + /* ======================================== */ /* Sheet */ .window-app.sheet .window-content .sheet-header{ diff --git a/templates/dialog-roll-chant.html b/templates/dialog-roll-chant.html index 74eab22e..df2482cb 100644 --- a/templates/dialog-roll-chant.html +++ b/templates/dialog-roll-chant.html @@ -8,7 +8,7 @@ - {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/dialog-roll-danse.html b/templates/dialog-roll-danse.html index 20025e53..d9507232 100644 --- a/templates/dialog-roll-danse.html +++ b/templates/dialog-roll-danse.html @@ -8,7 +8,7 @@ {{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
- {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/dialog-roll-jeu.html b/templates/dialog-roll-jeu.html index 8cac1127..1318700d 100644 --- a/templates/dialog-roll-jeu.html +++ b/templates/dialog-roll-jeu.html @@ -18,7 +18,7 @@
- {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/dialog-roll-musique.html b/templates/dialog-roll-musique.html index 1ff59d94..6455e3d1 100644 --- a/templates/dialog-roll-musique.html +++ b/templates/dialog-roll-musique.html @@ -8,7 +8,7 @@ - {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/dialog-roll-oeuvre.html b/templates/dialog-roll-oeuvre.html index bcaf114b..45d23f49 100644 --- a/templates/dialog-roll-oeuvre.html +++ b/templates/dialog-roll-oeuvre.html @@ -9,7 +9,7 @@
- {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/dialog-roll-recettecuisine.html b/templates/dialog-roll-recettecuisine.html index a8316dbb..ab977783 100644 --- a/templates/dialog-roll-recettecuisine.html +++ b/templates/dialog-roll-recettecuisine.html @@ -1,9 +1,5 @@
-

Cuisiner: {{oeuvre.name}} -
- {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} -
-

+

Cuisiner: {{oeuvre.name}}

@@ -38,7 +34,7 @@
- + {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
diff --git a/templates/partial-description-overflow.html b/templates/partial-description-overflow.html new file mode 100644 index 00000000..11b4b2ad --- /dev/null +++ b/templates/partial-description-overflow.html @@ -0,0 +1,8 @@ +{{#if (or description reference)}} +
+ {{{description}}} + {{#if reference}} +

{{reference}}

+ {{/if}} +
+{{/if}}