51
51
</div >
52
52
</div >
53
53
54
- <div class =" board-secondary" >
55
- <!-- Board Posts and Threads -->
56
- <div class =" view-count" >
57
- <p class =" view-count-posts" >
58
- <span class =" view-count-number" >{{board.total_post_count}}</span >
59
- <span class =" label" > posts, </span >
60
- </p >
61
- <p class =" view-count-threads" >
62
- <span class =" view-count-number" >{{board.total_thread_count}}</span >
63
- <span class =" label" > threads</span >
64
- </p >
65
- </div >
54
+ <!-- Board Posts and Threads -->
55
+ <div class =" view-count" >
56
+ <p class =" view-count-posts" >
57
+ <span class =" view-count-number" >{{board.total_post_count.toLocaleString()}}</span >
58
+ <span class =" label" > Posts </span >
59
+ </p >
60
+ <p class =" view-count-threads" >
61
+ <span class =" view-count-number" >{{board.total_thread_count.toLocaleString()}}</span >
62
+ <span class =" label" > Threads</span >
63
+ </p >
64
+ </div >
66
65
67
- <!-- Board Last Post By -->
68
- <div class =" last-post" >
69
- <div v-if =" board.last_post_username" >
70
- <span v-if =" board.user_deleted || board.post_deleted" >deleted</span >
71
- <img v-if =" !board.user_deleted && !board.post_deleted" class =" avatar-small" :class =" defaultAvatarShape" :src =" board.last_post_avatar || defaultAvatar" @error =" $event.target.src=defaultAvatar" />
72
- <router-link v-if =" !board.user_deleted && !board.post_deleted" :to =" { path: '/profile/' + board.last_post_username.toLowerCase(), query: { id: board.last_post_user_id }}" >{{board.last_post_username}}</router-link > posted in
73
- <span v-if =" board.last_thread_title" >
74
- <router-link :to =" { name: 'Posts', params: { threadSlug: board.last_thread_slug }, query: { start: board.last_post_position} }" >
75
- <span v-html =" board.last_thread_title" ></span >
76
- </router-link > on
77
- </span >
78
- <span vi-if =" board.last_post_created_at" >
79
- <span >{{humanDate(board.last_post_created_at)}}</span >
80
- </span >
81
- </div >
66
+ <!-- Board Last Post By -->
67
+ <div class =" last-post" >
68
+ <div v-if =" board.last_post_username" >
69
+ <span v-if =" board.user_deleted || board.post_deleted" >deleted</span >
70
+ <img v-if =" !board.user_deleted && !board.post_deleted" class =" avatar-small" :class =" defaultAvatarShape" :src =" board.last_post_avatar || defaultAvatar" @error =" $event.target.src=defaultAvatar" />
71
+ <router-link v-if =" !board.user_deleted && !board.post_deleted" :to =" { path: '/profile/' + board.last_post_username.toLowerCase(), query: { id: board.last_post_user_id }}" >{{board.last_post_username}}</router-link > posted in
72
+ <span v-if =" board.last_thread_title" >
73
+ <router-link :to =" { name: 'Posts', params: { threadSlug: board.last_thread_slug }, query: { start: board.last_post_position} }" >
74
+ <span v-html =" truncate(decode(board.last_thread_title), 25)" ></span >
75
+ </router-link >
76
+ </span >
77
+ <span vi-if =" board.last_post_created_at" >
78
+ <br />on <span >{{humanDate(board.last_post_created_at)}}</span >
79
+ </span >
82
80
</div >
83
81
</div >
84
82
</div >
96
94
import useSWRV from ' swrv'
97
95
import { mutate } from ' swrv'
98
96
import humanDate from ' @/composables/filters/humanDate'
97
+ import decode from ' @/composables/filters/decode'
98
+ import truncate from ' @/composables/filters/truncate'
99
99
import RecentThreads from ' @/components/threads/RecentThreads.vue'
100
100
import LoginModal from ' @/components/modals/auth/Login.vue'
101
101
import RegisterModal from ' @/components/modals/auth/Register.vue'
@@ -160,7 +160,7 @@ export default {
160
160
watch (() => v .loggedIn , () => v .boardData .mutate (getBoards)) // Update boards on login
161
161
watch (() => v .boardData .error , err => err ? $alertStore .error (err) : null ) // Handle errors
162
162
163
- return { ... toRefs (v), generateCatId, toggleCategory, humanDate }
163
+ return { ... toRefs (v), generateCatId, toggleCategory, humanDate, decode, truncate }
164
164
}
165
165
}
166
166
</script >
@@ -236,7 +236,8 @@ img.avatar-small {
236
236
.board {
237
237
display : flex ;
238
238
flex-direction : row ;
239
- padding : 0 0 1rem 0 ;
239
+ padding : 0.5rem 0 ;
240
+ border-bottom : 1px solid rgba (215 , 215 , 215 , 0.35 );
240
241
@include break-mobile-sm { flex-direction : column ; }
241
242
.info {
242
243
flex : 2 0 0 ;
@@ -277,15 +278,11 @@ img.avatar-small {
277
278
}
278
279
}
279
280
280
- .board-secondary {
281
- display : flex ;
282
- flex : 1 ;
283
- flex-direction : column ;
284
- }
285
-
286
281
.view-count {
282
+ padding-top : 0.5rem ;
283
+ flex : 0 1 10% ;
284
+ margin-right : 1rem ;
287
285
@include info-text ;
288
- flex : 0 0 50% ;
289
286
290
287
& -posts ,
291
288
& -threads {
@@ -307,15 +304,16 @@ img.avatar-small {
307
304
}
308
305
309
306
.last-post {
307
+ padding-top : 0.5rem ;
310
308
@include info-text ;
311
- flex : 2 ;
312
309
word-break : break-word ;
310
+ flex : 0.5 1 120px ;
311
+ @include break-min-desktop {
312
+ text-align : right ;
313
+ }
313
314
}
314
315
315
- @include break-max-desktop {
316
- .view-count {
317
- flex : 0 0 auto ;
318
- }
316
+ @include break-mobile-sm {
319
317
.view-count-posts ,
320
318
.view-count-threads {
321
319
display : inline ;
@@ -325,18 +323,6 @@ img.avatar-small {
325
323
text-align : left ;
326
324
}
327
325
}
328
-
329
- @include break-min-desktop {
330
- .info {
331
- flex : 2 ;
332
- }
333
- .board-secondary {
334
- flex-direction : row ;
335
- .view-count {
336
- padding-right : 2rem ;
337
- }
338
- }
339
- }
340
326
}
341
327
342
328
@include break-mobile-sm {
0 commit comments