Skip to content

Commit 7d675ec

Browse files
committed
adding an email sign up page
1 parent 3d28924 commit 7d675ec

File tree

6 files changed

+336
-14
lines changed

6 files changed

+336
-14
lines changed

email.html

Lines changed: 297 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,297 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
3+
<meta charset="utf-8">
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="author" content="Matt Makai">
7+
<meta name="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
8+
<link rel="shortcut icon" href="theme/img/fsp-fav.png">
9+
<title>Email sign up - Full Stack Python</title>
10+
<link href="theme/css/fsp.css" rel="stylesheet">
11+
<!--[if lt IE 9]>
12+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
13+
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
14+
<![endif]-->
15+
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet">
16+
<script type="text/javascript">
17+
var _gaq = _gaq || [];
18+
_gaq.push(['_setAccount', 'UA-19910497-7']);
19+
_gaq.push(['_trackPageview']);
20+
(function() {
21+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
22+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
23+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
24+
})();
25+
</script>
26+
</head>
27+
28+
<body>
29+
<a href="https://github.com/makaimc/fullstackpython.github.com" class="github">
30+
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
31+
</a>
32+
<div class="container">
33+
<div class="row">
34+
<div class="col-md-12">
35+
<div class="logo-header-section">
36+
<a href="/" style="text-decoration: none; border: none;"><img src="theme/img/fsp-logo.png" height="52" width="52" class="logo-image" style="padding-top: 1px;"/></a>
37+
<span class="logo-title"><a href="/">Full Stack Python</a></span>
38+
</div>
39+
</div>
40+
</div> <div class="row">
41+
<div class="col-md-8">
42+
<h1>Detailed Full Stack Python Tutorials</h1>
43+
<p>Hey folks, thanks for reading Full Stack Python! I have been amazed by
44+
the amount of web traffic and thank you emails I've received since
45+
starting this site at the end of 2012.</p>
46+
<p>One request I keep getting is for tutorials on exactly how to
47+
perform steps like setting up configuration management, integrating
48+
app and hardening web application security.</p>
49+
<p>So I'm considering taking the material here and combining it with
50+
detailed walkthroughs in an ebook format. If that sounds good to you,
51+
sign up below and I'll send you an email when that content is created.
52+
</p>
53+
<style type="text/css">
54+
#mc_embed_signup{background:#fff; clear:left; font:12px "Helvetica Neue",Arial,sans-serif; }
55+
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
56+
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
57+
</style>
58+
<hr/>
59+
<div id="mc_embed_signup">
60+
<form action="http://mattmakai.us2.list-manage.com/subscribe/post?u=b7e774f0c4f05dcebbfee183d&amp;id=b22335388d" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
61+
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
62+
<div class="row">
63+
<div class="col-md-9">
64+
<label for="mce-EMAIL">Email Address</label>
65+
<input type="email" value="" name="EMAIL" class="required email form-control" id="mce-EMAIL">
66+
</div>
67+
<div class="col-md-3">
68+
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-success" style="margin-top: 20px;">
69+
</div>
70+
<div id="mce-responses" class="clear">
71+
<div class="response" id="mce-error-response" style="display:none"></div>
72+
<div class="response" id="mce-success-response" style="display:none"></div>
73+
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
74+
<div style="position: absolute; left: -5000px;"><input type="text" name="b_b7e774f0c4f05dcebbfee183d_b22335388d" value=""></div>
75+
</div>
76+
</form>
77+
</div>
78+
<script type="text/javascript">
79+
var fnames = new Array();var ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';
80+
try {
81+
var jqueryLoaded=jQuery;
82+
jqueryLoaded=true;
83+
} catch(err) {
84+
var jqueryLoaded=false;
85+
}
86+
var head= document.getElementsByTagName('head')[0];
87+
if (!jqueryLoaded) {
88+
var script = document.createElement('script');
89+
script.type = 'text/javascript';
90+
script.src = '//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js';
91+
head.appendChild(script);
92+
if (script.readyState && script.onload!==null){
93+
script.onreadystatechange= function () {
94+
if (this.readyState == 'complete') mce_preload_check();
95+
}
96+
}
97+
}
98+
99+
var err_style = '';
100+
try{
101+
err_style = mc_custom_error_style;
102+
} catch(e){
103+
err_style = '#mc_embed_signup input.mce_inline_error{border-color:#6B0505;} #mc_embed_signup div.mce_inline_error{margin: 0 0 1em 0; padding: 5px 10px; background-color:#6B0505; font-weight: bold; z-index: 1; color:#fff;}';
104+
}
105+
var head= document.getElementsByTagName('head')[0];
106+
var style= document.createElement('style');
107+
style.type= 'text/css';
108+
if (style.styleSheet) {
109+
style.styleSheet.cssText = err_style;
110+
} else {
111+
style.appendChild(document.createTextNode(err_style));
112+
}
113+
head.appendChild(style);
114+
setTimeout('mce_preload_check();', 250);
115+
116+
var mce_preload_checks = 0;
117+
function mce_preload_check(){
118+
if (mce_preload_checks>40) return;
119+
mce_preload_checks++;
120+
try {
121+
var jqueryLoaded=jQuery;
122+
} catch(err) {
123+
setTimeout('mce_preload_check();', 250);
124+
return;
125+
}
126+
var script = document.createElement('script');
127+
script.type = 'text/javascript';
128+
script.src = 'http://downloads.mailchimp.com/js/jquery.form-n-validate.js';
129+
head.appendChild(script);
130+
try {
131+
var validatorLoaded=jQuery("#fake-form").validate({});
132+
} catch(err) {
133+
setTimeout('mce_preload_check();', 250);
134+
return;
135+
}
136+
mce_init_form();
137+
}
138+
function mce_init_form(){
139+
jQuery(document).ready( function($) {
140+
var options = { errorClass: 'mce_inline_error', errorElement: 'div', onkeyup: function(){}, onfocusout:function(){}, onblur:function(){} };
141+
var mce_validator = $("#mc-embedded-subscribe-form").validate(options);
142+
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator
143+
options = { url: 'http://mattmakai.us2.list-manage.com/subscribe/post-json?u=b7e774f0c4f05dcebbfee183d&id=b22335388d&c=?', type: 'GET', dataType: 'json', contentType: "application/json; charset=utf-8",
144+
beforeSubmit: function(){
145+
$('#mce_tmp_error_msg').remove();
146+
$('.datefield','#mc_embed_signup').each(
147+
function(){
148+
var txt = 'filled';
149+
var fields = new Array();
150+
var i = 0;
151+
$(':text', this).each(
152+
function(){
153+
fields[i] = this;
154+
i++;
155+
});
156+
$(':hidden', this).each(
157+
function(){
158+
var bday = false;
159+
if (fields.length == 2){
160+
bday = true;
161+
fields[2] = {'value':1970};//trick birthdays into having years
162+
}
163+
if ( fields[0].value=='MM' && fields[1].value=='DD' && (fields[2].value=='YYYY' || (bday && fields[2].value==1970) ) ){
164+
this.value = '';
165+
} else if ( fields[0].value=='' && fields[1].value=='' && (fields[2].value=='' || (bday && fields[2].value==1970) ) ){
166+
this.value = '';
167+
} else {
168+
if (/\[day\]/.test(fields[0].name)){
169+
this.value = fields[1].value+'/'+fields[0].value+'/'+fields[2].value;
170+
} else {
171+
this.value = fields[0].value+'/'+fields[1].value+'/'+fields[2].value;
172+
}
173+
}
174+
});
175+
});
176+
$('.phonefield-us','#mc_embed_signup').each(
177+
function(){
178+
var fields = new Array();
179+
var i = 0;
180+
$(':text', this).each(
181+
function(){
182+
fields[i] = this;
183+
i++;
184+
});
185+
$(':hidden', this).each(
186+
function(){
187+
if ( fields[0].value.length != 3 || fields[1].value.length!=3 || fields[2].value.length!=4 ){
188+
this.value = '';
189+
} else {
190+
this.value = 'filled';
191+
}
192+
});
193+
});
194+
return mce_validator.form();
195+
},
196+
success: mce_success_cb
197+
};
198+
$('#mc-embedded-subscribe-form').ajaxForm(options);
199+
200+
201+
});
202+
}
203+
function mce_success_cb(resp){
204+
$('#mce-success-response').hide();
205+
$('#mce-error-response').hide();
206+
if (resp.result=="success"){
207+
$('#mce-'+resp.result+'-response').show();
208+
$('#mce-'+resp.result+'-response').html(resp.msg);
209+
$('#mc-embedded-subscribe-form').each(function(){
210+
this.reset();
211+
});
212+
} else {
213+
var index = -1;
214+
var msg;
215+
try {
216+
var parts = resp.msg.split(' - ',2);
217+
if (parts[1]==undefined){
218+
msg = resp.msg;
219+
} else {
220+
i = parseInt(parts[0]);
221+
if (i.toString() == parts[0]){
222+
index = parts[0];
223+
msg = parts[1];
224+
} else {
225+
index = -1;
226+
msg = resp.msg;
227+
}
228+
}
229+
} catch(e){
230+
index = -1;
231+
msg = resp.msg;
232+
}
233+
try{
234+
if (index== -1){
235+
$('#mce-'+resp.result+'-response').show();
236+
$('#mce-'+resp.result+'-response').html(msg);
237+
} else {
238+
err_id = 'mce_tmp_error_msg';
239+
html = '<div id="'+err_id+'" style="'+err_style+'"> '+msg+'</div>';
240+
241+
var input_id = '#mc_embed_signup';
242+
var f = $(input_id);
243+
if (ftypes[index]=='address'){
244+
input_id = '#mce-'+fnames[index]+'-addr1';
245+
f = $(input_id).parent().parent().get(0);
246+
} else if (ftypes[index]=='date'){
247+
input_id = '#mce-'+fnames[index]+'-month';
248+
f = $(input_id).parent().parent().get(0);
249+
} else {
250+
input_id = '#mce-'+fnames[index];
251+
f = $().parent(input_id).get(0);
252+
}
253+
if (f){
254+
$(f).append(html);
255+
$(input_id).focus();
256+
} else {
257+
$('#mce-'+resp.result+'-response').show();
258+
$('#mce-'+resp.result+'-response').html(msg);
259+
}
260+
}
261+
} catch(e){
262+
$('#mce-'+resp.result+'-response').show();
263+
$('#mce-'+resp.result+'-response').html(msg);
264+
}
265+
}
266+
}
267+
268+
</script>
269+
<!--End mc_embed_signup--> </div>
270+
<div class="col-md-offset-1 col-md-3" id="sidebar">
271+
<div class="panel panel-success">
272+
<div class="panel-heading"><h3 class="panel-head">Full Stack Python</h3></div>
273+
<div class="panel-body">
274+
<a href="/">Full Stack Python</a> is an open book that explains
275+
each Python web application stack layer and provides the
276+
best web resources for those topics.
277+
<hr/>
278+
<a href="http://twitter.com/mattmakai">Matt Makai</a> designed and
279+
wrote this site with assistance from community pull
280+
requests. If you're on GitHub you can
281+
<a href="https://github.com/makaimc">follow him</a>
282+
to see what daily changes are made or
283+
<a href="https://github.com/makaimc/fullstackpython.github.com">star the repository</a> for future reference.
284+
<hr/>
285+
Looking for a specific topic? Check out the
286+
<a href="/table-of-contents.html">table of contents</a>.
287+
</div>
288+
</div>
289+
</div></div>
290+
<hr/>
291+
<div class="footer pull-right">
292+
<a href="http://www.mattmakai.com/" class="underline">Matt Makai</a>
293+
2014
294+
</div>
295+
</div>
296+
</body>
297+
</html>

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-05-30T09:56:03Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-05-30T10:18:47Z</updated></feed>

