Limit length of room entry teasers
This commit is contained in:
parent
7a6f6ff6e8
commit
fb5b77e7f2
|
|
@ -5,8 +5,8 @@
|
|||
</div>
|
||||
<div class="room-entry__content">
|
||||
<h2 class="room-entry__title">{{title}}</h2>
|
||||
<p class="room-entry__teaser">
|
||||
{{teaser}}
|
||||
<p class="room-entry__teaser" v-html="teaser">
|
||||
|
||||
</p>
|
||||
<user-widget class="room-entry__author" v-bind="author"></user-widget>
|
||||
</div>
|
||||
|
|
@ -36,7 +36,8 @@
|
|||
let first = this.contents.find(content => content.type !== 'image_url');
|
||||
switch (first.type) {
|
||||
case 'text_block':
|
||||
return first.value.text;
|
||||
return first.value.text.replace(/<p>/g, '').replace(/<\/p>/g, '<br>').slice(0, 75) + '...';
|
||||
// return first.value.text;
|
||||
case 'link_block':
|
||||
return first.value.url;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue