Sha256: b15aaa459a2d283d48196f0a6d0791820a638936f744de8d5c7c94141009c80e

Contents?: true

Size: 1.93 KB

Versions: 15

Compression:

Stored size: 1.93 KB

Contents

<template>
  <div class="mt-2 grid grid-cols-1 gap-4">
    <textarea-input
      :label="$t(`page.form.seoTitle`)"
      name="seo-title"
      :max-length="60"
      :rows="2"
      v-model="seoTitleInput"
    />

    <textarea-input
      :label="$t(`page.form.metaDescription`)"
      name="meta-description"
      :max-length="155"
      :rows="5"
      v-model="metaDescriptionInput"
    />

    <textarea-input
      :label="$t(`page.form.ogTitle`)"
      name="og-title"
      :max-length="60"
      :rows="2"
      v-model="ogTitleInput"
    />

    <textarea-input
      :label="$t(`page.form.ogDescription`)"
      name="og-description"
      :max-length="200"
      :rows="6"
      v-model="ogDescriptionInput"
    />

    <image-input
      :label="$t(`page.form.ogImageUrl`)"
      name="og-image-url"
      :hasAltText="false"
      v-model="ogImageUrlInput"
    />
  </div>
</template>

<script>
export default {
  name: 'PageSEOForm',
  props: {
    page: { type: Object, required: true },
    errors: { type: Object, default: () => {} },
  },
  computed: {
    seoTitleInput: {
      get() {
        return this.page.seoTitle
      },
      set(seoTitle) {
        this.$emit('on-change', { seoTitle })
      },
    },
    metaDescriptionInput: {
      get() {
        return this.page.metaDescription
      },
      set(metaDescription) {
        this.$emit('on-change', { metaDescription })
      },
    },
    ogTitleInput: {
      get() {
        return this.page.ogTitle
      },
      set(ogTitle) {
        this.$emit('on-change', { ogTitle })
      },
    },
    ogDescriptionInput: {
      get() {
        return this.page.ogDescription
      },
      set(ogDescription) {
        this.$emit('on-change', { ogDescription })
      },
    },
    ogImageUrlInput: {
      get() {
        return { url: this.page.ogImageUrl }
      },
      set(ogImage) {
        this.$emit('on-change', { ogImageUrl: ogImage.url })
      },
    },
  },
}
</script>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
maglevcms-1.2.2 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.2.1 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.2.0 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.7 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.6 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.5 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.4 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.3 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.2 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.1 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.1.0 app/frontend/editor/components/page/form/seo.vue
maglevcms-1.0.0 app/javascript/editor/components/page/form/seo.vue
maglevcms-1.0.0.rc3 app/javascript/editor/components/page/form/seo.vue
maglevcms-1.0.0.rc2 app/javascript/editor/components/page/form/seo.vue
maglevcms-1.0.0.rc1 app/javascript/editor/components/page/form/seo.vue