Skip to content

Commit 72ef7a9

Browse files
authored
Add news subscription form to landing page (#1806)
* Add news subscription form to landing page * Update index.ejs
1 parent c7872f7 commit 72ef7a9

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

themes/vue/layout/index.ejs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,40 @@
6767
</div>
6868
</div>
6969

70+
<div id="news">
71+
<div class="inner">
72+
<h3>Subscribe to our Weekly Newsletter</h3>
73+
<form
74+
class="newsletter-form"
75+
id="revue-form"
76+
name="revue-form"
77+
target="_blank"
78+
action="https://www.getrevue.co/profile/vuenewsletter/add_subscriber"
79+
method="post"
80+
@submit="subscribe"
81+
>
82+
<input
83+
class="newsletter-input"
84+
type="email"
85+
name="member[email]"
86+
id="member_email"
87+
required
88+
placeholder="Email address"
89+
>
90+
<input
91+
class="button newsletter-button"
92+
type="submit"
93+
value="Subscribe"
94+
name="member[subscribe]"
95+
id="member_submit"
96+
>
97+
</form>
98+
<p>
99+
You can read the previous issues and listen to our podcast at <a href="https://news.vuejs.org" target="_blank">news.vuejs.org</a>.
100+
</p>
101+
</div>
102+
</div>
103+
70104
<div id="footer">
71105
<p>
72106
<a class="social-icon" href="https://github.com/vuejs/vue" target="_blank">

themes/vue/source/css/_common.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ em
4848
p
4949
word-spacing: 0.05em
5050

51-
a.button
51+
a.button,
52+
input.button
5253
padding: 0.75em 2em
5354
border-radius: 2em
5455
display: inline-block
@@ -216,4 +217,3 @@ sup.beta.beta
216217
h2+p
217218
page-break-before: avoid
218219
a:link:after, a:visited:after { content:" [" attr(href) "] "; }
219-

themes/vue/source/css/index.styl

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ body
2626
.logo
2727
display: none
2828

29-
#hero
29+
#hero,
30+
#news
3031
padding: $space 40px 30px
3132
background-color: #fff
3233
.inner
@@ -71,6 +72,37 @@ body
7172
vertical-align: middle
7273
margin-right: 15px
7374

75+
#news
76+
padding: $space 20px 70px
77+
text-align: center
78+
p
79+
margin-top: 10px
80+
a
81+
color: $green
82+
.newsletter-form
83+
position: relative
84+
max-width: 550px
85+
margin: 0 auto
86+
box-sizing: border-box
87+
.newsletter-input
88+
width: 100%
89+
box-sizing: border-box
90+
padding: 10px 80px 10px 20px
91+
height: 50px
92+
border-radius: 50px
93+
border: 1px solid #ccc
94+
font-size: 16px
95+
&:focus
96+
outline: none
97+
border-color: #42b983
98+
.newsletter-button.button
99+
position: absolute
100+
padding: 4px 20px
101+
margin: 0
102+
height: calc(100% - 8px)
103+
right: 4px
104+
top: 4px
105+
74106
#special-sponsor
75107
background-color: #fff
76108
text-align: center

0 commit comments

Comments
 (0)