Newer
Older
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
<template>
<div class="col q-gutter-md">
<div class="flex row">
<q-card flat class="text-center">
<q-icon size="64px" name="star" color="grey-3" />
<div class="text-center text-caption">Stars</div>
<div class="text-center text-h6 text-grey text-weight-bold">0</div>
</q-card>
<q-card flat class="text-center">
<q-icon size="64px" name="save" color="grey-3" />
<div class="text-center text-caption">Downloads</div>
<div class="text-center text-h6 text-grey text-weight-bold">0</div>
</q-card>
</div>
<q-list dense>
<q-item>
<q-item-section side>
<q-item-label caption>Category</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label>Materials</q-item-label>
</q-item-section>
</q-item>
<q-item>
<q-item-section side>
<q-item-label caption>Created</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label>{{$niceTime(project.created)}}</q-item-label>
</q-item-section>
</q-item>
<q-item v-if="project.tags && project.tags.length > 0">
<q-item-section side>
<q-item-label caption>Tags</q-item-label>
</q-item-section>
</q-item>
<q-item v-if="project.tags && project.tags.length > 0">
<q-item-section>
<div class="row">
<q-chip v-for="tag,idx in project.tags" dense :key="idx" :label="tag" />
</div>
</q-item-section>
</q-item>
<q-separator inline spaced />
<q-item>
<q-item-section side>
<q-item-label caption>Uploaded by:</q-item-label>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar>
<router-link :to="`/users/${project.userId}`">
<q-avatar size="128px">
<q-img basic :src="project.userAvatar" />
</q-avatar>
</router-link>
</q-item-section>
</q-item>
<q-item>
<q-item-section>
<q-item-label :lines="3" caption>{{project.username}}</q-item-label>
</q-item-section>
</q-item>
<q-separator inline spaced />
<div class="row">
<div class="col-12">
<div class="project-description text-caption q-pa-sm" v-html="formatted_description"></div>
</div>
</div>
<q-list>
<q-separator inset spaced />
<q-item clickable>
<q-item-section side>
<q-icon name="book" />
</q-item-section>
<q-item-section>
<q-item-label class="text-grey text-weight-bold">Documentation</q-item-label>
</q-item-section>
</q-item>
<q-item clickable>
<q-item-section side>
<q-icon name="save" color="teal-3" />
</q-item-section>
<q-item-section class="text-teal-6 text-weight-bold">Download files</q-item-section>
</q-item>
</q-list>
</q-list>
</div>
</template>
<script>
export default {
// name: 'ComponentName',
props: ["project"],
data() {
return {};
},
computed: {
formatted_description() {
return this.project.description.split("\n").join("<br/>");
}
}
};
</script>