File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 <v-icon left >{{ mdiBookOpenVariant }}</v-icon >
2828 Documentation
2929 </v-btn >
30+ <p class =" body-2 mt-6 mb-4" >
31+ Subscribe to my newsletter where I share the new features and updates on
32+ httpSMS.
33+ </p >
34+ <v-progress-circular
35+ v-if =" !substackLoaded"
36+ indeterminate
37+ size =" 40"
38+ width =" 2"
39+ color =" primary"
40+ ></v-progress-circular >
41+ <div id =" custom-substack-embed" ref =" custom-substack-embed" ></div >
3042 </div >
3143</template >
3244
3345<script lang="ts">
3446import { mdiBookOpenVariant } from ' @mdi/js'
47+ import Vue from ' vue'
3548
36- export default {
49+ export default Vue . extend ( {
3750 name: ' BlogInfo' ,
3851 data() {
3952 return {
4053 mdiBookOpenVariant ,
54+ substackLoaded: false ,
4155 }
4256 },
43- }
57+ mounted() {
58+ setTimeout (() => {
59+ const s = document .createElement (' script' )
60+ s .type = ' text/javascript'
61+ s .src = ' https://substackapi.com/widget.js'
62+ document .getElementsByTagName (' head' )[0 ].appendChild (s )
63+ this .substackLoaded = true
64+ }, 5000 )
65+ },
66+ })
4467 </script >
Original file line number Diff line number Diff line change @@ -662,6 +662,25 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
662662 </v-card >
663663 </v-col >
664664 </v-row >
665+ <client-only >
666+ <v-row >
667+ <v-col class =" text-center" md =" 6" offset-md =" 3" >
668+ <p class =" text-h4 text--secondary mt-6 mb-4" >
669+ Subscribe to my newsletter where I share new features and
670+ updates on httpSMS.
671+ </p >
672+ <v-progress-circular
673+ v-if =" !substackLoaded"
674+ indeterminate
675+ size =" 40"
676+ width =" 2"
677+ class =" mt-8"
678+ color =" primary"
679+ ></v-progress-circular >
680+ <div id =" custom-substack-embed" ref =" substackEmbed" ></div >
681+ </v-col >
682+ </v-row >
683+ </client-only >
665684 </v-container >
666685 </v-sheet >
667686 </div >
@@ -719,8 +738,18 @@ export default Vue.extend({
719738 mdiLanguageGo ,
720739 selectedTab: ' javascript' ,
721740 yearlyPricing: false ,
741+ substackLoaded: false ,
722742 }
723743 },
744+ mounted() {
745+ setTimeout (() => {
746+ const s = document .createElement (' script' )
747+ s .type = ' text/javascript'
748+ s .src = ' https://substackapi.com/widget.js'
749+ document .getElementsByTagName (' head' )[0 ].appendChild (s )
750+ this .substackLoaded = true
751+ }, 5000 )
752+ },
724753})
725754 </script >
726755
Original file line number Diff line number Diff line change 1313
1414// LemonSqueezy
1515window . lemonSqueezyAffiliateConfig = { store : 'httpsms' }
16+
17+ // substack
18+ window . CustomSubstackWidget = {
19+ substackUrl : 'httpsms.substack.com' ,
20+ placeholder : 'example@gmail.com' ,
21+ buttonText : 'Subscribe' ,
22+ theme : 'green' ,
23+ }
Original file line number Diff line number Diff line change @@ -195,6 +195,13 @@ export const getters = {
195195 getNotification ( state : State ) : Notification {
196196 return state . notification
197197 } ,
198+
199+ getSubStackLoaded ( ) {
200+ if ( ! process . client ) {
201+ return false
202+ }
203+ return ( window as any ) . CustomSubstackWidget . scriptLoaded
204+ } ,
198205}
199206
200207export const mutations = {
You can’t perform that action at this time.
0 commit comments