From 264d71218bd7a404333b89b91f1803c9e584287d Mon Sep 17 00:00:00 2001 From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr> Date: Tue, 14 Jan 2025 17:57:38 +0100 Subject: [PATCH] Comment work (popover) --- macao/assets/_custom.scss | 19 +++++++++++++++++++ macao/assets/custom.js | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/macao/assets/_custom.scss b/macao/assets/_custom.scss index d413c45..c90b851 100644 --- a/macao/assets/_custom.scss +++ b/macao/assets/_custom.scss @@ -95,3 +95,22 @@ select.sd-dropdown.inline-dropdown, input.sd-input.inline-input { padding: 0px 5px; background-color: var(--secondary-background-color); } + +// *********************************** +// Comment on page +// *********************************** + +.comment-trigger { + cursor: pointer; + color: var(--macao-primary-color); + text-decoration: underline; +} + +.commentaireInfo { + padding: 10px; + border-radius: 10px; + background-color: var(--secondary-background-color); + border: 1px solid var(--macao-primary-color); + color: black; + max-width: 500px; +} diff --git a/macao/assets/custom.js b/macao/assets/custom.js index 2e7e51f..11e8303 100644 --- a/macao/assets/custom.js +++ b/macao/assets/custom.js @@ -6,4 +6,13 @@ $(document).ready(function() { // Add Title on top of the page $('.book-header').show(); + + $('.commentaireInfo').hide(); + $('.commentaireInfo').prop('popover', 'true'); + $('.commentaireInfoGroup').show(); + + $('[spanid]').addClass('comment-trigger').on('click', function() { + let spanid = $(this).attr('spanid'); + $("[commentaireid=" + spanid + "]").toggle(); + }); }); -- GitLab