From 12be376975f55fe1ee118bca6d7ae5f699a881a4 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sat, 16 Mar 2024 21:40:17 +0100 Subject: Add license page --- docusaurus.config.ts | 10 +- package.json | 2 + src/components/landing/sections/Hero.tsx | 2 + .../landing/sections/Publications.module.css | 9 - src/components/landing/sections/Publications.tsx | 74 +++---- src/components/landing/sections/Research.tsx | 2 + src/components/landing/sections/Resume.module.css | 10 + src/components/landing/sections/Resume.tsx | 21 +- src/components/licenses.module.css | 30 +++ src/components/licenses.tsx | 92 +++++++++ src/css/custom.css | 3 +- src/pages/license.mdx | 67 ++++++ src/theme/Footer/Copyright.jsx | 44 ++++ src/theme/Footer/Copyright.module.css | 15 ++ src/theme/NavbarItem/NavbarNavLink.jsx | 1 + yarn.lock | 224 +++++++++++++++++++++ 16 files changed, 540 insertions(+), 66 deletions(-) create mode 100644 src/components/licenses.module.css create mode 100644 src/components/licenses.tsx create mode 100644 src/pages/license.mdx create mode 100644 src/theme/Footer/Copyright.jsx create mode 100644 src/theme/Footer/Copyright.module.css diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 26aea29..a6b8903 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -9,6 +9,7 @@ import type { PluginOptions as ClassicThemeOptions } from '@docusaurus/theme-cla import type { UserThemeConfig } from '@docusaurus/theme-common'; import type { Config } from '@docusaurus/types'; import { Config as SwcConfig } from '@swc/core'; +import smartypants from 'remark-smartypants'; export default { title: 'Kristóf Marussy', @@ -16,7 +17,12 @@ export default { baseUrl: '/', staticDirectories: ['third-party/static', 'static'], plugins: [ - '@docusaurus/plugin-content-pages', + [ + '@docusaurus/plugin-content-pages', + { + remarkPlugins: [[smartypants, { dashes: 'oldschool' }]], + }, + ], '@docusaurus/plugin-sitemap', './src/plugins/swcMinifyPlugin.ts', './src/plugins/thirdPartyContentPlugin.ts', @@ -68,7 +74,7 @@ export default { { label: 'CV', to: 'pathname:///cv.pdf', - } + }, ], }, footer: { diff --git a/package.json b/package.json index 4dfdd65..f2a8dfc 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,14 @@ "@docusaurus/theme-classic": "^3.1.1", "@docusaurus/theme-common": "^3.1.1", "@fontsource-variable/recursive": "^5.0.17", + "@mdx-js/react": "^3.0.1", "@phosphor-icons/react": "2.0.15", "@swc/core": "^1.4.8", "clsx": "^2.1.0", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", + "remark-smartypants": "^2.1.0", "simple-icons": "^11.8.0", "swc-loader": "^0.2.6", "terser-webpack-plugin": "^5.3.10", diff --git a/src/components/landing/sections/Hero.tsx b/src/components/landing/sections/Hero.tsx index 4974285..2773b9b 100644 --- a/src/components/landing/sections/Hero.tsx +++ b/src/components/landing/sections/Hero.tsx @@ -2,6 +2,8 @@ * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy * * SPDX-License-Identifier: MIT AND CC-BY-4.0 + * + * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed. */ import Link from '@docusaurus/Link'; diff --git a/src/components/landing/sections/Publications.module.css b/src/components/landing/sections/Publications.module.css index c9a39ba..9ef368b 100644 --- a/src/components/landing/sections/Publications.module.css +++ b/src/components/landing/sections/Publications.module.css @@ -12,15 +12,6 @@ white-space: nowrap; } -.link--license { - --ifm-link-color: var(--ifm-color-secondary-contrast-foreground); - --ifm-link-hover-color: var(--ifm-link-color); -} - -[data-theme='dark'] .link--license { - --ifm-link-color: var(--ifm-color-emphasis-500); -} - .link--lower { text-transform: lowercase; } diff --git a/src/components/landing/sections/Publications.tsx b/src/components/landing/sections/Publications.tsx index 90c058e..068ec49 100644 --- a/src/components/landing/sections/Publications.tsx +++ b/src/components/landing/sections/Publications.tsx @@ -1,22 +1,16 @@ /* * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy * - * SPDX-License-Identifier: MIT + * SPDX-License-Identifier: MIT AND CC-BY-4.0 + * + * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed. */ import Link from '@docusaurus/Link'; -import { - ArrowSquareOut, - Certificate, - File, - Lock, - Package, - Play, -} from '@phosphor-icons/react'; +import { ArrowSquareOut, File, Package, Play } from '@phosphor-icons/react'; import clsx from 'clsx'; import { - CreativeCommonsIcon, DBLPIcon, GoogleScholarIcon, MTMTIcon, @@ -26,6 +20,11 @@ import { import Section from '@site/src/components/landing/Section'; import Subtitle from '@site/src/components/landing/Subtitle'; import authorizedLinks from '@site/src/components/landing/sections/authorizedLinks'; +import { + CCLicenseLink, + ClosedAccessLink, + LicenseLink, +} from '@site/src/components/licenses'; import styles from './Publications.module.css'; @@ -101,59 +100,40 @@ function ClosedAccess({ url: string; authorizedURL?: string | undefined; }) { - const label = ( - <> -