From 0e7728ef03f4208deff2907ed55d7e6763ac8f07 Mon Sep 17 00:00:00 2001
From: Pascal Palenda <pascal.palenda@akustik.rwth-aachen.de>
Date: Wed, 15 Feb 2023 09:43:20 +0100
Subject: [PATCH] Add global variable for doc styles and logo

---
 src/BuildDoc.cmake     |   9 +-
 src/resources/rwth.css | 191 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+), 2 deletions(-)
 create mode 100644 src/resources/rwth.css

diff --git a/src/BuildDoc.cmake b/src/BuildDoc.cmake
index 4fec7d8..569bd2f 100644
--- a/src/BuildDoc.cmake
+++ b/src/BuildDoc.cmake
@@ -5,6 +5,11 @@ find_package (
 	COMPONENTS dot
 	OPTIONAL_COMPONENTS mscgen dia
 )
+
+set(IHTA_CMAKE_COMMON_DOCSTYLE_LANDED ${CMAKE_CURRENT_LIST_DIR}/resources/landed.css)
+set(IHTA_CMAKE_COMMON_DOCSTYLE_RWTH ${CMAKE_CURRENT_LIST_DIR}/resources/rwth.css)
+set(IHTA_CMAKE_COMMON_DOC_LOGO ${CMAKE_CURRENT_LIST_DIR}/resources/ihta.svg)
+
 #[=======================================================================[.rst:
 ..command:: build_doc
 
@@ -104,7 +109,7 @@ macro (build_doc)
 		if (DEFINED DOXY_COLOR_STYLE)
 			list (APPEND DOXYGEN_HTML_EXTRA_STYLESHEET ${DOXY_COLOR_STYLE})
 		else ()
-			list (APPEND DOXYGEN_HTML_EXTRA_STYLESHEET ${CMAKE_CURRENT_LIST_DIR}/resources/landed.css)
+			list (APPEND DOXYGEN_HTML_EXTRA_STYLESHEET ${IHTA_CMAKE_COMMON_DOCSTYLE_LANDED})
 		endif ()
 
 		set (DOXYGEN_HTML_COLORSTYLE_HUE 209)
@@ -128,7 +133,7 @@ macro (build_doc)
 			set (DOXYGEN_PROJECT_LOGO ${DOXY_LOGO})
 			list (APPEND DOXYGEN_HTML_EXTRA_FILES ${DOXY_LOGO})
 		else ()
-			set (DOXY_LOGO ${CMAKE_CURRENT_LIST_DIR}/resources/ihta.svg)
+			set (DOXY_LOGO ${IHTA_CMAKE_COMMON_DOC_LOGO})
 			set (DOXYGEN_PROJECT_LOGO ${DOXY_LOGO})
 			list (APPEND DOXYGEN_HTML_EXTRA_FILES ${DOXY_LOGO})
 		endif ()
