File tree 4 files changed +21
-2
lines changed
4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ < script type ="text/javascript " src ="{{ "/assets/js/index.js" | relative_url }}"> </ script >
1
2
< footer class ="w-full text-center text-gray-500 p-8 bottom-0 " style ="background: #191e38; ">
2
3
< div class ="container flex items-center justify-between flex-col md:flex-row py-4 ">
3
4
< div class ="text-center md:text-left ">
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ <h1 class="text-3xl mt-2 tracking-tight leading-10 font-extrabold text-gray-900
43
43
</ div >
44
44
45
45
< div class ="container max-w-screen-sm mt-12 ">
46
- < form class ="mt-8 sm:flex justify-center " action ="https://plausible.us20.list-manage.com/subscribe/post?u=aa3638e2a24986bbda7c17506&id=a307649d1b " method ="post ">
46
+ < form class ="mt-8 sm:flex justify-center " id =" newsletter-signup " action ="https://plausible.us20.list-manage.com/subscribe/post?u=aa3638e2a24986bbda7c17506&id=a307649d1b " method ="post ">
47
47
< input type ="email " name ="EMAIL " required class ="appearance-none w-full px-5 py-3 border border-gray-300 text-base leading-6 rounded-md text-gray-900 bg-white placeholder-gray-500 focus:outline-none focus:shadow-outline focus:border-blue-300 transition duration-150 ease-in-out sm:max-w-xs " placeholder ="Enter your email " />
48
48
< div class ="mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0 ">
49
49
< button class ="w-full flex items-center justify-center px-5 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline transition duration-150 ease-in-out ">
Original file line number Diff line number Diff line change
1
+ var newsletterForm = document . getElementById ( 'newsletter-signup' )
2
+
3
+ if ( newsletterForm ) {
4
+ newsletterForm . addEventListener ( 'submit' , function ( e ) {
5
+ e . preventDefault ( ) ;
6
+ setTimeout ( submitForm , 1000 ) ;
7
+ var formSubmitted = false ;
8
+
9
+ function submitForm ( ) {
10
+ if ( ! formSubmitted ) {
11
+ formSubmitted = true ;
12
+ newsletterForm . submit ( ) ;
13
+ }
14
+ }
15
+
16
+ plausible ( 'Newsletter signup' , { callback : submitForm } ) ;
17
+ } )
18
+ }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ <h1 class="text-4xl font-black">The Plausible Blog</h1>
13
13
</ div >
14
14
15
15
< div class ="container max-w-screen-sm mt-12 ">
16
- < form class ="mt-8 sm:flex justify-center " action ="https://plausible.us20.list-manage.com/subscribe/post?u=aa3638e2a24986bbda7c17506&id=a307649d1b " method ="post ">
16
+ < form class ="mt-8 sm:flex justify-center " action ="https://plausible.us20.list-manage.com/subscribe/post?u=aa3638e2a24986bbda7c17506&id=a307649d1b " method ="post " id =" newsletter-signup " >
17
17
< input type ="email " name ="EMAIL " required class ="appearance-none w-full px-5 py-3 border border-gray-300 text-base leading-6 rounded-md text-gray-900 bg-white placeholder-gray-500 focus:outline-none focus:shadow-outline focus:border-blue-300 transition duration-150 ease-in-out sm:max-w-xs " placeholder ="Enter your email " />
18
18
< div class ="mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0 ">
19
19
< button class ="w-full flex items-center justify-center px-5 py-3 border border-transparent text-base leading-6 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline transition duration-150 ease-in-out ">
You can’t perform that action at this time.
0 commit comments