diff options
author | Kristóf Marussy <kristof@marussy.com> | 2024-03-20 01:21:25 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2024-03-20 01:42:27 +0100 |
commit | 3679722b7acd4d7056d7dded8b7b6564462f528c (patch) | |
tree | c6f3f4f05b7cb1336650781154b1d9e14fb70297 | |
parent | chore(deps): bump dependencies (diff) | |
download | blog-3679722b7acd4d7056d7dded8b7b6564462f528c.tar.gz blog-3679722b7acd4d7056d7dded8b7b6564462f528c.tar.zst blog-3679722b7acd4d7056d7dded8b7b6564462f528c.zip |
Simplify license links
-rw-r--r-- | src/components/landing/sections/Publications.tsx | 26 | ||||
-rw-r--r-- | src/components/landing/sections/Resume.module.css | 9 | ||||
-rw-r--r-- | src/components/landing/sections/Resume.tsx | 19 | ||||
-rw-r--r-- | src/components/licenses.module.css | 10 | ||||
-rw-r--r-- | src/components/licenses.tsx | 6 | ||||
-rw-r--r-- | src/pages/license.mdx | 7 |
6 files changed, 16 insertions, 61 deletions
diff --git a/src/components/landing/sections/Publications.tsx b/src/components/landing/sections/Publications.tsx index 068ec49..33f989f 100644 --- a/src/components/landing/sections/Publications.tsx +++ b/src/components/landing/sections/Publications.tsx | |||
@@ -20,11 +20,7 @@ import { | |||
20 | import Section from '@site/src/components/landing/Section'; | 20 | import Section from '@site/src/components/landing/Section'; |
21 | import Subtitle from '@site/src/components/landing/Subtitle'; | 21 | import Subtitle from '@site/src/components/landing/Subtitle'; |
22 | import authorizedLinks from '@site/src/components/landing/sections/authorizedLinks'; | 22 | import authorizedLinks from '@site/src/components/landing/sections/authorizedLinks'; |
23 | import { | 23 | import { CCLicenseLink, ClosedAccessLink } from '@site/src/components/licenses'; |
24 | CCLicenseLink, | ||
25 | ClosedAccessLink, | ||
26 | LicenseLink, | ||
27 | } from '@site/src/components/licenses'; | ||
28 | 24 | ||
29 | import styles from './Publications.module.css'; | 25 | import styles from './Publications.module.css'; |
30 | 26 | ||
@@ -129,14 +125,6 @@ function OpenAccess({ license }: { license: string }) { | |||
129 | ); | 125 | ); |
130 | } | 126 | } |
131 | 127 | ||
132 | function ArtifactLicense({ license, url }: { license: string; url: string }) { | ||
133 | return ( | ||
134 | <LicenseLink to={url} label="Artifact license"> | ||
135 | {license} | ||
136 | </LicenseLink> | ||
137 | ); | ||
138 | } | ||
139 | |||
140 | export default function Publications() { | 128 | export default function Publications() { |
141 | return ( | 129 | return ( |
142 | <Section id="publications" title="Publications"> | 130 | <Section id="publications" title="Publications"> |
@@ -164,15 +152,11 @@ export default function Publications() { | |||
164 | </i>{' '} | 152 | </i>{' '} |
165 | pp. 433–45. <DOILink doi="10.1145/3550355.3552448" />{' '} | 153 | pp. 433–45. <DOILink doi="10.1145/3550355.3552448" />{' '} |
166 | <PDFLink filename="models22" />{' '} | 154 | <PDFLink filename="models22" />{' '} |
155 | <ArtifactLink doi="10.5281/zenodo.6974248" />{' '} | ||
167 | <ClosedAccess | 156 | <ClosedAccess |
168 | publisher="ACM" | 157 | publisher="ACM" |
169 | url="https://authors.acm.org/journals/rights-permissions" | 158 | url="https://authors.acm.org/journals/rights-permissions" |
170 | authorizedURL={authorizedLinks.models22} | 159 | authorizedURL={authorizedLinks.models22} |
171 | />{' '} | ||
172 | <ArtifactLink doi="10.5281/zenodo.6974248" />{' '} | ||
173 | <ArtifactLicense | ||
174 | license="EPL-2.0" | ||
175 | url="https://www.eclipse.org/legal/epl-v20.html" | ||
176 | /> | 160 | /> |
177 | </li> | 161 | </li> |
178 | <li className={styles.publications__item}> | 162 | <li className={styles.publications__item}> |
@@ -225,15 +209,11 @@ export default function Publications() { | |||
225 | </i>{' '} | 209 | </i>{' '} |
226 | pp. 323–333. <DOILink doi="10.1145/3239372.3239412" />{' '} | 210 | pp. 323–333. <DOILink doi="10.1145/3239372.3239412" />{' '} |
227 | <PDFLink filename="models18" />{' '} | 211 | <PDFLink filename="models18" />{' '} |
212 | <ArtifactLink doi="10.5281/zenodo.1318156" />{' '} | ||
228 | <ClosedAccess | 213 | <ClosedAccess |
229 | publisher="ACM" | 214 | publisher="ACM" |
230 | url="https://authors.acm.org/journals/rights-permissions" | 215 | url="https://authors.acm.org/journals/rights-permissions" |
231 | authorizedURL={authorizedLinks.models18} | 216 | authorizedURL={authorizedLinks.models18} |
232 | />{' '} | ||
233 | <ArtifactLink doi="10.5281/zenodo.1318156" />{' '} | ||
234 | <ArtifactLicense | ||
235 | license="EPL-1.0" | ||
236 | url="https://www.eclipse.org/legal/epl-v10.html" | ||
237 | /> | 217 | /> |
238 | </li> | 218 | </li> |
239 | </ul> | 219 | </ul> |
diff --git a/src/components/landing/sections/Resume.module.css b/src/components/landing/sections/Resume.module.css index b1ae29e..291d66c 100644 --- a/src/components/landing/sections/Resume.module.css +++ b/src/components/landing/sections/Resume.module.css | |||
@@ -133,15 +133,6 @@ | |||
133 | color: var(--ifm-color-emphasis-500); | 133 | color: var(--ifm-color-emphasis-500); |
134 | } | 134 | } |
135 | 135 | ||
136 | .cv__muted-link { | ||
137 | --ifm-link-color: var(--ifm-color-secondary-contrast-foreground); | ||
138 | --ifm-link-hover-color: var(--ifm-link-color); | ||
139 | } | ||
140 | |||
141 | [data-theme='dark'] .cv__muted-link { | ||
142 | --ifm-link-color: var(--ifm-color-emphasis-500); | ||
143 | } | ||
144 | |||
145 | .cv__activities { | 136 | .cv__activities { |
146 | margin: 1em 0; | 137 | margin: 1em 0; |
147 | } | 138 | } |
diff --git a/src/components/landing/sections/Resume.tsx b/src/components/landing/sections/Resume.tsx index 19f0c20..a7708bf 100644 --- a/src/components/landing/sections/Resume.tsx +++ b/src/components/landing/sections/Resume.tsx | |||
@@ -42,18 +42,13 @@ function Education() { | |||
42 | </Link> | 42 | </Link> |
43 | </p> | 43 | </p> |
44 | <p className={styles.cv__muted}> | 44 | <p className={styles.cv__muted}> |
45 | <Link | 45 | <Lock |
46 | to="/license#restricted-content" | 46 | weight="bold" |
47 | className={styles['cv__muted-link']} | 47 | aria-hidden="true" |
48 | > | 48 | className={styles['thesis-rights__icon']} |
49 | <Lock | 49 | /> |
50 | weight="bold" | 50 | Some poritions may be exclusively licensed to their original |
51 | aria-hidden="true" | 51 | publishers |
52 | className={styles['thesis-rights__icon']} | ||
53 | /> | ||
54 | Some poritions may be exclusively licensed to their original | ||
55 | publishers | ||
56 | </Link> | ||
57 | </p> | 52 | </p> |
58 | <div className={styles['thesis-links']}> | 53 | <div className={styles['thesis-links']}> |
59 | <Link | 54 | <Link |
diff --git a/src/components/licenses.module.css b/src/components/licenses.module.css index ac6c4cc..512efbb 100644 --- a/src/components/licenses.module.css +++ b/src/components/licenses.module.css | |||
@@ -4,16 +4,6 @@ | |||
4 | * SPDX-License-Identifier: MIT | 4 | * SPDX-License-Identifier: MIT |
5 | */ | 5 | */ |
6 | 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 { | 7 | .icon { |
18 | vertical-align: text-top; | 8 | vertical-align: text-top; |
19 | width: 1em; | 9 | width: 1em; |
diff --git a/src/components/licenses.tsx b/src/components/licenses.tsx index 85b0cb2..f038b5f 100644 --- a/src/components/licenses.tsx +++ b/src/components/licenses.tsx | |||
@@ -15,7 +15,7 @@ export type LicenseLinkProps = LinkProps & { label?: string }; | |||
15 | 15 | ||
16 | export function LicenseLink({ children, label, ...props }: LicenseLinkProps) { | 16 | export function LicenseLink({ children, label, ...props }: LicenseLinkProps) { |
17 | return ( | 17 | return ( |
18 | <Link className={styles.link} {...props}> | 18 | <Link {...props}> |
19 | <Certificate weight="bold" aria-hidden="true" className={styles.icon} /> | 19 | <Certificate weight="bold" aria-hidden="true" className={styles.icon} /> |
20 | <span className="sr-only">{label ?? 'License'}: </span> | 20 | <span className="sr-only">{label ?? 'License'}: </span> |
21 | {children} | 21 | {children} |
@@ -29,7 +29,7 @@ export function MITLicenseLink() { | |||
29 | 29 | ||
30 | export function CCLicenseLink({ children, label, ...props }: LicenseLinkProps) { | 30 | export function CCLicenseLink({ children, label, ...props }: LicenseLinkProps) { |
31 | return ( | 31 | return ( |
32 | <Link className={styles.link} {...props}> | 32 | <Link {...props}> |
33 | <CreativeCommonsIcon className={styles.icon} hidden /> | 33 | <CreativeCommonsIcon className={styles.icon} hidden /> |
34 | <span className="sr-only">{label ?? 'Creative Commons license'}: </span> | 34 | <span className="sr-only">{label ?? 'Creative Commons license'}: </span> |
35 | {children} | 35 | {children} |
@@ -51,7 +51,7 @@ export function ClosedAccessLink({ | |||
51 | ...props | 51 | ...props |
52 | }: LicenseLinkProps) { | 52 | }: LicenseLinkProps) { |
53 | return ( | 53 | return ( |
54 | <Link className={styles.link} {...props}> | 54 | <Link {...props}> |
55 | <Lock weight="bold" aria-hidden="true" className={styles.icon} /> | 55 | <Lock weight="bold" aria-hidden="true" className={styles.icon} /> |
56 | <span className="sr-only">{label ?? 'Closed access'}: </span> | 56 | <span className="sr-only">{label ?? 'Closed access'}: </span> |
57 | {children} | 57 | {children} |
diff --git a/src/pages/license.mdx b/src/pages/license.mdx index 40f8351..76be841 100644 --- a/src/pages/license.mdx +++ b/src/pages/license.mdx | |||
@@ -8,7 +8,6 @@ import { | |||
8 | CCBYLicenseLink, | 8 | CCBYLicenseLink, |
9 | CCLicenseLink, | 9 | CCLicenseLink, |
10 | CCLicenseText, | 10 | CCLicenseText, |
11 | ClosedAccessLink, | ||
12 | ClosedAccessText, | 11 | ClosedAccessText, |
13 | LicenseLink, | 12 | LicenseLink, |
14 | LicenseText, | 13 | LicenseText, |
@@ -37,7 +36,7 @@ However, re-using restricted content will need prior permission from the copyrig | |||
37 | 36 | ||
38 | ### Restricted content | 37 | ### Restricted content |
39 | 38 | ||
40 | Restricted content on this site marked with the <ClosedAccessLink to="#content">lock icon</ClosedAccessLink> includes the following: | 39 | Restricted content on this site marked with the <ClosedAccessText to="#content">lock icon</ClosedAccessText> includes the following: |
41 | 40 | ||
42 | - The photo of me appearing 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/). | 41 | - The photo of me appearing 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 | 42 | ||
@@ -58,8 +57,8 @@ Code for this site is available at https://git.marussy.com/blog/ under the <MITL | |||
58 | Files with [restricted content](#restricted-content) were replaced by placeholders or omitted entirely. | 57 | Files with [restricted content](#restricted-content) were replaced by placeholders or omitted entirely. |
59 | 58 | ||
60 | I follow the [REUSE Specification – Version 3.0](https://reuse.software/spec/) to declare copyright and licensing for each individual file. | 59 | I follow the [REUSE Specification – Version 3.0](https://reuse.software/spec/) to declare copyright and licensing for each individual file. |
61 | 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 <MITLicenseLink /> and <CCBYLicenseLink />. | 60 | 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 MIT and CC-BY-4.0. |
62 | If you use only code or only content from such files, you only need to abide by the _corresponding license_ (<MITLicenseLink /> or <CCBYLicenseLink />, respectively). | 61 | If you use only code or only content from such files, you only need to abide by the _corresponding license_ (MIT or CC-BY-4.0, respectively). |
63 | 62 | ||
64 | The site also uses the following third-party code available under libre licenses: | 63 | The site also uses the following third-party code available under libre licenses: |
65 | 64 | ||