diff --git a/src/resources/rwth.css b/src/resources/rwth.css
new file mode 100644
index 0000000..181e8b8
--- /dev/null
+++ b/src/resources/rwth.css
@@ -0,0 +1,191 @@
+html {
+    /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */
+    --primary-color: #00549F;
+    --primary-dark-color: #407FB7;
+    --primary-light-color: #8EBAE5;
+
+    /* page base colors */
+    --page-background-color: white;
+    --page-foreground-color: #646567;
+    --page-secondary-foreground-color: #9C9E9F;
+
+    /* color for all separators on the website: hr, borders, ... */
+    --separator-color: #ECEDED;
+
+    /* default box shadow used for raising an element above the normal content. Used in dropdowns, Searchresult, ... */
+    --box-shadow: 0 2px 8px 0 rgba(0,0,0,.075);
+
+    --odd-color: rgba(0,0,0,.028);
+
+    /* font-families. will affect all text on the website
+     * font-family: the normal font for text, headlines, menus
+     * font-family-monospace: used for preformatted text in memtitle, code, fragments
+     */
+    --font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
+    --font-family-monospace: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
+
+    /* colors for various content boxes: @warning, @note, @deprecated @bug */
+    --warning-color: #FEEAC9;
+    --warning-color-dark: #F6A800;
+    --warning-color-darker: #D85C41;
+    --note-color: #D2C0CD;
+    --note-color-dark: #834E75;
+    --note-color-darker: #612158;
+    --todo-color: #BFD0D1;
+    --todo-color-dark: #2D7F83;
+    --todo-color-darker: #006165;
+    --deprecated-color: #ECEDED;
+    --deprecated-color-dark: #9C9E9F;
+    --deprecated-color-darker: #646567;
+    --bug-color: #FAEBE3;
+    --bug-color-dark: #CC071E;
+    --bug-color-darker: #A11035;
+    --invariant-color: #DDEBCE;
+    --invariant-color-dark: #8DC060;
+    --invariant-color-darker: #57AB27;
+
+    /* blockquote colors */
+    --blockquote-background: #ECEDED;
+    --blockquote-foreground: #9C9E9F;
+
+    /* table colors */
+    --tablehead-background: #ECEDED;
+    --tablehead-foreground: var(--page-foreground-color);
+
+    /* code block colors */
+    --code-background: #ECEDED;
+    --code-foreground: var(--page-foreground-color);
+
+    /* fragment colors */
+    --fragment-background: #ECEDED;
+    --fragment-foreground: #646567;
+    --fragment-keyword: #F19EB1;
+    --fragment-keywordtype: #9B91C1;
+    --fragment-keywordflow: #F6A800;
+    --fragment-token: #57AB27;
+    --fragment-comment: #9C9E9F;
+    --fragment-link: #407FB7;
+    --fragment-preprocessor: #BFD0D1;
+    --fragment-linenumber-color: #646567;
+    --fragment-linenumber-background: #ECEDED;
+    --fragment-linenumber-border: #CFD1D2;
+    --fragment-lineheight: 20px;
+
+    /* sidebar navigation (treeview) colors */
+    --side-nav-background: #ECEDED;
+    --side-nav-foreground: var(--page-foreground-color);
+    --side-nav-arrow-opacity: 0;
+    --side-nav-arrow-hover-opacity: 0.9;
+}
+
+/* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */
+html.dark-mode {
+    color-scheme: dark;
+
+    --primary-color: #8EBAE5;
+    --primary-dark-color: #8EBAE5;
+    --primary-light-color: #00549F;
+
+    --box-shadow: 0 2px 8px 0 rgba(0,0,0,.30);
+
+    --odd-color: rgba(200,200,200,.06);
+
+    --menu-selected-background: rgba(0,0,0,.4);
+
+    --code-background: #646567;
+
+    --tablehead-background: #646567;
+
+    --blockquote-background: #646567;
+    --blockquote-foreground: #9C9E9F;
+
+    --warning-color: #F6A800;
+    --warning-color-dark: #D85C41;
+    --warning-color-darker: #FFF7EA;
+    --note-color: #834E75;
+    --note-color-dark: #612158;
+    --note-color-darker: #D2C0CD;
+    --todo-color: #006165;
+    --todo-color-dark: #006165;
+    --todo-color-darker: #BFD0D1;
+    --deprecated-color: #646567;
+    --deprecated-color-dark: #9C9E9F;
+    --deprecated-color-darker: #ECEDED;
+    --bug-color: #D85C41;
+    --bug-color-dark: #A11035;
+    --bug-color-darker: #FAEBE3;
+    --invariant-color: #B8D698;
+    --invariant-color-dark: #57AB27;
+    --invariant-color-darker: #F2F7EC;
+
+    --fragment-background: #646567;
+    --fragment-foreground: #ECEDED;
+    --fragment-keyword: #F9D2DA;
+    --fragment-keywordtype: #DEDAEB;
+    --fragment-keywordflow: #FDD48F;
+    --fragment-token: #E0E69A;
+    --fragment-comment: #CAE7E7;
+    --fragment-link: #D2C0CD;
+    --fragment-preprocessor: #FFF59B;
+    --fragment-linenumber-color: #CFD1D2;
+    --fragment-linenumber-background: #9C9E9F;
+    --fragment-linenumber-border: #000000;
+}
+
+.memtemplate {
+    color: var(--primary-color);
+}
+
+.memTemplParams {
+    color: var(--primary-color);
+    border-top: 1px solid var(--separator-color);
+    border-left: 1px solid var(--separator-color);
+    border-right: 1px solid var(--separator-color);
+    border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
+}
+
+.memTemplItemRight {
+    border-bottom: 1px solid var(--separator-color);
+    border-right: 1px solid var(--separator-color);
+    border-bottom-right-radius: var(--border-radius-small);
+}
+
+.memTemplItemLeft {
+    border-bottom: 1px solid var(--separator-color);
+    border-left: 1px solid var(--separator-color);
+    border-bottom-left-radius: var(--border-radius-small);
+}
+
+div.header {
+    border-bottom: 0;
+}
+
+h2.groupheader {
+    box-shadow: none;
+}
+
+@media screen and (min-width: 768px) {
+    .ui-resizable-handle {
+        box-shadow: none;
+    }
+}
+
+.ui-resizable-e {
+    width: 0.2rem;
+    background: transparent;
+}
+
+#nav-path ul{
+    border: none;
+    /* border-left: 1px solid var(--separator-color); */
+}
+
+.contents hr {
+    height: 1px;
+    background-color: var(--separator-color);
+    box-shadow: none;
+}
+
+#top {
+    border-bottom: none;
+}
\ No newline at end of file
-- 
GitLab