Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephiescastle committed Jun 11, 2024
1 parent 6bc8ff9 commit d3274db
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 40 deletions.
6 changes: 4 additions & 2 deletions packages/vue/src/components/BlockCta/BlockCta.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<div class="bg-gray-light edu:bg-primary md:mx-0 sm:py-8 md:py-10 md:px-0 sm:mx-20 px-6 py-6 text-center">
<div
class="bg-gray-light edu:bg-primary md:mx-0 sm:py-8 md:py-10 md:px-0 sm:mx-20 px-6 py-6 text-center"
>
<div class="md:mx-16 xl:mx-24">
<p class="text-h6 edu:text-white edu:font-extrabold">{{ data.heading }}</p>
</div>
Expand All @@ -26,7 +28,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { mapStores } from 'pinia'
import { useThemeStore } from '../../store/theme';
import { useThemeStore } from '../../store/theme'
import BaseButton from './../BaseButton/BaseButton.vue'
import IconExternal from './../Icons/IconExternal.vue'
Expand Down
105 changes: 67 additions & 38 deletions packages/vue/src/templates/PageEventDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
itemprop="thumbnailUrl"
:content="data.thumbnailImage.original"
/>
<meta itemprop="startDate" :content="data.startDatetime" />
<meta
itemprop="startDate"
:content="data.startDatetime"
/>
<meta
v-if="data.endDatetime"
itemprop="endDate"
Expand All @@ -23,46 +26,55 @@
:content="data.summary || data.body"
/>

<LayoutHelper indent="col-2" class="mb-6 lg:mb-12">
<div v-if="data.label" class="flex flex-wrap items-start mb-3">
<LayoutHelper
indent="col-2"
class="mb-6 lg:mb-12"
>
<div
v-if="data.label"
class="flex flex-wrap items-start mb-3"
>
<nuxt-link
class="py-3 cursor-pointer group nuxt-link-active text-subtitle text-theme-red can-hover:hover:text-theme-red-hover"
to="/events"
>
{{ data.label }}
</nuxt-link>
</div>
<BaseHeading level="h1" itemprop="name">
<BaseHeading
level="h1"
itemprop="name"
>
{{ data.title }}
</BaseHeading>
</LayoutHelper>

<!-- share buttons -->
<LayoutHelper indent="col-1" class="relative mb-16 lg:mb-0">
<ShareButtons :title="data.title" :url="data.url" />
<LayoutHelper
indent="col-1"
class="relative mb-16 lg:mb-0"
>
<ShareButtons
:title="data.title"
:url="data.url"
/>
</LayoutHelper>

<LayoutHelper indent="col-2">
<EventDetailHero
:image="data.heroImage"
:start-date-split="
formattedSplitEventDates
"
:start-date-split="formattedSplitEventDates"
/>

<!-- Event details -->
<div>
<div
class="py-1 mb-10 text-xl lg:mb-0 lg:flex"
:class="
data.registerLink && data.registerLink.length > 0 ? '' : 'lg:mb-10'
"
:class="data.registerLink && data.registerLink.length > 0 ? '' : 'lg:mb-10'"
>
<div class="PageEventDetail__Metadata text-theme-red">
<IconCalendar class="relative mr-3" />
<span>{{
formattedEventDates
}}</span>
<span>{{ formattedEventDates }}</span>
</div>
<div
v-show="displayTime"
Expand All @@ -79,8 +91,14 @@
itemtype="https://schema.org/VirtualLocation"
class="PageEventDetail__Metadata text-theme-red"
>
<link itemprop="url" :href="data.locationLink" />
<meta itemprop="name" :content="data.location" />
<link
itemprop="url"
:href="data.locationLink"
/>
<meta
itemprop="name"
:content="data.location"
/>
<IconLocation class="relative mr-3" />
<BaseLink
variant="none"
Expand All @@ -95,7 +113,10 @@
v-else-if="data.location"
class="PageEventDetail__Metadata text-theme-red"
>
<meta itemprop="location" :content="data.location" />
<meta
itemprop="location"
:content="data.location"
/>
<IconLocation class="relative mr-3" />
<BaseLink
v-if="data.locationLink"
Expand All @@ -116,11 +137,7 @@
data.registerLink[0].externalLink)
"
class="w-full px-0 mb-5"
:href="
data.registerLink[0].externalLink
? data.registerLink[0].externalLink
: null
"
:href="data.registerLink[0].externalLink ? data.registerLink[0].externalLink : null"
:to="
data.registerLink[0].page && data.registerLink[0].page.url
? data.registerLink[0].page.url
Expand Down Expand Up @@ -173,10 +190,12 @@
>
<div class="grid-cols-10 lg:grid">
<div class="col-span-7">
<BaseHeading level="h2" class="mb-5 md:mb-8">Speakers</BaseHeading>
<div
class="flex flex-col flex-wrap justify-start md:flex-row md:-mx-4"
<BaseHeading
level="h2"
class="mb-5 md:mb-8"
>Speakers</BaseHeading
>
<div class="flex flex-col flex-wrap justify-start md:flex-row md:-mx-4">
<div
v-for="(speaker, index) in data.speakers"
:key="index"
Expand Down Expand Up @@ -222,7 +241,10 @@
{{ speaker.name }}
</template>
</h3>
<p v-if="speaker.title" class="mb-3 text-gray-dark">
<p
v-if="speaker.title"
class="mb-3 text-gray-dark"
>
{{ speaker.title }}
</p>
<p>
Expand Down Expand Up @@ -260,16 +282,20 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { mixinFormatEventDates, mixinFormatEventTimeInHoursAndMinutes, mixinFormatSplitEventDates } from '../utils/mixins';
import {
mixinFormatEventDates,
mixinFormatEventTimeInHoursAndMinutes,
mixinFormatSplitEventDates
} from '../utils/mixins'
import PlaceholderPortrait from '@explorer-1/common/src/images/svg/placeholder-portrait.svg'
export default defineComponent({
name: 'PageEventDetail',
props: {
data: {
type: Object,
required: false,
},
required: false
}
},
data() {
return {
Expand All @@ -278,20 +304,23 @@ export default defineComponent({
},
computed: {
displayTime(): string {
return this.data ? mixinFormatEventTimeInHoursAndMinutes(
this.data.startDatetime,
this.data.endDatetime,
this.data.endTime
) : ''
return this.data
? mixinFormatEventTimeInHoursAndMinutes(
this.data.startDatetime,
this.data.endDatetime,
this.data.endTime
)
: ''
},
formattedEventDates(): string {
return this.data ? mixinFormatEventDates(this.data.startDatetime, this.data.endDatetime) : ''
},
formattedSplitEventDates() {
return this.data ? mixinFormatSplitEventDates(this.data.startDatetime, this.data.endDatetime) : ''
return this.data
? mixinFormatSplitEventDates(this.data.startDatetime, this.data.endDatetime)
: ''
}
},
}
})
</script>
<style lang="scss">
Expand Down

0 comments on commit d3274db

Please sign in to comment.