11<template >
22 <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 >
2121 </div >
2222 </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 >
2340 </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 }}
4046 </div >
4147 </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 >
4759 </div >
4860 </div >
4961</template >
@@ -58,6 +70,7 @@ interface Category {
5870
5971interface Socials {
6072 github? : string ;
73+ docs? : string ;
6174 zulip: boolean ;
6275}
6376
@@ -77,20 +90,21 @@ const props = defineProps<Props>();
7790<style scope lang="postcss">
7891.card {
7992 @apply transition;
93+ @apply flex flex-col justify-between;
8094
8195 @apply hover :-translate-y- 0.5 ;
8296
8397 @apply px-6;
8498 @apply py-4;
8599
86- @apply bg-white ;
100+ @apply bg-slate-50 ;
87101 @apply dark :bg-slate-900;
88102
89- @apply text-slate-900 ;
103+ @apply text-slate-950 ;
90104 @apply dark :text-slate-50;
91105
92106 @apply border;
93- @apply border-gray-100 ;
107+ @apply border-gray-200 ;
94108 @apply dark :border-gray-950;
95109
96110 @apply rounded-lg;
@@ -108,12 +122,12 @@ const props = defineProps<Props>();
108122
109123 @apply font-bold;
110124 font-size : 14 px ;
111- @apply text-slate-600 ;
125+ @apply text-slate-700 ;
112126 @apply dark :text-slate-300;
113127
114128 .iconify {
115129 /* Color of the icon. */
116- @apply bg-slate-600 ;
130+ @apply bg-slate-700 ;
117131 @apply dark :bg-slate-300;
118132 }
119133 }
@@ -133,5 +147,34 @@ const props = defineProps<Props>();
133147
134148 @apply text-start;
135149 }
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+ }
136179}
137180 </style >
0 commit comments