Skip to content

Commit

Permalink
Merge pull request #487 from ignapas/newsletter-archive
Browse files Browse the repository at this point in the history
Newsletter archive
  • Loading branch information
egauzens committed Jun 15, 2022
2 parents 457fd5f + 99a8a81 commit a96c04f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 12 deletions.
13 changes: 5 additions & 8 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,13 @@ export default {
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/bootstrap',
'@/plugins/contentful',
'@/plugins/bootstrap',
'@/plugins/contentful',
'@/plugins/amplify',
'@/plugins/documentation-hub-redirects',
{
src: '@/plugins/system-design-components', mode: 'client'
},
{
src: '@/plugins/tsviewer', mode: 'client'
}
{ src: '@/plugins/postscribe', mode: 'client' },
{ src: '@/plugins/system-design-components', mode: 'client' },
{ src: '@/plugins/tsviewer', mode: 'client' }
],
/*
** Nuxt.js dev-modules
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"marked": "^0.7.0",
"nuxt": "^2.12.1",
"plyr": "^3.6.3",
"postscribe": "^2.0.8",
"prettier": "^1.19.1",
"ramda": "^0.26.1",
"redirect-ssl": "^1.4.1",
Expand Down
8 changes: 4 additions & 4 deletions pages/contact-us/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@

<div v-if="isBugSubmitted" class="msg-success">
<p>
Thank you for letting us know about this error or technical issue.
If you requested a response, a member of the SPARC team will contact
you within two business days.
Thank you for letting us know about this error or issue. If you
requested a response, a member of the SPARC team will contact you
within two business days.
</p>
<a href="#" @click="resetForms">Submit another inquiry</a>
</div>
Expand Down Expand Up @@ -111,7 +111,7 @@ export default {
value: 'general'
},
{
label: 'I want to report an error or a technical issue',
label: 'I want to report an error or an issue',
value: 'bug'
}
],
Expand Down
20 changes: 20 additions & 0 deletions pages/news-and-events/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
<h3 class="mb-24">Sign up for the SPARC Newsletter</h3>
<p class="mb-40">Keep up to date with all the latest news and events from the SPARC Portal.</p>
<newsletter-form />
<div class="newsletter-archive">
<style type="text/css">
.campaign { margin-top: .5em; }
</style>
<h3 class="mb-24">View previous Newsletters</h3>
<div id="newsletter-archive" />
<a href="//us2.campaign-archive.com/home/?u=e60c48f231a30b544eed731ea&id=c81a347bd8" target="_blank">View all Newsletters</a>
</div>
</el-col>
<el-col :xs="24" :sm="12" class="twitter-wrap">
<div v-twitter-widgets>
Expand Down Expand Up @@ -244,6 +252,10 @@ export default Vue.extend<Data, Methods, Computed, never>({
const news = await fetchNews(client, this.$route.query.search as string, this.news.total, 2)
this.news = { ...this.news, items: { ...this.news.items, ...news.items } }
}
},
mounted() {
this.$injectNewsletterArchive('#newsletter-archive')
}
})
</script>
Expand Down Expand Up @@ -364,4 +376,12 @@ h3 {
text-decoration: underline;
}
}
.newsletter-archive {
margin-top: 3em;
& > a {
display: inline-block;
margin-top: 1em;
}
}
</style>
10 changes: 10 additions & 0 deletions plugins/postscribe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import postscribe from 'postscribe'

export default (_, inject) => {
inject('injectNewsletterArchive', elementSelector => {
postscribe(
elementSelector,
'<script language="javascript" src="//science.us2.list-manage.com/generate-js/?u=e60c48f231a30b544eed731ea&fid=46414&show=5" type="text/javascript"></script>'
)
})
}
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12227,6 +12227,13 @@ postcss@7.x.x, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17,
source-map "^0.6.1"
supports-color "^6.1.0"

postscribe@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/postscribe/-/postscribe-2.0.8.tgz#5b7a53aad4b690b6c2f75818fcefe74490f410d5"
integrity sha512-Sxt6pek38NKX85Vb/PbcritqVxsgPZQFLcuf4o0f7lXRb76jM0XP79SGwCBPRTuv+U2zqByQan8EzRjqquD73A==
dependencies:
prescribe ">=1.1.2"

potpack@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf"
Expand All @@ -12247,6 +12254,11 @@ prepend-http@^1.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=

prescribe@>=1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/prescribe/-/prescribe-1.1.3.tgz#8d3122445f3fbaf4c4c5817ea527a17fc8139ee6"
integrity sha512-HEg0ElY5tmmCshST4tzl47+SirJO2cVo6j/+O4d6xIz+80ixNcN0GgPQsn76AgeTTIAQOrwq1rfoptubQuZ1Uw==

prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
Expand Down

0 comments on commit a96c04f

Please sign in to comment.