090fe9ac175d6e6c27faa0871055172fcbcec90b — Andrew Zah 3 months ago 8451170
add form for tinyletter mailing list
5 files changed, 34 insertions(+), 0 deletions(-)

M Makefile
M sass/_misc.scss
A sass/components/_mailing-list.scss
M sass/main.scss
M templates/post.html
M Makefile => Makefile +1 -0
@@ 48,6 48,7 @@ rm -rf $(PUBLIC_MIN_JS_DIR)
  
  build: $(CONTENT_FILES)
+ 	zola build
  
  static: build
  	rsync -arv public/* ../website-static-assets

M sass/_misc.scss => sass/_misc.scss +4 -0
@@ 58,6 58,10 @@ margin-left: 1.5rem;
    }
  
+   form {
+     margin-bottom: 0;
+   }
+ 
    ol {
      counter-reset: item;
      margin-top: 0px;

A sass/components/_mailing-list.scss => sass/components/_mailing-list.scss +10 -0
@@ 0,0 1,10 @@
+ form#mailing-list {
+   padding-left: 3px;
+   padding-right: 3px;
+   text-align: center;
+ 
+   .form-label {
+     width: 45%;
+     max-width: 400px;
+   }
+ }

M sass/main.scss => sass/main.scss +1 -0
@@ 13,6 13,7 @@ //@import 'chartist/_custom_charts.scss';
  //@import '_dota_sprites';
  
+ @import 'components/_mailing-list';
  @import 'components/_after_post';
  @import 'components/_anchor';
  @import 'components/_button';

M templates/post.html => templates/post.html +18 -0
@@ 92,6 92,24 @@ </div>
  
      <hr>
+ 
+     <div>
+       <form id="mailing-list"
+         action="https://tinyletter.com/andrewzah"
+         method="post" target="popupwindow"
+         onsubmit="window.open('https://tinyletter.com/andrewzah', 'popupwindow', 'scrollbars=yes,width=800');return true">
+         <label for="tlemail">
+           Enjoy posts like this? Sign up for the mailing list!
+         </label>
+         <div>
+           <input type="text" class="form-label" name="email" id="tlemail" />
+           <input type="hidden" value="1" name="embed"/>
+           <input type="submit" class="button button-primary" style="" value="Subscribe" />
+         </div>
+         Note: I hate spam mail as much as you do.
+       </form>
+     </div>
+     <hr>
      </div>
  
      {% include "_footer.html" %}