Compare commits
No commits in common. "132f8ba9342536082a90dade05ecb9dfe1828f3c" and "7a498393f8a70afe9ebca3fa366c0c8b841fce4b" have entirely different histories.
132f8ba934
...
7a498393f8
|
|
@ -15,7 +15,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ref="content-container" :class="{'content': true, 'content-container': true, 'open': hiddenContentVisible}">
|
<div class="content">
|
||||||
<div v-if="isRef">
|
<div v-if="isRef">
|
||||||
<div><small><a :href="outside_author_url">{{ outside_author_name }}</a> <span v-text="refText"></span>:</small></div>
|
<div><small><a :href="outside_author_url">{{ outside_author_name }}</a> <span v-text="refText"></span>:</small></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,14 +35,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
<p>
|
||||||
<div>
|
|
||||||
<div class="level" v-if="hasHiddenContent">
|
|
||||||
<div class="level-item">
|
|
||||||
<button class="is-link" @click.prevent="toggleHiddenContent">Read more</button>
|
|
||||||
</div>
|
|
||||||
<div class="level-item">
|
|
||||||
<small>
|
<small>
|
||||||
<span v-if="showFooterButtons">
|
<span v-if="showFooterButtons">
|
||||||
<a @click="like">Like</a>
|
<a @click="like">Like</a>
|
||||||
|
|
@ -53,7 +47,7 @@
|
||||||
· <a @click.prevent="debug">Debug</a>
|
· <a @click.prevent="debug">Debug</a>
|
||||||
</span>
|
</span>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="media" v-if="replying">
|
<div class="media" v-if="replying">
|
||||||
|
|
@ -132,8 +126,7 @@ export default {
|
||||||
selected: [],
|
selected: [],
|
||||||
destinations: [],
|
destinations: [],
|
||||||
selectedDestinations: [],
|
selectedDestinations: [],
|
||||||
categories: [],
|
categories: []
|
||||||
hiddenContentVisible: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -213,9 +206,6 @@ export default {
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
toggleHiddenContent() {
|
|
||||||
this.hiddenContentVisible = !this.hiddenContentVisible
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -223,15 +213,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
hasHiddenContent () {
|
|
||||||
const el = this.$refs['content-container']
|
|
||||||
if (!el) {
|
|
||||||
// eslint-disable-next-line
|
|
||||||
console.log('ref content-container not found')
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return el.scrollHeight > el.clientHeight
|
|
||||||
},
|
|
||||||
currentItem() {
|
currentItem() {
|
||||||
if (this.isRef) {
|
if (this.isRef) {
|
||||||
return this.innerRef
|
return this.innerRef
|
||||||
|
|
@ -336,11 +317,7 @@ export default {
|
||||||
}
|
}
|
||||||
if (!this.currentItem.author.name) {
|
if (!this.currentItem.author.name) {
|
||||||
if (this.currentItem.author.url) {
|
if (this.currentItem.author.url) {
|
||||||
try {
|
|
||||||
return new URL(this.currentItem.author.url).hostname
|
return new URL(this.currentItem.author.url).hostname
|
||||||
} catch (e) {
|
|
||||||
return this.currentItem.author.url
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.currentItem.author.name
|
return this.currentItem.author.name
|
||||||
|
|
@ -389,13 +366,4 @@ export default {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-container {
|
|
||||||
max-height: 20vh;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-container.open {
|
|
||||||
max-height: fit-content;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -106,7 +106,6 @@
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (!res.results) {
|
if (!res.results) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.feeds = []
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user