File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import { type ProjectModel , getProjectName } from ' ~/code/models/projects'
3
+
4
+ const { project, route, preferDetails } = defineProps <{ project: ProjectModel ; route: string ; preferDetails? : boolean }>()
5
+ </script >
6
+
7
+ <template >
8
+ <div >
9
+ <!-- TODO: Make find by hashtag (project always have hashtag by their name) -->
10
+ <p m-0 p-0 text-sm >
11
+ #{{ getProjectName(route, project) }}
12
+ </p >
13
+ <NuxtLink :to =" route" >
14
+ <p m-0 p-0 text-xl >
15
+ {{ project.title }}
16
+ </p >
17
+ <p m-0 p-0 text-sm text-gray-400 dark:text-gray-500 >
18
+ <span >
19
+ {{ new Date(project.created).toDateString() }}
20
+ </span >
21
+ <span v-if =" project.completed" >
22
+ / {{ new Date(project.completed).toDateString() }}
23
+ </span >
24
+ <span >
25
+ - {{ project.language }}
26
+ </span >
27
+ </p >
28
+ <p m-0 p-0 text-gray-500 dark:text-gray-400 >
29
+ {{ preferDetails ? project.details : project.description }}
30
+ </p >
31
+ </NuxtLink >
32
+ <div class =" margin-on-item" >
33
+ <slot name =" item" />
34
+ </div >
35
+ </div >
36
+ </template >
37
+
38
+ <style scoped lang="sass">
39
+ .margin-on-item :has (* )
40
+ margin-top : 0.5rem
41
+ </style >
You can’t perform that action at this time.
0 commit comments