From 5df1fac8be73beaf1efea50a13dc14a335913317 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 11 Feb 2025 14:29:44 +0000 Subject: [PATCH] Attempted fix for custom theming --- docker-compose.yaml | 5 +- .../theme}/globals/site.variables | 151 +++++++++++++++++- .../less/site/globals/site.overrides | 7 - 3 files changed, 147 insertions(+), 16 deletions(-) rename invenio_assets/less/{site => invenio_app_rdm/theme}/globals/site.variables (53%) delete mode 100644 invenio_assets/less/site/globals/site.overrides diff --git a/docker-compose.yaml b/docker-compose.yaml index 6f7a61e..57f87c1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -35,9 +35,8 @@ services: - uploaded_data:/opt/invenio/var/instance/data - archived_data:/opt/invenio/var/instance/archive - ./invenio_assets:/opt/invenio/var/instance/static/custom_assets # Add static assets for theming - # Add global theming overrides - - ./invenio_assets/less/site/globals/site.overrides:/opt/invenio/var/instance/assets/less/site/globals/site.overrides - - ./invenio_assets/less/site/globals/site.variables:/opt/invenio/var/instance/assets/less/site/globals/site.variables + # Add theming overrides + - ./invenio_assets/less/site/theme/globals/site.variables:/opt/invenio/var/instance/assets/less/invenio_app_rdm/theme/globals/site.variables environment: # Flask - INVENIO_APP_ALLOWED_HOSTS=${INVENIO_APP_ALLOWED_HOSTS:-['0.0.0.0', 'localhost', '127.0.0.1']} diff --git a/invenio_assets/less/site/globals/site.variables b/invenio_assets/less/invenio_app_rdm/theme/globals/site.variables similarity index 53% rename from invenio_assets/less/site/globals/site.variables rename to invenio_assets/less/invenio_app_rdm/theme/globals/site.variables index 4d837bb..927e6e0 100644 --- a/invenio_assets/less/site/globals/site.variables +++ b/invenio_assets/less/invenio_app_rdm/theme/globals/site.variables @@ -1,3 +1,148 @@ +/*********************************************** + Invenio App RDM Site Variables +***********************************************/ + +/*------------------- + Brand Colors +--------------------*/ + +@primaryColor: #0377cd; +@secondaryColor: #fb8273; +@featuredListBackgroundColor: #4899DB; +@primaryDarkenColor: #0267b2; + +// backwards compatibility +@brandColor: @primaryColor; +@brand-primary:@primaryColor; + + +/*------------------- + Site Colors +--------------------*/ + +@darkGray: #333; +@green: #048622; +@signupColor: @green; + +@accessRightOpen: @green; +@accessRightRestricted: @red; +@accessRightEmbargoed: @yellow; +@accessRightMetadataOnly: @teal; + +@restricted-components-background-color: #feeaea; +@restricted-components-border-color: #e0b4b4; +@embargoed-components-background-color: #fbf8ee; +@embargoed-components-border-color: #c9ba9b; + +@footerLightColor: #009990; +@footerDarkColor: #090541; +@subFooterColor: #074799; +@footerTextLightColor: @ffffff; +@footerTextDarkColor: @ffffff; + +@errorTextColor: #9f3a38; +@focusedFormBorderColor: #2185d0; +@focusedFormMutedBorderColor: #2185d0; + +@highlightHeaderColor: #ededed; +@highlightBackgroundColor: @highlightHeaderColor; +@highlightBackgroundColorHover: darken(saturate(@highlightHeaderColor, 20), 15, relative); +@highlightLandingPageBackgroundColor: rgba(173, 206, 224, 0.52); +@selectedColor: #ededed; + + +@navbarBackgroundImage: linear-gradient( + 12deg, + rgba(3, 119, 205, 1), + rgba(3, 119, 205, 1) 15%, + rgba(251, 130, 115, 0.69) +); +@navbarBackgroundColor: #090541; + +@versionActiveColor: #d9edf7; + +@mutedAccordionHeaderColor: #f5f5f5; +@defaultBrandColor: #434C5E; + + +/*------------------- + Links +--------------------*/ + +@linkColor: #005b9e; +@linkUnderline: none; +@linkHoverColor: darken(saturate(@linkColor, 20), 15, relative); +@linkHoverUnderline: underline; + + +/*------------------- + Breakpoints +--------------------*/ +@mobileBreakpoint : 320px; +@tabletBreakpoint : 768px; +@computerBreakpoint : 1300px; +@largeMonitorBreakpoint : 1680px; +@widescreenMonitorBreakpoint : 1920px; + +/*------------------- + Fonts +--------------------*/ + + +@fontSizeBase: 14px; +@font-size-small: 12px; +@font-size-tiny: 10px; +@font-size-massive: 36px; +@fontName: 'Helvetica'; + + +/*------------------- + Em Sizes +--------------------*/ + +@75px : unit( (75 / @emSize), rem); +@relative75px : unit( (75 / @emSize), em); + + +/*------------------- + negative spacing +--------------------*/ +@coverPageDefaultMargin: 0; + + +/* borders */ + +@dashedBorder: 2px dashed @borderColor; +@defaultBorder: 1px solid @solidBorderColor; + +/*------------------ + checkboxes +------------------*/ + +@checkboxSize: @relative17px; + +/*------------------ + tables +------------------*/ + +@cellVerticalPadding: @relativeMini; +@cellHorizontalPadding: @relativeMini; + + +/*------------------ + Images +------------------*/ + +@userDashboardAvatarSize: 40px; +@communityItemLogoWidth: 115px; + + +/*------------------ + Separators +------------------*/ +@listSeparator: ";"; +@listCommaSeparator: ","; + /*********************************************** AM-D-Model Invenio Site Variables ***********************************************/ @@ -122,9 +267,3 @@ @primaryLabelColor: @darkPrimaryColor; @navbarBackgroundImage: e(""); // remove background image -@navbarBackgroundColor: #090541; -@footerLightColor: #009990; -@footerDarkColor: #090541; -@subFooterColor: #074799; -@footerTextLightColor: @white; -@footerTextDarkColor: @white; diff --git a/invenio_assets/less/site/globals/site.overrides b/invenio_assets/less/site/globals/site.overrides deleted file mode 100644 index d92811e..0000000 --- a/invenio_assets/less/site/globals/site.overrides +++ /dev/null @@ -1,7 +0,0 @@ -/*********************************************** - AM-D-Model Invenio Overrides -***********************************************/ - -html.cover-page { - background-color: #090541; -}