From a443ad51ccf3a06a6b0f7d2c3d75c7d6012e4de7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 2 Jun 2020 10:47:00 +0200 Subject: [PATCH 1/3] Hack to add a warning for the documentation of master --- Documentation/doc/resources/1.8.13/menu_version.js | 9 +++++++++ Documentation/doc/resources/1.8.14/menu_version.js | 9 +++++++++ Documentation/doc/resources/1.8.4/menu_version.js | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 36b298ee045..64781b67e1d 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -23,6 +23,15 @@ ]; function build_select(current_version) { + if( current_version == 'master') { + let top_elt = document.getElementById("top"); + + let first_element = top_elt.childNodes[0]; + let new_div = document.createElement("p"); + new_div.innerHTML = '⚠️ This documentation corresponds to the master branch of CGAL, that is not yet released.'; + new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; width: max-content;" + let OK = top_elt.insertBefore(new_div, first_element); + } var buf = ['']; $.each(all_versions, function(id) { var version = all_versions[id]; diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index 36b298ee045..64781b67e1d 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -23,6 +23,15 @@ ]; function build_select(current_version) { + if( current_version == 'master') { + let top_elt = document.getElementById("top"); + + let first_element = top_elt.childNodes[0]; + let new_div = document.createElement("p"); + new_div.innerHTML = '⚠️ This documentation corresponds to the master branch of CGAL, that is not yet released.'; + new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; width: max-content;" + let OK = top_elt.insertBefore(new_div, first_element); + } var buf = ['']; diff --git a/Documentation/doc/resources/1.8.14/menu_version.js b/Documentation/doc/resources/1.8.14/menu_version.js index 4ccccdef247..0626471f903 100644 --- a/Documentation/doc/resources/1.8.14/menu_version.js +++ b/Documentation/doc/resources/1.8.14/menu_version.js @@ -28,8 +28,8 @@ let first_element = top_elt.childNodes[0]; let new_div = document.createElement("p"); - new_div.innerHTML = '⚠️ This documentation corresponds to the master branch of CGAL, that is not yet released.'; - new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; width: max-content;" + new_div.innerHTML = '⚠️ This documentation corresponds to the master development branch of CGAL. It might diverge from the official releases.'; + new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;" let OK = top_elt.insertBefore(new_div, first_element); } var buf = [''];