1
1
<template >
2
2
<div class =" card" >
3
- <div class = " header " >
4
- <div class =" title " >
5
- In
6
- < Icon :name = " category.icon " />
7
- {{ category.name }}
8
-
9
- < div class = " ml-1 font-normal text-xs font-mono " >
10
- <div
11
- class = " px-1 py-0.5 rounded-md text-green-900 dark:text-green-300 bg-green-300 dark:bg-green-900 border border-green-500 "
12
- v-if = " kind === Kind.Library "
13
- >
14
- lib
15
- </div >
16
- <div
17
- class =" px-1 py-0.5 rounded-md text-purple-900 dark:text-purple-300 bg-purple-300 dark:bg-purple-900 border border-purple-500"
18
- v-else-if =" kind === Kind.Binary"
19
- >
20
- bin
3
+ <div >
4
+ <div class =" header " >
5
+ < div class = " title " >
6
+ In
7
+ < Icon :name = " category.icon " />
8
+ {{ category.name }}
9
+
10
+ <div class = " ml-1 font-normal text-xs font-mono " >
11
+ < div
12
+ class = " px-1 py-0.5 rounded-md text-green-900 dark:text-green-300 bg-green-300 dark:bg-green-900 border border-green-500 "
13
+ v-if = " kind === Kind.Library " >
14
+ lib
15
+ </div >
16
+ <div
17
+ class =" px-1 py-0.5 rounded-md text-purple-900 dark:text-purple-300 bg-purple-300 dark:bg-purple-900 border border-purple-500"
18
+ v-else-if =" kind === Kind.Binary" >
19
+ bin
20
+ </ div >
21
21
</div >
22
22
</div >
23
+ <div class =" flex gap-x-1.5" >
24
+ <a v-if =" socials && socials.github"
25
+ class =" flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
26
+ :href =" socials.github" >
27
+ <Icon class =" w-4 h-4" name =" octicon:mark-github-16" ></Icon >
28
+ </a >
29
+ <a v-if =" socials && socials.docs"
30
+ class =" flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
31
+ :href =" socials.docs" :title =" `Chat about ${name} in the rust-seq Zulip`" >
32
+ <Icon class =" w-4 h-4" name =" heroicons-outline:book-open" ></Icon >
33
+ </a >
34
+ <a v-if =" socials && socials.zulip"
35
+ class =" flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
36
+ href =" https://rustseq.zulipchat.com" :title =" `Chat about ${name} in the rust-seq Zulip`" >
37
+ <Icon class =" w-4 h-4" name =" tabler:brand-zulip" ></Icon >
38
+ </a >
39
+ </div >
23
40
</div >
24
- <div class =" flex gap-x-1.5" >
25
- <a
26
- v-if =" socials && socials.github"
27
- class =" flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
28
- :href =" socials.github"
29
- >
30
- <Icon class =" w-4 h-4" name =" octicon:mark-github-16" ></Icon >
31
- </a >
32
- <a
33
- v-if =" socials && socials.zulip"
34
- class =" flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-slate-950 border border-gray-200 rounded-full"
35
- href =" https://rustseq.zulipchat.com"
36
- :title =" `Chat about ${name} in the rust-seq Zulip`"
37
- >
38
- <Icon class =" w-4 h-4" name =" tabler:brand-zulip" ></Icon >
39
- </a >
41
+ <div class =" flex items-center justify-start gap-x-1" >
42
+ <div class =" crate" >{{ organization }}/{{ name }}</div >
43
+ </div >
44
+ <div class =" description" >
45
+ {{ description }}
40
46
</div >
41
47
</div >
42
- <div class =" flex items-center justify-start gap-x-1" >
43
- <div class =" crate" >{{ organization }}/{{ name }}</div >
44
- </div >
45
- <div class =" description" >
46
- {{ description }}
48
+ <div class =" terminal" >
49
+ <div class =" command" >
50
+ <span class =" prompt" >$</span >
51
+ <span v-if =" kind === Kind.Library" >
52
+ cargo add {{ name }}
53
+ </span >
54
+ <span v-if =" kind === Kind.Binary" >
55
+ cargo install {{ name }}
56
+ </span >
57
+ </div >
58
+ <Icon class =" copy" name =" heroicons-outline:clipboard-copy" ></Icon >
47
59
</div >
48
60
</div >
49
61
</template >
@@ -58,6 +70,7 @@ interface Category {
58
70
59
71
interface Socials {
60
72
github? : string ;
73
+ docs? : string ;
61
74
zulip: boolean ;
62
75
}
63
76
@@ -77,20 +90,21 @@ const props = defineProps<Props>();
77
90
<style scope lang="postcss">
78
91
.card {
79
92
@apply transition;
93
+ @apply flex flex-col justify-between;
80
94
81
95
@apply hover :-translate-y- 0.5 ;
82
96
83
97
@apply px-6;
84
98
@apply py-4;
85
99
86
- @apply bg-white ;
100
+ @apply bg-slate-50 ;
87
101
@apply dark :bg-slate-900;
88
102
89
- @apply text-slate-900 ;
103
+ @apply text-slate-950 ;
90
104
@apply dark :text-slate-50;
91
105
92
106
@apply border;
93
- @apply border-gray-100 ;
107
+ @apply border-gray-200 ;
94
108
@apply dark :border-gray-950;
95
109
96
110
@apply rounded-lg;
@@ -108,12 +122,12 @@ const props = defineProps<Props>();
108
122
109
123
@apply font-bold;
110
124
font-size : 14 px ;
111
- @apply text-slate-600 ;
125
+ @apply text-slate-700 ;
112
126
@apply dark :text-slate-300;
113
127
114
128
.iconify {
115
129
/* Color of the icon. */
116
- @apply bg-slate-600 ;
130
+ @apply bg-slate-700 ;
117
131
@apply dark :bg-slate-300;
118
132
}
119
133
}
@@ -133,5 +147,34 @@ const props = defineProps<Props>();
133
147
134
148
@apply text-start;
135
149
}
150
+
151
+ .terminal {
152
+ @apply flex justify-between items-center;
153
+
154
+ @apply w-full;
155
+ @apply mt-3;
156
+ @apply py-1 px-3;
157
+
158
+ @apply font-mono;
159
+
160
+ @apply rounded-md;
161
+ @apply bg-white;
162
+ @apply dark :bg-gray-950;
163
+
164
+ @apply border;
165
+ @apply dark :border-gray-800;
166
+
167
+ .command {
168
+ .prompt {
169
+ @apply font-bold;
170
+ @apply text-purple-700;
171
+ }
172
+ }
173
+
174
+ .copy {
175
+ @apply cursor-pointer;
176
+ @apply dark :hover:text-slate-100;
177
+ }
178
+ }
136
179
}
137
180
</style >
0 commit comments