Skip to content

Commit

Permalink
Merge pull request #86 from fightforthefuture/airtable-cms
Browse files Browse the repository at this point in the history
Add airtable cms
  • Loading branch information
kenmickles authored Oct 25, 2021
2 parents bf16fc6 + efdbfe6 commit ec2dbcc
Show file tree
Hide file tree
Showing 17 changed files with 696 additions and 112 deletions.
23 changes: 19 additions & 4 deletions components/ActionNetworkForm.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<i18n src="~/locales/components/ActionNetworkForm.yml"></i18n>
<i18n src="~/locales/global.yml"></i18n>
<i18n src="~/locales/cms.yml"></i18n>

<template>
<div>
Expand Down Expand Up @@ -206,8 +207,8 @@

<!-- STEP 2: AFTER-ACTION -->
<div v-if="hasSigned" class="text-center mt-5">
<h3 tabindex="-1" ref="afteraction" class="text-success">{{ $t('thanks.title') }}</h3>
<p>{{ $t('thanks.share') }}</p>
<h3 tabindex="-1" ref="afteraction" class="text-success">{{ thanksTitle }}</h3>
<p>{{ thanksShare }}</p>
<div class="row">
<div class="col-sm-12 col-lg-4 mb-2 mb-md-0">
<ShareButton
Expand Down Expand Up @@ -288,7 +289,7 @@ export default {
type: String,
required: false,
default: function () {
return this.$t('global.site_title')
return this.$t('cms.site_title')
}
},
fccDocket: {
Expand Down Expand Up @@ -337,7 +338,7 @@ export default {
type: String,
required: false,
default: function() {
return `${this.$t('global.site_url')}?signed=true`
return `${this.$t('cms.site_url')}?signed=true`
}
},
isJointPetition: {
Expand All @@ -348,6 +349,20 @@ export default {
regulationsDoc: {
type: String,
required: false
},
thanksTitle: {
type: String,
required: false,
default: function () {
return this.$te('cms.petition_thanks_title') ? this.$t('cms.petition_thanks_title') : this.$t('thanks.title')
}
},
thanksShare: {
type: String,
required: false,
default: function() {
return this.$te('cms.petition_thanks_share_ask') ? this.$t('cms.petition_thanks_share_ask') : this.$t('thanks.share')
}
}
},
Expand Down
9 changes: 0 additions & 9 deletions components/DefaultLayout.vue

This file was deleted.

5 changes: 0 additions & 5 deletions components/Logo.vue

This file was deleted.

17 changes: 4 additions & 13 deletions components/LogoCloud.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<i18n src="~/locales/cms.yml"></i18n>
<style lang="scss" scoped>
ul {
list-style-type: none;
Expand All @@ -15,18 +16,8 @@ ul {
</style>

<template lang="pug">
ul.row
li.col-6.col-sm-3(v-for="logo in logos")
ul.row(v-if="$te('cms.supporters')")
li.col-6.col-sm-3(v-for="logo in $t('cms.supporters')")
.bg-white.rounded.d-flex.align-items-center.justify-content-center.mb-2
img(:src="logo.image_url" :alt="`${logo.name} logo`")
img(:src="logo.logo" :alt="`${logo.name} logo`")
</template>

<script>
import logos from '~/assets/data/logos.json'
export default {
computed: {
logos: () => logos
}
}
</script>
25 changes: 0 additions & 25 deletions components/PageHeader.vue

This file was deleted.

3 changes: 2 additions & 1 deletion components/Scorecard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<i18n src="~/locales/components/Scorecard.yml"></i18n>
<i18n src="~/locales/global.yml"></i18n>
<i18n src="~/locales/cms.yml"></i18n>
<style lang="scss" scoped>
.targets-list {
text-align:left;
Expand Down Expand Up @@ -133,7 +134,7 @@
size="sm"
:is-button="false"
:text="tweetText(target)"
:url="$t('global.sharing.url')"
:url="$t('cms.site_url')"
@click.native="$trackClick('logo_tweet_button', target.twitter.toLowerCase())">
{{ $t('tweet_at') }}
</share-button>
Expand Down
6 changes: 3 additions & 3 deletions components/ShareButton.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<i18n src="~/locales/global.yml"></i18n>
<i18n src="~/locales/cms.yml"></i18n>

<template>
<a :href="shareURL" target="_blank"
Expand Down Expand Up @@ -66,8 +66,8 @@ export default {
},
shareURL() {
const network = this.networkName
let url = this.url || `${this.$t('global.sharing.url')}${this.$nuxt.$route.path}`
const text = this.text || this.$t('global.sharing.default_tweet_text')
let url = this.url || `${this.$t('cms.site_url')}${this.$nuxt.$route.path}`
const text = this.text || this.$t('cms.default_tweet_text')
if (network === 'facebook' && !url.match(/facebook\.com\/sharer/)) {
url = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`
Expand Down
14 changes: 7 additions & 7 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<i18n src="~/locales/global.yml"></i18n>
<i18n src="~/locales/cms.yml"></i18n>

<template>
<div>
Expand All @@ -18,13 +18,13 @@ import { createMetaTags } from '~/assets/js/helpers'
export default {
head() {
return {
title: this.$t('global.site_title'),
title: this.$t('cms.site_title'),
meta: createMetaTags({
siteName: this.$t('global.site_title'),
title: this.$t('global.sharing.title'),
description: this.$t('global.sharing.description'),
image: this.$t('global.sharing.image'),
url: this.$t('global.sharing.url')
siteName: this.$t('cms.site_title'),
title: this.$t('cms.open_graph_title'),
description: this.$t('cms.open_graph_description'),
image: this.$t('cms.open_graph_image'),
url: this.$t('cms.site_url')
})
}
},
Expand Down
25 changes: 25 additions & 0 deletions locales/cms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
en:
cms:
site_title: SITE TITLE
site_url: https://www.site_url.com
open_graph_title:
open_graph_description:
open_graph_image:
default_tweet_text:

intro_title: SITE TITLE
intro_description: Sub heading goes here, lorem ipsum dolor sit amet, consectetur adipiscing elit. In nibh libero, venenatis sed justo eu, sollicitudin nisi. Integer semper tortor orci, id ultricies velit laoreet in. Vestibulum sit amet ante vel risus ornare ultrices sed id leo.

petition_title: Sign the petition
petition_description: This issue is important because lorem ipsum dolor sit amet, consectetur elit. In nibh libero, venenatis sed justo eu, sollicitudin nisi. Integer semper tortor orci, id ultricies velit laoreet in. Vestibulum sit amet ante vel risus ornare ultrices sed id leo.
petition_id:
petition_tags:
petition_thanks_title:
petition_thanks_share_ask:

callpower_id:
callpower_script:

supporters:
- name: Sample Org
logo: "/share.jpg"
8 changes: 0 additions & 8 deletions locales/global.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# GLOBAL Site Translations, intentionally namespaced
en:
global:
site_title: __REPLACE_ME_WITH_DOMAIN_NAME__
site_url: https://www.__REPLACE_ME_WITH_DOMAIN_NAME__
donation_url: https://www.fightforthefuture.org/donate/
sharing:
title: __REPLACE_ME_WITH_DOMAIN_NAME__
description: A Fight for the Future website
image: https://www.__REPLACE_ME_WITH_DOMAIN_NAME__/share.jpg
default_tweet_text: FIXME
url: https://www.__REPLACE_ME_WITH_DOMAIN_NAME__
letter_text: |
TODO: letter text goes here
common:
Expand Down
Loading

0 comments on commit ec2dbcc

Please sign in to comment.