diff options
author | Santo Cariotti <santo@dcariotti.me> | 2022-09-21 16:43:51 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-21 16:47:18 +0200 |
commit | c0120c9e1d8b2fe2e3881eddfa10cc0ecf858805 (patch) | |
tree | 0c4a31d43f7838f5df8e2052256337bcb5a49e86 /pages/models/_id.vue | |
parent | 98424830b4a535b7788bd116be342ebc012a93b6 (diff) |
Add avatar
Diffstat (limited to 'pages/models/_id.vue')
-rw-r--r-- | pages/models/_id.vue | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pages/models/_id.vue b/pages/models/_id.vue index f1007de..0c42cbb 100644 --- a/pages/models/_id.vue +++ b/pages/models/_id.vue @@ -1,7 +1,19 @@ <template lang="pug"> .mx-auto.max-w-7xl.py-6#modelpage(class="sm:px-6 lg:px-8") section.mb-5 - h1.text-3xl.font-bold.border-green-500.border-b-2.pb-3.w-max {{ model.name }} + .flow-root + .float-left + h1.text-3xl.font-bold.border-green-500.border-b-2.pb-3.w-max {{ model.name }} + .float-right(v-if="model.author") + .flex + .mr-3.float-left + user-avatar(:data="model.author") + p.leading-8 + a.text-green-800(class="hover:text-green-700" :href="'/users/'+model.author.username") + | @ + span.underline {{ model.author.username }} + .description.mt-3 + p {{ model.description }} .images.shadow-sm.rounded-lg.bg-white.p-4.w-full .block.gap-4.h-full(class="md:flex") @@ -108,6 +120,7 @@ <script> import { ModelStl, ModelObj } from "vue-3d-model"; +import UserAvatar from "@/components/UserAvatar.vue"; export default { name: "ModelView", @@ -129,6 +142,7 @@ export default { components: { ModelStl, ModelObj, + "user-avatar": UserAvatar, }, created() { this.id = this.$route.params.id; |