File tree Expand file tree Collapse file tree 3 files changed +108
-3
lines changed Expand file tree Collapse file tree 3 files changed +108
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ if (!attendee) {
17
17
18
18
const currentLocale = useLocaleCurrent ().locale
19
19
20
+ function copyUrl() {
21
+ const element = document .createElement (' input' )
22
+ element .value = ` https://vuefes.jp/2024/namecard/${id }/share `
23
+ document .body .appendChild (element )
24
+ element .select ()
25
+ document .execCommand (' copy' )
26
+ document .body .removeChild (element )
27
+ }
28
+
20
29
const officialSiteUrl = computed (() => {
21
30
return currentLocale .value === ' ja' ? linkUrl : ` ${linkUrl }/en `
22
31
})
@@ -73,7 +82,12 @@ useHead({
73
82
/>
74
83
</li >
75
84
<li >
76
- <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
85
+ <div class =" copycode" >
86
+ <VFCssResetButton @click =" copyUrl" >
87
+ <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
88
+ </VFCssResetButton >
89
+ <span >コピーしました!</span >
90
+ </div >
77
91
</li >
78
92
</ul >
79
93
</div >
@@ -118,4 +132,25 @@ useHead({
118
132
padding : 0 ;
119
133
margin : 0 ;
120
134
}
135
+ .copycode {
136
+ position : relative ;
137
+ display : inline-block ;
138
+ }
139
+ .copycode span {
140
+ opacity : 0 ;
141
+ position : absolute ;
142
+ top : 0px ;
143
+ right : -5px ;
144
+ color : #fff ;
145
+ background : rgba (0 , 0 , 0 , 0.5 );
146
+ padding : 2px 5px ;
147
+ transform : translate (100% );
148
+ }
149
+ .copycode button :focus + span {
150
+ animation : fade-out 2s ease-in ;
151
+ }
152
+ @keyframes fade-out {
153
+ 0% { visibility : visible ; opacity : 1 ; }
154
+ 100% { visibility : hidden ; opacity : 0 ; }
155
+ }
121
156
</style >
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ if (!speakerData[0].detail_page_id) {
22
22
23
23
const currentLocale = useLocaleCurrent ().locale
24
24
25
+ function copyUrl() {
26
+ const element = document .createElement (' input' )
27
+ element .value = ` https://vuefes.jp/2024/namecard/${id }/share `
28
+ document .body .appendChild (element )
29
+ element .select ()
30
+ document .execCommand (' copy' )
31
+ document .body .removeChild (element )
32
+ }
33
+
25
34
useHead ({
26
35
titleTemplate : (titleChunk ) => ` ${conferenceTitle } ` ,
27
36
meta: [
@@ -81,7 +90,12 @@ useHead({
81
90
/>
82
91
</li >
83
92
<li >
84
- <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
93
+ <div class =" copycode" >
94
+ <VFCssResetButton @click =" copyUrl" >
95
+ <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
96
+ </VFCssResetButton >
97
+ <span >コピーしました!</span >
98
+ </div >
85
99
</li >
86
100
</ul >
87
101
</div >
@@ -126,4 +140,25 @@ useHead({
126
140
padding : 0 ;
127
141
margin : 0 ;
128
142
}
143
+ .copycode {
144
+ position : relative ;
145
+ display : inline-block ;
146
+ }
147
+ .copycode span {
148
+ opacity : 0 ;
149
+ position : absolute ;
150
+ top : 0px ;
151
+ right : -5px ;
152
+ color : #fff ;
153
+ background : rgba (0 , 0 , 0 , 0.5 );
154
+ padding : 2px 5px ;
155
+ transform : translate (100% );
156
+ }
157
+ .copycode button :focus + span {
158
+ animation : fade-out 2s ease-in ;
159
+ }
160
+ @keyframes fade-out {
161
+ 0% { visibility : visible ; opacity : 1 ; }
162
+ 100% { visibility : hidden ; opacity : 0 ; }
163
+ }
129
164
</style >
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ if (!sponsorData[0].detail_page_id) {
22
22
23
23
const currentLocale = useLocaleCurrent ().locale
24
24
25
+ function copyUrl() {
26
+ const element = document .createElement (' input' )
27
+ element .value = ` https://vuefes.jp/2024/namecard/${id }/share `
28
+ document .body .appendChild (element )
29
+ element .select ()
30
+ document .execCommand (' copy' )
31
+ document .body .removeChild (element )
32
+ }
33
+
25
34
useHead ({
26
35
titleTemplate : (titleChunk ) => ` ${conferenceTitle } ` ,
27
36
meta: [
@@ -81,7 +90,12 @@ useHead({
81
90
/>
82
91
</li >
83
92
<li >
84
- <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
93
+ <div class =" copycode" >
94
+ <VFCssResetButton @click =" copyUrl" >
95
+ <VFIcon color =" vue-blue" name =" external" :can-hover =" false" />
96
+ </VFCssResetButton >
97
+ <span >コピーしました!</span >
98
+ </div >
85
99
</li >
86
100
</ul >
87
101
</div >
@@ -126,4 +140,25 @@ useHead({
126
140
padding : 0 ;
127
141
margin : 0 ;
128
142
}
143
+ .copycode {
144
+ position : relative ;
145
+ display : inline-block ;
146
+ }
147
+ .copycode span {
148
+ opacity : 0 ;
149
+ position : absolute ;
150
+ top : 0px ;
151
+ right : -5px ;
152
+ color : #fff ;
153
+ background : rgba (0 , 0 , 0 , 0.5 );
154
+ padding : 2px 5px ;
155
+ transform : translate (100% );
156
+ }
157
+ .copycode button :focus + span {
158
+ animation : fade-out 8s ease-in ;
159
+ }
160
+ @keyframes fade-out {
161
+ 0% { visibility : visible ; opacity : 1 ; }
162
+ 100% { visibility : hidden ; opacity : 0 ; }
163
+ }
129
164
</style >
You can’t perform that action at this time.
0 commit comments