Skip to content

Commit

Permalink
MODIFIED: small content changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sd-ditoy committed Oct 9, 2023
1 parent 3c691b0 commit 23418a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/components/blocks/PodcastList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
v-html="pod.description"
/>
<template v-if="pod.internal_url">
<router-link class="btn-more" :to="pod.url">{{ $t('ctas.readMore') }}</router-link>
<router-link class="btn-more" :to="pod.url">{{ $t('ctas.more') }}</router-link>
</template>
<template v-else>
<a class="btn-more" :href="pod.url" target="_blank">{{ $t('ctas.readMore') }}</a>
<a class="btn-more" :href="pod.url" target="_blank">{{ $t('ctas.more') }}</a>
</template>

</div>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default {
ctas: {
learnMore: 'Learn More',
readMore: 'Read More',
more: 'More',
viewAll: 'View All',
loadMore: 'Load More',
visitSite: 'Visit Site',
Expand Down
20 changes: 5 additions & 15 deletions src/views/PodcastDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,22 @@ export default {
const content = this.details?.content[0] || {};
const lead = this.leadSection;
let title = content.title || '';
title = lead.title || title;
title = content?.meta_title || lead.title || title;
return title;
},
metaDescription() {
const div = document.createElement('div');
const content = this.details?.content[0] || {};
const lead = this.leadSection;
let description = content.description || '';
div.innerHTML = lead.content || description;
div.innerHTML = content?.meta_description || lead.content || description;
description = div.textContent;
return description;
},
metaImage() {
const content = this.details?.content[0] || {};
let image = this.leadImage?.media || null;
image = this.details?.image || image;
image = content?.meta_image || this.details?.image || image;
if (image) {
return `${API_URL}/assets/${image}`;
}
Expand Down Expand Up @@ -179,19 +180,8 @@ export default {
// render(h) { return h(); },
async mounted() {
const locale = Intl.getCanonicalLocales(this.$i18n.locale);
const { data } = await this.$d.api.get(`/podcasts?fields[]=image&fields[]=content.title,content.description,content.page_blocks&filter[status][_eq]=published&filter[content][languages_code][_eq]=${locale}&filter[content][slug][_eq]=${this.slug}&limit=1`);
const { data } = await this.$d.api.get(`/podcasts?fields[]=image&fields[]=content.title,content.description,content.meta_title,content.meta_description,content.meta_image,content.page_blocks&filter[status][_eq]=published&filter[content][languages_code][_eq]=${locale}&filter[content][slug][_eq]=${this.slug}&limit=1`);
this.details = (Array.isArray(data) && data[0] !== null) ? data[0] : null;
/*
if (!this.$d.data) {
const url = `/${this.$i18n.locale}/case-studies/`;
window.canonical = window.location.origin + url;
this.$router.replace(url);
} else {
this.getRelatedCasestudies();
const root = document.querySelector(':root');
root.style.setProperty('--headerHeight', `${document.querySelector('header').clientHeight}px`);
}
*/
},
// beforeUpdate() {},
// updated() {},
Expand Down

0 comments on commit 23418a9

Please sign in to comment.