File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ const formattedDate = computed(() => {
3535
3636const MAX_VISIBLE_AUTHORS = 2
3737
38+ const getInitials = (name : string ) =>
39+ name
40+ .split (' ' )
41+ .map (n => n [0 ])
42+ .join (' ' )
43+ .toUpperCase ()
44+ .slice (0 , 2 )
45+
3846const visibleAuthors = computed (() => {
3947 console .log (' blog post 5' )
4048 props .authors .map (author => {
@@ -117,13 +125,13 @@ const formattedAuthorNames = computed(() => {
117125 >
118126 <img
119127 v-if =" author.avatar"
120- :src = " author.avatar"
128+ v-bind = " { src: author.avatar } "
121129 :alt =" author.name"
122130 class =" w-full h-full object-cover"
123131 />
124- <!-- < span v-else style="font-size: 20px; color: #666; font-weight: 500">
132+ <span v-else style =" font-size : 20px ; color : #666 ; font-weight : 500 " >
125133 {{ getInitials(author.name) }}
126- </span> -->
134+ </span >
127135 </span >
128136 <!-- +N badge -->
129137 <span
You can’t perform that action at this time.
0 commit comments