future-directions.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ <h1>Future Directions</h1>
5656
<li>
5757
<p>Update these sections with better explanations and resources: </p>
5858
<ol>
59-
<li><a href="../javascript.html">JavaScript</a></li>
60-
<li><a href="../configuration-management.html">Configuration Management</a></li>
61-
<li><a href="../api-integration.html">API Integration</a></li>
62-
<li><a href="../api-creation.html">API Creation</a></li>
63-
<li><a href="../web-application-security.html">Web Security</a></li>
64-
<li></li>
59+
<li><a href="/source-control.html">Source control</a></li>
60+
<li><a href="/configuration-management.html">Configuration management</a></li>
61+
<li><a href="/javascript.html">JavaScript</a></li>
62+
<li><a href="/api-integration.html">API integration</a></li>
63+
<li><a href="/api-creation.html">API creation</a></li>
64+
<li><a href="/caching.html">Caching</a></li>
65+
<li><a href="/web-application-security.html">Web security</a></li>
6566
</ol>
6667
</li>
6768
<li>

source/content/pages/10-misc/1007-future-directions.markdown

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ Here are some things I'm actively working on:
3535

3636
* Update these sections with better explanations and resources:
3737

38-
1. [JavaScript](../javascript.html)
39-
1. [Configuration Management](../configuration-management.html)
40-
1. [API Integration](../api-integration.html)
41-
1. [API Creation](../api-creation.html)
42-
1. [Web Security](../web-application-security.html)
43-
1.
38+
1. [Source control](/source-control.html)
39+
1. [Configuration management](/configuration-management.html)
40+
1. [JavaScript](/javascript.html)
41+
1. [API integration](/api-integration.html)
42+
1. [API creation](/api-creation.html)
43+
1. [Caching](/caching.html)
44+
1. [Web security](/web-application-security.html)
4445

