Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit a96c04f

Browse files
authored
Merge pull request #487 from ignapas/newsletter-archive
Newsletter archive
2 parents 457fd5f + 99a8a81 commit a96c04f

File tree

6 files changed

+52
-12
lines changed

6 files changed

+52
-12
lines changed

nuxt.config.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,13 @@ export default {
148148
** Plugins to load before mounting the App
149149
*/
150150
plugins: [
151-
'@/plugins/bootstrap',
152-
'@/plugins/contentful',
151+
'@/plugins/bootstrap',
152+
'@/plugins/contentful',
153153
'@/plugins/amplify',
154154
'@/plugins/documentation-hub-redirects',
155-
{
156-
src: '@/plugins/system-design-components', mode: 'client'
157-
},
158-
{
159-
src: '@/plugins/tsviewer', mode: 'client'
160-
}
155+
{ src: '@/plugins/postscribe', mode: 'client' },
156+
{ src: '@/plugins/system-design-components', mode: 'client' },
157+
{ src: '@/plugins/tsviewer', mode: 'client' }
161158
],
162159
/*
163160
** Nuxt.js dev-modules

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"marked": "^0.7.0",
4747
"nuxt": "^2.12.1",
4848
"plyr": "^3.6.3",
49+
"postscribe": "^2.0.8",
4950
"prettier": "^1.19.1",
5051
"ramda": "^0.26.1",
5152
"redirect-ssl": "^1.4.1",

pages/contact-us/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848

4949
<div v-if="isBugSubmitted" class="msg-success">
5050
<p>
51-
Thank you for letting us know about this error or technical issue.
52-
If you requested a response, a member of the SPARC team will contact
53-
you within two business days.
51+
Thank you for letting us know about this error or issue. If you
52+
requested a response, a member of the SPARC team will contact you
53+
within two business days.
5454
</p>
5555
<a href="#" @click="resetForms">Submit another inquiry</a>
5656
</div>
@@ -111,7 +111,7 @@ export default {
111111
value: 'general'
112112
},
113113
{
114-
label: 'I want to report an error or a technical issue',
114+
label: 'I want to report an error or an issue',
115115
value: 'bug'
116116
}
117117
],

pages/news-and-events/index.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@
109109
<h3 class="mb-24">Sign up for the SPARC Newsletter</h3>
110110
<p class="mb-40">Keep up to date with all the latest news and events from the SPARC Portal.</p>
111111
<newsletter-form />
112+
<div class="newsletter-archive">
113+
<style type="text/css">
114+
.campaign { margin-top: .5em; }
115+
</style>
116+
<h3 class="mb-24">View previous Newsletters</h3>
117+
<div id="newsletter-archive" />
118+
<a href="//us2.campaign-archive.com/home/?u=e60c48f231a30b544eed731ea&id=c81a347bd8" target="_blank">View all Newsletters</a>
119+
</div>
112120
</el-col>
113121
<el-col :xs="24" :sm="12" class="twitter-wrap">
114122
<div v-twitter-widgets>
@@ -244,6 +252,10 @@ export default Vue.extend<Data, Methods, Computed, never>({
244252
const news = await fetchNews(client, this.$route.query.search as string, this.news.total, 2)
245253
this.news = { ...this.news, items: { ...this.news.items, ...news.items } }
246254
}
255+
},
256+
257+
mounted() {
258+
this.$injectNewsletterArchive('#newsletter-archive')
247259
}
248260
})
249261
</script>
@@ -364,4 +376,12 @@ h3 {
364376
text-decoration: underline;
365377
}
366378
}
379+
380+
.newsletter-archive {
381+
margin-top: 3em;
382+
& > a {
383+
display: inline-block;
384+
margin-top: 1em;
385+
}
386+
}
367387
</style>

plugins/postscribe.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import postscribe from 'postscribe'
2+
3+
export default (_, inject) => {
4+
inject('injectNewsletterArchive', elementSelector => {
5+
postscribe(
6+
elementSelector,
7+
'<script language="javascript" src="//science.us2.list-manage.com/generate-js/?u=e60c48f231a30b544eed731ea&fid=46414&show=5" type="text/javascript"></script>'
8+
)
9+
})
10+
}

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12227,6 +12227,13 @@ [email protected], postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17,
1222712227
source-map "^0.6.1"
1222812228
supports-color "^6.1.0"
1222912229

12230+
postscribe@^2.0.8:
12231+
version "2.0.8"
12232+
resolved "https://registry.yarnpkg.com/postscribe/-/postscribe-2.0.8.tgz#5b7a53aad4b690b6c2f75818fcefe74490f410d5"
12233+
integrity sha512-Sxt6pek38NKX85Vb/PbcritqVxsgPZQFLcuf4o0f7lXRb76jM0XP79SGwCBPRTuv+U2zqByQan8EzRjqquD73A==
12234+
dependencies:
12235+
prescribe ">=1.1.2"
12236+
1223012237
potpack@^1.0.1:
1223112238
version "1.0.1"
1223212239
resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf"
@@ -12247,6 +12254,11 @@ prepend-http@^1.0.0:
1224712254
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
1224812255
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
1224912256

12257+
prescribe@>=1.1.2:
12258+
version "1.1.3"
12259+
resolved "https://registry.yarnpkg.com/prescribe/-/prescribe-1.1.3.tgz#8d3122445f3fbaf4c4c5817ea527a17fc8139ee6"
12260+
integrity sha512-HEg0ElY5tmmCshST4tzl47+SirJO2cVo6j/+O4d6xIz+80ixNcN0GgPQsn76AgeTTIAQOrwq1rfoptubQuZ1Uw==
12261+
1225012262
prettier-linter-helpers@^1.0.0:
1225112263
version "1.0.0"
1225212264
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"

0 commit comments

Comments
 (0)