@@ -4,6 +4,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
4
4
import Layout from '@theme/Layout' ;
5
5
import Heading from '@theme/Heading' ;
6
6
import styles from './index.module.css' ;
7
+ import React from 'react' ;
7
8
8
9
declare global {
9
10
namespace JSX {
@@ -20,6 +21,24 @@ declare global {
20
21
21
22
function HomepageHeader ( ) {
22
23
const { siteConfig } = useDocusaurusContext ( ) ;
24
+ const [ isCopied , setIsCopied ] = React . useState ( false ) ;
25
+
26
+ const copyToClipboard = ( ) => {
27
+ const citation = `@article{narechania2024provenancewidgets,
28
+ title = {{ProvenanceWidgets}: {A Library of UI Control Elements to Track and Dynamically Overlay Analytic Provenance}},
29
+ shorttitle = {{ProvenanceWidgets}},
30
+ author = {{Narechania}, Arpit and {Odak}, Kaustubh and {El-Assady}, Mennatallah and {Endert}, Alex},
31
+ journal = {IEEE Transactions on Visualization and Computer Graphics (TVCG)},
32
+ doi = {10.48550/arXiv.2407.17431},
33
+ url = {https://doi.org/10.48550/arXiv.2407.17431},
34
+ year = {2024},
35
+ publisher = {IEEE}
36
+ }`
37
+ navigator . clipboard . writeText ( citation ) ;
38
+ setIsCopied ( true ) ;
39
+ setTimeout ( ( ) => setIsCopied ( false ) , 2000 ) ;
40
+ }
41
+
23
42
return (
24
43
< header className = { clsx ( 'hero hero--primary' , styles . heroBanner ) } >
25
44
< div className = "container" >
@@ -45,6 +64,31 @@ function HomepageHeader() {
45
64
to = "https://arxiv.org/pdf/2407.17431" >
46
65
Read the Paper (VIS 2024)
47
66
</ Link >
67
+ < Link
68
+ className = "button button--outline button--secondary button--lg"
69
+ style = { { color : 'var(--ifm-background-surface-color)' , display : 'flex' , alignItems : 'center' , gap : '0.5rem' } }
70
+ onClick = { copyToClipboard }
71
+ >
72
+ Cite the Paper
73
+ {
74
+ isCopied ?
75
+ < svg
76
+ viewBox = "0 0 24 24"
77
+ className = "copyButtonSuccessIcon_node_modules-@docusaurus-theme-classic-lib-theme-CodeBlock-CopyButton-styles-module"
78
+ style = { { position : 'relative' , width : '1.125rem' , height : '1.125rem' , transform : 'none' , left : 0 , top : 0 , opacity : 1 } }
79
+ >
80
+ < path fill = "currentColor" d = "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" > </ path >
81
+ </ svg >
82
+ :
83
+ < svg
84
+ viewBox = "0 0 24 24"
85
+ className = "copyButtonIcon_node_modules-@docusaurus-theme-classic-lib-theme-CodeBlock-CopyButton-styles-module"
86
+ style = { { position : 'relative' , width : '1.125rem' , height : '1.125rem' } }
87
+ >
88
+ < path fill = "currentColor" d = "M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" > </ path >
89
+ </ svg >
90
+ }
91
+ </ Link >
48
92
</ div >
49
93
</ div >
50
94
</ header >
0 commit comments