4546
* Create learning checklists for every section where it makes sense. The
4647
remaining sections that need checklists are

source/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
DISQUS_SITENAME = 'makaimc'
1010
PDF_GENERATOR = False
1111

12-
DIRECT_TEMPLATES = ('index', 'sitemap', 'table-of-contents')
12+
DIRECT_TEMPLATES = ('index', 'sitemap', 'table-of-contents', 'email')
1313

1414
SITEMAP_SAVE_AS = 'sitemap.xml'
1515

source/theme/templates/email.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Email sign up - {% endblock %}
4+
5+
{% block content %}
6+
<div class="row">
7+
<div class="col-md-8">
8+
<h1>Detailed Full Stack Python Tutorials</h1>
9+
<p>Hey folks, thanks for reading Full Stack Python! I have been amazed by
10+
the amount of web traffic and thank you emails I've received since
11+
starting this site at the end of 2012.</p>
12+
<p>One request I keep getting is for tutorials on exactly how to
13+
perform steps like setting up configuration management, integrating
14+
app and hardening web application security.</p>
15+
<p>So I'm considering taking the material here and combining it with
16+
detailed walkthroughs in an ebook format. If that sounds good to you,
17+
sign up below and I'll send you an email when that content is created.
18+
</p>
19+
{% include "email-for-book.html" %}
20+
</div>
21+
{% include "sidebar.html" %}
22+
</div>
23+
{% endblock %}

0 commit comments

Comments
 (0)