From a69f06b6188d9d1f31ded190bcdcb3dcc864da68 Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Mon, 15 Jan 2024 21:34:58 +0200 Subject: [PATCH] Add css for publication page embedding && add json code highlighting --- docusaurus.config.js | 3 +++ src/css/custom.css | 50 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 7c2b70d..46adc0e 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -141,6 +141,9 @@ const config = { prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, + additionalLanguages: [ + 'json' + ] }, matomo: { matomoUrl: 'https://analytics.openaire.eu/', diff --git a/src/css/custom.css b/src/css/custom.css index 81feb5f..b802f95 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -72,3 +72,53 @@ height: var(--ifm-navbar-height); } +/* custom css classes to embed publications pages in an iframel; adjusts look and feel with docusaurus-data-x query-string parameters */ +html[data-embed-publications='true'] .navbar { + display: none; +} + +html[data-embed-publications='true'] .theme-doc-toc-desktop { + display: none; +} + +html[data-embed-publications='true'] .theme-doc-sidebar-container { + display: none; +} + +html[data-embed-publications='true'] .theme-doc-breadcrumbs{ + display: none; +} + +html[data-embed-publications='true'] .theme-doc-version-badge { + display: none; +} + +/* intended to remove header in publications */ +html[data-embed-publications='true'] .theme-doc-markdown h1 { + display: none; +} + +html[data-embed-publications='true'] .theme-doc-toc-mobile { + display: none; +} + +html[data-embed-publications='true'] .pagination-nav { + display: none; +} + +html[data-embed-publications='true'] .footer { + display: none; +} + +html[data-embed-publications='true'] .container > .row > .col--3 { + display: none; +} + +html[data-embed-publications='true'] { + --ifm-background-color: #fff; +} + + +html[data-embed-publications='true'] .theme-admonition-note { + background-color: #f5f5f5; +}