aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/landing/sections/Hero.tsx2
-rw-r--r--src/components/landing/sections/Publications.module.css9
-rw-r--r--src/components/landing/sections/Publications.tsx74
-rw-r--r--src/components/landing/sections/Research.tsx2
-rw-r--r--src/components/landing/sections/Resume.module.css10
-rw-r--r--src/components/landing/sections/Resume.tsx21
-rw-r--r--src/components/licenses.module.css30
-rw-r--r--src/components/licenses.tsx92
-rw-r--r--src/css/custom.css3
-rw-r--r--src/pages/license.mdx67
-rw-r--r--src/theme/Footer/Copyright.jsx44
-rw-r--r--src/theme/Footer/Copyright.module.css15
-rw-r--r--src/theme/NavbarItem/NavbarNavLink.jsx1
13 files changed, 306 insertions, 64 deletions
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 @@
2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy 2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy
3 * 3 *
4 * SPDX-License-Identifier: MIT AND CC-BY-4.0 4 * SPDX-License-Identifier: MIT AND CC-BY-4.0
5 *
6 * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed.
5 */ 7 */
6 8
7import Link from '@docusaurus/Link'; 9import 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 @@
12 white-space: nowrap; 12 white-space: nowrap;
13} 13}
14 14
15.link--license {
16 --ifm-link-color: var(--ifm-color-secondary-contrast-foreground);
17 --ifm-link-hover-color: var(--ifm-link-color);
18}
19
20[data-theme='dark'] .link--license {
21 --ifm-link-color: var(--ifm-color-emphasis-500);
22}
23
24.link--lower { 15.link--lower {
25 text-transform: lowercase; 16 text-transform: lowercase;
26} 17}
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 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy 2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy
3 * 3 *
4 * SPDX-License-Identifier: MIT 4 * SPDX-License-Identifier: MIT AND CC-BY-4.0
5 *
6 * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed.
5 */ 7 */
6 8
7import Link from '@docusaurus/Link'; 9import Link from '@docusaurus/Link';
8import { 10import { ArrowSquareOut, File, Package, Play } from '@phosphor-icons/react';
9 ArrowSquareOut,
10 Certificate,
11 File,
12 Lock,
13 Package,
14 Play,
15} from '@phosphor-icons/react';
16import clsx from 'clsx'; 11import clsx from 'clsx';
17 12
18import { 13import {
19 CreativeCommonsIcon,
20 DBLPIcon, 14 DBLPIcon,
21 GoogleScholarIcon, 15 GoogleScholarIcon,
22 MTMTIcon, 16 MTMTIcon,
@@ -26,6 +20,11 @@ import {
26import Section from '@site/src/components/landing/Section'; 20import Section from '@site/src/components/landing/Section';
27import Subtitle from '@site/src/components/landing/Subtitle'; 21import Subtitle from '@site/src/components/landing/Subtitle';
28import authorizedLinks from '@site/src/components/landing/sections/authorizedLinks'; 22import authorizedLinks from '@site/src/components/landing/sections/authorizedLinks';
23import {
24 CCLicenseLink,
25 ClosedAccessLink,
26 LicenseLink,
27} from '@site/src/components/licenses';
29 28
30import styles from './Publications.module.css'; 29import styles from './Publications.module.css';
31 30
@@ -101,59 +100,40 @@ function ClosedAccess({
101 url: string; 100 url: string;
102 authorizedURL?: string | undefined; 101 authorizedURL?: string | undefined;
103}) { 102}) {
104 const label = (
105 <>
106 <Lock weight="bold" aria-hidden="true" className={styles.link__icon} />
107 <span className="sr-only">Closed Access: </span>
108 {publisher}
109 </>
110 );
111 if (authorizedURL !== undefined) {
112 // Must allow referrer for the ACM Author-Izer to work.
113 return (
114 <Link
115 to={authorizedURL}
116 rel="nofollow noopener"
117 referrerPolicy="no-referrer-when-downgrade"
118 className={clsx(styles.link, styles['link--license'])}
119 >
120 {label}
121 </Link>
122 );
123 }
124 return ( 103 return (
125 <Link 104 <ClosedAccessLink
126 to={url} 105 to={authorizedURL ?? url}
127 rel="nofollow noopener noreferrer" 106 rel="nofollow noopener noreferrer"
128 className={clsx(styles.link, styles['link--license'])} 107 {...(authorizedURL === undefined
108 ? {
109 rel: 'nofollow noopener noreferrer',
110 }
111 : {
112 // Must allow referrer for the ACM Author-Izer to work.
113 rel: 'nofollow noopener',
114 referrerPolicy: 'no-referrer-when-downgrade',
115 })}
116 label="Closed Access"
129 > 117 >
130 {label} 118 {publisher}
131 </Link> 119 </ClosedAccessLink>
132 ); 120 );
133} 121}
134 122
135function OpenAccess({ license }: { license: string }) { 123function OpenAccess({ license }: { license: string }) {
136 const url = `https://creativecommons.org/licenses/${license}/4.0/`; 124 const url = `https://creativecommons.org/licenses/${license}/4.0/`;
137 return ( 125 return (
138 <Link to={url} className={clsx(styles.link, styles['link--license'])}> 126 <CCLicenseLink to={url} label="Open Access">
139 <CreativeCommonsIcon className={styles.link__icon} hidden />
140 <span className="sr-only">Open Access: </span>
141 CC-{license.toUpperCase()}-4.0 127 CC-{license.toUpperCase()}-4.0
142 </Link> 128 </CCLicenseLink>
143 ); 129 );
144} 130}
145 131
146function ArtifactLicense({ license, url }: { license: string; url: string }) { 132function ArtifactLicense({ license, url }: { license: string; url: string }) {
147 return ( 133 return (
148 <Link to={url} className={clsx(styles.link, styles['link--license'])}> 134 <LicenseLink to={url} label="Artifact license">
149 <Certificate
150 weight="bold"
151 aria-hidden="true"
152 className={styles.link__icon}
153 />
154 <span className="sr-only">Artifact license: </span>
155 {license} 135 {license}
156 </Link> 136 </LicenseLink>
157 ); 137 );
158} 138}
159 139
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 @@
2 * SPDX-FileCopyrightText: 2023 Kristóf Marussy 2 * SPDX-FileCopyrightText: 2023 Kristóf Marussy
3 * 3 *
4 * SPDX-License-Identifier: MIT AND CC-BY-4.0 4 * SPDX-License-Identifier: MIT AND CC-BY-4.0
5 *
6 * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed.
5 */ 7 */
6 8
7import clsx from 'clsx'; 9import 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 @@
129 color: var(--ifm-color-emphasis-500); 129 color: var(--ifm-color-emphasis-500);
130} 130}
131 131
132.cv__muted-link {
133 white-space: nowrap;
134 --ifm-link-color: var(--ifm-color-secondary-contrast-foreground);
135 --ifm-link-hover-color: var(--ifm-link-color);
136}
137
138[data-theme='dark'] .cv__muted-link {
139 --ifm-link-color: var(--ifm-color-emphasis-500);
140}
141
132.cv__activities { 142.cv__activities {
133 margin: 1em 0; 143 margin: 1em 0;
134} 144}
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 @@
2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy 2 * SPDX-FileCopyrightText: 2023-2024 Kristóf Marussy
3 * 3 *
4 * SPDX-License-Identifier: MIT AND CC-BY-4.0 4 * SPDX-License-Identifier: MIT AND CC-BY-4.0
5 *
6 * Code in this file is MIT licensed, while content is CC-BY-4.0 licensed.
5 */ 7 */
6 8
7import Link from '@docusaurus/Link'; 9import Link from '@docusaurus/Link';
@@ -40,13 +42,18 @@ function Education() {
40 </Link> 42 </Link>
41 </p> 43 </p>
42 <p className={styles.cv__muted}> 44 <p className={styles.cv__muted}>
43 <Lock 45 <Link
44 weight="bold" 46 to="/license#restricted-content"
45 aria-hidden="true" 47 className={styles['cv__muted-link']}
46 className={styles['thesis-rights__icon']} 48 >
47 /> 49 <Lock
48 Some poritions may be exclusively licensed to their original 50 weight="bold"
49 publishers 51 aria-hidden="true"
52 className={styles['thesis-rights__icon']}
53 />
54 Some poritions may be exclusively licensed to their original
55 publishers
56 </Link>
50 </p> 57 </p>
51 <div className={styles['thesis-links']}> 58 <div className={styles['thesis-links']}>
52 <Link 59 <Link
diff --git a/src/components/licenses.module.css b/src/components/licenses.module.css
new file mode 100644
index 0000000..ac6c4cc
--- /dev/null
+++ b/src/components/licenses.module.css
@@ -0,0 +1,30 @@
1/*
2 * SPDX-FileCopyrightText: 2024 Kristóf Marussy
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7.link {
8 white-space: nowrap;
9 --ifm-link-color: var(--ifm-color-secondary-contrast-foreground);
10 --ifm-link-hover-color: var(--ifm-link-color);
11}
12
13[data-theme='dark'] .link {
14 --ifm-link-color: var(--ifm-color-emphasis-500);
15}
16
17.icon {
18 vertical-align: text-top;
19 width: 1em;
20 height: 1em;
21 margin-right: 0.125rem;
22}
23
24.text {
25 color: var(--ifm-color-secondary-contrast-foreground);
26}
27
28[data-theme='dark'] .text {
29 color: var(--ifm-color-emphasis-500);
30}
diff --git a/src/components/licenses.tsx b/src/components/licenses.tsx
new file mode 100644
index 0000000..85b0cb2
--- /dev/null
+++ b/src/components/licenses.tsx
@@ -0,0 +1,92 @@
1/*
2 * SPDX-FileCopyrightText: 2024 Kristóf Marussy
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7import Link, { type Props as LinkProps } from '@docusaurus/Link';
8import { Certificate, Lock } from '@phosphor-icons/react';
9
10import { CreativeCommonsIcon } from '@site/src/components/icons';
11
12import styles from './licenses.module.css';
13
14export type LicenseLinkProps = LinkProps & { label?: string };
15
16export function LicenseLink({ children, label, ...props }: LicenseLinkProps) {
17 return (
18 <Link className={styles.link} {...props}>
19 <Certificate weight="bold" aria-hidden="true" className={styles.icon} />
20 <span className="sr-only">{label ?? 'License'}: </span>
21 {children}
22 </Link>
23 );
24}
25
26export function MITLicenseLink() {
27 return <LicenseLink to="https://spdx.org/licenses/MIT.html">MIT</LicenseLink>;
28}
29
30export function CCLicenseLink({ children, label, ...props }: LicenseLinkProps) {
31 return (
32 <Link className={styles.link} {...props}>
33 <CreativeCommonsIcon className={styles.icon} hidden />
34 <span className="sr-only">{label ?? 'Creative Commons license'}: </span>
35 {children}
36 </Link>
37 );
38}
39
40export function CCBYLicenseLink() {
41 return (
42 <CCLicenseLink to="https://creativecommons.org/licenses/by/4.0/">
43 CC-BY-4.0
44 </CCLicenseLink>
45 );
46}
47
48export function ClosedAccessLink({
49 children,
50 label,
51 ...props
52}: LicenseLinkProps) {
53 return (
54 <Link className={styles.link} {...props}>
55 <Lock weight="bold" aria-hidden="true" className={styles.icon} />
56 <span className="sr-only">{label ?? 'Closed access'}: </span>
57 {children}
58 </Link>
59 );
60}
61
62export type SpanProps = React.DetailedHTMLProps<
63 React.HTMLAttributes<HTMLSpanElement>,
64 HTMLSpanElement
65>;
66
67export function LicenseText({ children, ...props }: SpanProps) {
68 return (
69 <span className={styles.text} {...props}>
70 <Certificate weight="bold" aria-hidden="true" className={styles.icon} />
71 {children}
72 </span>
73 );
74}
75
76export function CCLicenseText({ children, ...props }: SpanProps) {
77 return (
78 <span className={styles.text} {...props}>
79 <CreativeCommonsIcon className={styles.icon} hidden />
80 {children}
81 </span>
82 );
83}
84
85export function ClosedAccessText({ children, ...props }: SpanProps) {
86 return (
87 <span className={styles.text} {...props}>
88 <Lock weight="bold" aria-hidden="true" className={styles.icon} />
89 {children}
90 </span>
91 );
92}
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 @@
52 'CRSV' var(--crsv); 52 'CRSV' var(--crsv);
53} 53}
54 54
55i { 55i,
56em {
56 font-style: normal; 57 font-style: normal;
57 --slnt: -15; 58 --slnt: -15;
58 --crsv: 1; 59 --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 @@
1---
2title: License
3SPDX-FileCopyrightText: 2024 Kristóf Marussy
4SPDX-License-Identifier: CC-BY-4.0
5---
6
7import {
8 CCBYLicenseLink,
9 CCLicenseLink,
10 CCLicenseText,
11 ClosedAccessLink,
12 ClosedAccessText,
13 LicenseLink,
14 LicenseText,
15 MITLicenseLink,
16} from '../components/licenses';
17
18# Licenses for this site
19
20## Content
21
22Unless otherwise marked, content on this site is <CCBYLicenseLink /> licensed.
23
24The site uses the following marking scheme for content licenses:
25
26- <CCLicenseText>The Creative Commons icon</CCLicenseText> denotes content with a
27 [Creative Commons](https://creativecommons.org/) license. These are the license
28 applied for most open access scholarly literature.
29- <LicenseText>The license icon</LicenseText> denotes content with other [libre licenses](https://opendefinition.org/od/2.1/en/).
30- <ClosedAccessText>The lock icon</ClosedAccessText> denotes restricted content I
31 have the rights for to post but not to license for re-use. This includes material
32 kindly provided to me for posting by others and author drafts of papers published
33 in closed access journals or proceedings.
34
35You'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.
36However, re-using restricted content will need prior permission from the copyright holder.
37
38### Restricted content
39
40Restricted content on this site marked with the <ClosedAccessLink to="#content">lock icon</ClosedAccessLink> includes the following:
41
42- 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/).
43
44- 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.
45
46 Whenever allowed by the current copyright holder, I posted the _final draft_ of the paper to this site.
47 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.
48
49- 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:
50
51 > &ldquo;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&rsquo; 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.&rdquo;
52
53## Code
54
55Code for this site is available at https://git.marussy.com/blog/ under the <MITLicenseLink /> license.
56Files with [restricted content](#restricted-content) were replaced by placeholders or omitted entirely.
57
58I follow the [REUSE Specification – Version 3.0](https://reuse.software/spec/) to declare copyright and licensing for each individual file.
59In 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 <MITLicenseLink /> and <CCBYLicenseLink />.
60If you use only code or only content from such files, you only need to abide by the _corresponding license_ (<MITLicenseLink /> or <CCBYLicenseLink />, respectively).
61
62The site also uses the following third-party code available under libre licenses:
63
64- [Docusaurus](https://docusaurus.io/) static site generator, <MITLicenseLink />
65- [Phosphor Icons](https://phosphoricons.com/), <MITLicenseLink />
66- [Recursive Sans and Mono](https://www.recursive.design/) fonts, <LicenseLink to="https://openfontlicense.org/open-font-license-official-text/">OFL-1.1</LicenseLink>
67- [Simple Icons](https://simpleicons.org/), <CCLicenseLink to="https://creativecommons.org/publicdomain/zero/1.0/">CC0-1.0</CCLicenseLink>
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 @@
1/*
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 * Copyright (c) 2024 Kristóf Marussy <kristof@marussy.com>
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * This file was derived from
8 * https://github.com/facebook/docusaurus/blob/c745021b01a8b88d34e1d772278d7171ad8acdf5/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx
9 * via the `swizzle` mechanism of Docusaurus.
10 *
11 * It was modified to embed JSX content directly in the footer.
12 */
13
14import Link from '@docusaurus/Link';
15import React from 'react';
16
17import { CCLicenseLink, LicenseLink } from '@site/src/components/licenses';
18
19import styles from './Copyright.module.css';
20
21export default function FooterCopyright({ copyright }) {
22 return (
23 <div className="footer__copyright">
24 Most content on this site is{' '}
25 <CCLicenseLink
26 to="/license#content"
27 rel="license"
28 className={styles.link}
29 >
30 CC-BY-4.0
31 </CCLicenseLink>
32 . The{' '}
33 <Link to="https://git.marussy.com/blog/" className={styles.link}>
34 code for this site
35 </Link>{' '}
36 is{' '}
37 <LicenseLink to="/license#code" rel="license" className={styles.link}>
38 MIT
39 </LicenseLink>
40 .<br />
41 <span dangerouslySetInnerHTML={{ __html: copyright }} />
42 </div>
43 );
44}
diff --git a/src/theme/Footer/Copyright.module.css b/src/theme/Footer/Copyright.module.css
new file mode 100644
index 0000000..8bae599
--- /dev/null
+++ b/src/theme/Footer/Copyright.module.css
@@ -0,0 +1,15 @@
1/*
2 * SPDX-FileCopyrightText: 2024 Kristóf Marussy
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7.link {
8 --ifm-link-color: var(--ifm-footer-link-color);
9 --ifm-link-hover-color: var(--ifm-footer-link-hover-color);
10}
11
12[data-theme='dark'] .link {
13 /* Make links stand out from the text even in dark mode. */
14 --ifm-link-color: var(--ifm-color-emphasis-500);
15}
diff --git a/src/theme/NavbarItem/NavbarNavLink.jsx b/src/theme/NavbarItem/NavbarNavLink.jsx
index cb151ea..81de931 100644
--- a/src/theme/NavbarItem/NavbarNavLink.jsx
+++ b/src/theme/NavbarItem/NavbarNavLink.jsx
@@ -19,6 +19,7 @@ import isInternalUrl from '@docusaurus/isInternalUrl';
19import { isRegexpStringMatch } from '@docusaurus/theme-common'; 19import { isRegexpStringMatch } from '@docusaurus/theme-common';
20import IconExternalLink from '@theme/Icon/ExternalLink'; 20import IconExternalLink from '@theme/Icon/ExternalLink';
21import { useActiveSection } from '@site/src/components/ActiveSectionProvider'; 21import { useActiveSection } from '@site/src/components/ActiveSectionProvider';
22
22export default function NavbarNavLink({ 23export default function NavbarNavLink({
23 activeBasePath, 24 activeBasePath,
24 activeBaseRegex, 25 activeBaseRegex,