This commit is contained in:
lesion 2022-01-21 12:32:38 +01:00
parent 6a6e6d06ef
commit 2265249e2c
3 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@
<v-list-item-content three-line> <v-list-item-content three-line>
<v-list-item-title>{{item.name}}</v-list-item-title> <v-list-item-title>{{item.name}}</v-list-item-title>
<v-list-item-subtitle>{{ item.description }}</v-list-item-subtitle> <v-list-item-subtitle>{{ item.description }}</v-list-item-subtitle>
<v-list-item-subtitle>Last update: {{ item.updatedAt }} / Tags: / Link: {{item.link}}</v-list-item-subtitle> <v-list-item-subtitle>Last update: {{ item.updatedAt }} / Link: {{item.link}}</v-list-item-subtitle>
</v-list-item-content> </v-list-item-content>
</template> </template>
</v-autocomplete> </v-autocomplete>
@ -49,7 +49,7 @@ export default {
}, },
computed: { computed: {
code () { code () {
return `<script src='${process.env.baseUrl}/display-feed.js'><\/script><display-feed feed="${process.env.baseUrl}/api/source/${this.source && this.source.id}"></display-feed>` return `<script src='${process.env.baseUrl}/display-feed.js'><\/script><display-feed summary='false' feed="${process.env.baseUrl}/api/source/${this.source && this.source.id}"></display-feed>`
}, },
feed () { feed () {
if (this.source && this.source.id) { if (this.source && this.source.id) {

View file

@ -604,7 +604,7 @@ function instance($$self, $$props, $$invalidate) {
class DisplayFeed extends SvelteElement { class DisplayFeed extends SvelteElement {
constructor(options) { constructor(options) {
super(); super();
this.shadowRoot.innerHTML = `<style>#displayFeed{font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;overflow-x:hidden;font-size:1.2rem;width:100%;box-sizing:content-box}#headerTitle{line-height:45px;font-size:1.3rem;font-weight:600}.post{display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0px;color:black;text-decoration:none;transition:background .3s ease-in-out;border-radius:5px;;}.post:hover{background-color:#ececec}.post .media,.post .content{padding:10px;display:flex;flex-direction:column;flex-basis:100%;flex:1}.post .content{flex:3}.post .content .title{font-size:1.5rem;font-weight:700;color:black}.post .content .subtitle{font-weight:100;color:#666;font-size:.9rem}.post .content .summary{margin-top:1rem;color:#333;font-size:1rem}.post .media img{border-radius:5px;flex:1;max-height:250px;width:400px;object-fit:cover}</style>`; this.shadowRoot.innerHTML = `<style>#displayFeed{font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;overflow-x:hidden;font-size:1.2rem;width:100%;box-sizing:content-box}#headerTitle{line-height:45px;font-size:1.3rem;font-weight:600}.post{display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0px;color:black;text-decoration:none;transition:background .3s ease-in-out;border-radius:5px;;}.post:hover{background-color:#ececec}.post .media,.post .content{padding:10px;display:flex;flex-direction:column;flex-basis:100%;flex:1}.post .content{flex:3}.post .content .title{font-size:1.5rem;font-weight:700;color:black}.post .content .subtitle{font-weight:100;color:#666;font-size:.9rem}.post .content .summary{margin-top:1rem;color:#333;font-size:1rem}.post .media img{border-radius:5px;flex:1;height:250px;width:400px;object-fit:cover}</style>`;
init(this, { init(this, {
target: this.shadowRoot, target: this.shadowRoot,
props: attribute_to_object(this.attributes), props: attribute_to_object(this.attributes),

View file

@ -145,7 +145,7 @@
.post .media img { .post .media img {
border-radius: 5px; border-radius: 5px;
flex: 1; flex: 1;
max-height: 250px; height: 250px;
width: 400px; width: 400px;
object-fit: cover; object-fit: cover;
} }