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 = (
- <>
-
- Closed Access:
- {publisher}
- >
- );
- if (authorizedURL !== undefined) {
- // Must allow referrer for the ACM Author-Izer to work.
- return (
-
- {label}
-
- );
- }
return (
-
- {label}
-
+ {publisher}
+
);
}
function OpenAccess({ license }: { license: string }) {
const url = `https://creativecommons.org/licenses/${license}/4.0/`;
return (
-
-
- Open Access:
+
CC-{license.toUpperCase()}-4.0
-
+
);
}
function ArtifactLicense({ license, url }: { license: string; url: string }) {
return (
-
-
- Artifact license:
+
{license}
-
+
);
}
diff --git a/src/components/landing/sections/Research.tsx b/src/components/landing/sections/Research.tsx
index ea6f076..a295419 100644
--- a/src/components/landing/sections/Research.tsx
+++ b/src/components/landing/sections/Research.tsx
@@ -2,6 +2,8 @@
* SPDX-FileCopyrightText: 2023 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 clsx from 'clsx';
diff --git a/src/components/landing/sections/Resume.module.css b/src/components/landing/sections/Resume.module.css
index fb576a1..3293add 100644
--- a/src/components/landing/sections/Resume.module.css
+++ b/src/components/landing/sections/Resume.module.css
@@ -129,6 +129,16 @@
color: var(--ifm-color-emphasis-500);
}
+.cv__muted-link {
+ white-space: nowrap;
+ --ifm-link-color: var(--ifm-color-secondary-contrast-foreground);
+ --ifm-link-hover-color: var(--ifm-link-color);
+}
+
+[data-theme='dark'] .cv__muted-link {
+ --ifm-link-color: var(--ifm-color-emphasis-500);
+}
+
.cv__activities {
margin: 1em 0;
}
diff --git a/src/components/landing/sections/Resume.tsx b/src/components/landing/sections/Resume.tsx
index 6e2bc69..bac2bde 100644
--- a/src/components/landing/sections/Resume.tsx
+++ b/src/components/landing/sections/Resume.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';
@@ -40,13 +42,18 @@ function Education() {
-
- Some poritions may be exclusively licensed to their original
- publishers
+
+
+ Some poritions may be exclusively licensed to their original
+ publishers
+
+
+ {label ?? 'License'}:
+ {children}
+
+ );
+}
+
+export function MITLicenseLink() {
+ return MIT;
+}
+
+export function CCLicenseLink({ children, label, ...props }: LicenseLinkProps) {
+ return (
+
+
+ {label ?? 'Creative Commons license'}:
+ {children}
+
+ );
+}
+
+export function CCBYLicenseLink() {
+ return (
+
+ CC-BY-4.0
+
+ );
+}
+
+export function ClosedAccessLink({
+ children,
+ label,
+ ...props
+}: LicenseLinkProps) {
+ return (
+
+
+ {label ?? 'Closed access'}:
+ {children}
+
+ );
+}
+
+export type SpanProps = React.DetailedHTMLProps<
+ React.HTMLAttributes,
+ HTMLSpanElement
+>;
+
+export function LicenseText({ children, ...props }: SpanProps) {
+ return (
+
+
+ {children}
+
+ );
+}
+
+export function CCLicenseText({ children, ...props }: SpanProps) {
+ return (
+
+
+ {children}
+
+ );
+}
+
+export function ClosedAccessText({ children, ...props }: SpanProps) {
+ return (
+
+
+ {children}
+
+ );
+}
diff --git a/src/css/custom.css b/src/css/custom.css
index 64fb73c..2141aa3 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -52,7 +52,8 @@
'CRSV' var(--crsv);
}
-i {
+i,
+em {
font-style: normal;
--slnt: -15;
--crsv: 1;
diff --git a/src/pages/license.mdx b/src/pages/license.mdx
new file mode 100644
index 0000000..1e55acd
--- /dev/null
+++ b/src/pages/license.mdx
@@ -0,0 +1,67 @@
+---
+title: License
+SPDX-FileCopyrightText: 2024 Kristóf Marussy
+SPDX-License-Identifier: CC-BY-4.0
+---
+
+import {
+ CCBYLicenseLink,
+ CCLicenseLink,
+ CCLicenseText,
+ ClosedAccessLink,
+ ClosedAccessText,
+ LicenseLink,
+ LicenseText,
+ MITLicenseLink,
+} from '../components/licenses';
+
+# Licenses for this site
+
+## Content
+
+Unless otherwise marked, content on this site is licensed.
+
+The site uses the following marking scheme for content licenses:
+
+- The Creative Commons icon denotes content with a
+ [Creative Commons](https://creativecommons.org/) license. These are the license
+ applied for most open access scholarly literature.
+- The license icon denotes content with other [libre licenses](https://opendefinition.org/od/2.1/en/).
+- The lock icon denotes restricted content I
+ have the rights for to post but not to license for re-use. This includes material
+ kindly provided to me for posting by others and author drafts of papers published
+ in closed access journals or proceedings.
+
+You're in general free to re-use content with Creative Commons or other libre licenses as long as you abide by the terms of the linked license.
+However, re-using restricted content will need prior permission from the copyright holder.
+
+### Restricted content
+
+Restricted content on this site marked with the lock icon includes the following:
+
+- The photo of me apparing on the [home page](/) was taken by [SPOT Fotókör](https://spot.sch.bme.hu/) in 2019 for the [Critical Systems Research Group](https://ftsrg.mit.bme.hu/).
+
+- Unfortunately, some of my [publications](/#publications) appeared in closed access journal and proceedings. Even though neither me nor by colleagues received any compensation, the copyright of this content was assigned to the publisher, such as ACM or IEEE.
+
+ Whenever allowed by the current copyright holder, I posted the _final draft_ of the paper to this site.
+ For papers published by ACM, I also created a link with the [Author-Izer](https://www.acm.org/publications/authors/acm-author-izer-service) to the _version of record_ of the paper. Such links only work if your browser sends my site as the [HTTP referer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to ACM.
+
+- My [PhD thesis](pathname:///phd-thesis.pdf) and its [extended abstract](pathname:///phd-thesis-booklet.pdf) also incorporates content whose copyright was assigned to a publisher. I'm also required to add the following disclaimer:
+
+ > “In reference to IEEE copyrighted material which is used with permission in this thesis, the IEEE does not endorse any of Budapest University of Technology and Economics’ products or services. Internal or personal use of this material is permitted. If interested in reprinting/republishing IEEE copyrighted material for advertising or promotional purposes or for creating new collective works for resale or redistribution, please go to http://www.ieee.org/publications_standards/publications/rights/rights_link.html to learn how to obtain a License from RightsLink. If applicable, University Microfilms and/or ProQuest Library, or the Archives of Canada may supply single copies of the dissertation.”
+
+## Code
+
+Code for this site is available at https://git.marussy.com/blog/ under the license.
+Files with [restricted content](#restricted-content) were replaced by placeholders or omitted entirely.
+
+I follow the [REUSE Specification – Version 3.0](https://reuse.software/spec/) to declare copyright and licensing for each individual file.
+In particular, files which contain _both code and content_ (e.g., content inside complex JSX components) have the [SPDX License identifier](https://spdx.org/ids) `MIT AND CC-BY-4.0` to signify that they are both and .
+If you use only code or only content from such files, you only need to abide by the _corresponding license_ ( or , respectively).
+
+The site also uses the following third-party code available under libre licenses:
+
+- [Docusaurus](https://docusaurus.io/) static site generator,
+- [Phosphor Icons](https://phosphoricons.com/),
+- [Recursive Sans and Mono](https://www.recursive.design/) fonts, OFL-1.1
+- [Simple Icons](https://simpleicons.org/), CC0-1.0
diff --git a/src/theme/Footer/Copyright.jsx b/src/theme/Footer/Copyright.jsx
new file mode 100644
index 0000000..58afe0f
--- /dev/null
+++ b/src/theme/Footer/Copyright.jsx
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ * Copyright (c) 2024 Kristóf Marussy
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * This file was derived from
+ * https://github.com/facebook/docusaurus/blob/c745021b01a8b88d34e1d772278d7171ad8acdf5/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx
+ * via the `swizzle` mechanism of Docusaurus.
+ *
+ * It was modified to embed JSX content directly in the footer.
+ */
+
+import Link from '@docusaurus/Link';
+import React from 'react';
+
+import { CCLicenseLink, LicenseLink } from '@site/src/components/licenses';
+
+import styles from './Copyright.module.css';
+
+export default function FooterCopyright({ copyright }) {
+ return (
+
+ Most content on this site is{' '}
+
+ CC-BY-4.0
+
+ . The{' '}
+
+ code for this site
+ {' '}
+ is{' '}
+
+ MIT
+
+ .
+
+