-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathCardIcons.tsx
151 lines (145 loc) · 6.03 KB
/
CardIcons.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import React from "react";
import Link from "@docusaurus/Link";
import MotokoIcon from "@site/static/img/svgIcons/motoko.svg";
import RustIcon from "@site/static/img/svgIcons/rust.svg";
import YoutubeIcon from "@site/static/img/svgIcons/youtube.svg";
import DocsIcon from "@site/static/img/svgIcons/docs.svg";
import IC0Icon from "@site/static/img/svgIcons/ic0.svg";
import GitHubIcon from "@site/static/img/svgIcons/github.svg";
import LinkIcon from "@site/static/img/svgIcons/link.svg";
export function MotokoLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Motoko
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
>
<MotokoIcon />
</Link>
</div>
);
}
export function RustLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Rust
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
>
<RustIcon />
</Link>
</div>
);
}
export function TypeScriptLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Typescript
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
></Link>
</div>
);
}
export function DocsLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Developer Docs
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
>
<DocsIcon />
</Link>
</div>
);
}
export function YoutubeLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Watch Tutorials
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
>
<YoutubeIcon />
</Link>
</div>
);
}
export function LivePreviewLink({ to }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
See Live
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
>
<IC0Icon />
</Link>
</div>
);
}
export function GitHubLink({ to, label = "Link to GitHub" }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
Source Code
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
aria-label={label}
>
<GitHubIcon />
</Link>
</div>
);
}
export function ExternalLink({ to, label = "External Link" }) {
return (
<div className="relative flex group">
<div className="hidden group-hover:flex items-center justify-center w-40 absolute bottom-full left-1/2 -translate-x-[calc(50%+4px)]">
<span className="mb-1 text-white py-1 px-3 h-8 rounded-full bg-black-60 backdrop-blur-2xl items-center">
More Information
</span>
</div>
<Link
className="flex items-center justify-center relative h-10 w-10 rounded-full border border-solid border-[#dfdfdf] p-2 text-infinite hover:border-infinite hover:text-white hover:bg-infinite hover:no-underline"
to={to}
aria-label={label}
>
<LinkIcon />
</Link>
</div>
);
}