Add subscribe email widget (#548)

This commit is contained in:
Liyang Zhang 2019-10-29 23:02:44 +08:00 committed by Ruipeng Zhang
parent 3ff5f62351
commit 98d8bcc8a5
4 changed files with 39 additions and 0 deletions

View File

@ -19,6 +19,9 @@ widget:
links: 'Links'
tag_cloud: 'Tag Cloud'
catalogue: 'Catalogue'
email:
title: 'Subscribe Email'
button: 'Subscribe'
article:
more: 'Read More'
comments: 'Comments'

View File

@ -19,6 +19,9 @@ widget:
links: '連結'
tag_cloud: '標籤雲'
catalogue: '文章目錄'
email:
title: '訂閱 Email'
button: '訂閱'
article:
more: '繼續閱讀'
comments: '評論'

View File

@ -0,0 +1,30 @@
<div class="card widget">
<div class="card-content">
<div class="menu">
<h3 class="menu-label">
<%= __('widget.email.title') %>
</h3>
<div>
<form action="https://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow"
onsubmit="window.open('https://feedburner.google.com/fb/a/mailverify?uri=<%= get_config_from_obj(widget, 'feedburner_id') %>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<input type="hidden" value="<%= get_config_from_obj(widget, 'feedburner_id') %>" name="uri" />
<input type="hidden" name="loc" value="en_US" />
<div class="field">
<div class="control has-icons-left">
<input class="input" name="email" type="email" />
<span class="icon is-small is-left">
<i class="fas fa-envelope"></i>
</span>
</div>
<p class="help"><%= get_config_from_obj(widget, 'description') %></p>
</div>
<div class="field is-grouped is-grouped-right">
<div class="control">
<input class="button is-primary" type="submit" value="<%= __('widget.email.button') %>" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
module.exports = (ctx, locals) => {
return locals;
}