Permalink
Browse files

Kickstarter Interstitial

  • Loading branch information...
1 parent b7fe309 commit 4f0f184fcee021f380a65fb182f0518f29947acf @dustball dustball committed Jul 30, 2012
View
1 main.py
@@ -91,6 +91,7 @@ def get(self, pagename, site = PB_WIKI):
'give': 'Give',
'Assemble': 'Give',
'Mobile%20Device%20Lab': 'MobileDeviceLab',
+ 'kickstarter': 'http://www.kickstarter.com/projects/384590180/an-events-space-and-a-design-studio-for-hacker-doj',
'key': 'http://signup.hackerdojo.com/key',
}
if pagename in redirect_urls:
View
BIN static/.DS_Store
Binary file not shown.
View
1 static/js/jquery.interstitial.min.js
@@ -0,0 +1 @@
+(function($){var methods={open:function(options){var defaults={'url':'','width':600,'height':400,'opacity':70,'id':'popupBlock','onInterstitialClose':function(){}};var settings=$.extend({},defaults,options);$('body').append('<div id="fade"></div>');$('#fade').css({'filter':'alpha(opacity='+settings.opacity+')'}).fadeIn();$('body').append('<div id="'+settings.id+'"></div>');$('#'+settings.id).load(settings.url,function(){$('#'+settings.id).css({'width':Number(settings.width),'height':Number(settings.height)}).fadeIn()});var popMargTop=settings.height/2;var popMargLeft=settings.width/2;$('#'+settings.id).css({'margin-top':-popMargTop,'margin-left':-popMargLeft});$('#fade').live('click',function(){$().interstitial('close',settings)})},close:function(options){var defaults={'id':'popupBlock','onInterstitialClose':function(){}};var settings=$.extend({},defaults,options);$('#fade , #'+settings.id).fadeOut(function(){$('#fade').remove()});settings.onInterstitialClose.call(this)}};$.fn.interstitial=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments)}else{$.error('Method '+method+' does not exist on jQuery.interstitial')}}})(jQuery);
View
30 static/kickstarter.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<title>Hacker Dojo Kickstarter</title>
+<script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=143341612365610";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+</head>
+<body>
+<div id="fb-root"></div>
+
+
+
+<div style="margin:12px">
+<p style="float:right; cursor:pointer; font-weight:bold" onClick="javascript:$().interstitial('close'); return false">X <a style="font-weight:normal; color:black" href="#" >Close</a></p>
+<h1 style="border-bottom:1px solid #ccc">BREAKING: Support Hacker Dojo's Kickstarter</h1>
+<p><b>Our kickstarter campaign has just launched, and has raised over $5,000 in just 48 hours.</b> Please help with a contibrution and/or by sharing on Facebook. Even a small contribution will help Hacker Dojo's doors stay open &amp; obtain the permits to expand into our new space.</p>
+
+<iframe style="float:right" frameborder="0" height="380" src="http://www.kickstarter.com/projects/384590180/an-events-space-and-a-design-studio-for-hacker-doj/widget/card.html" width="220"></iframe>
+
+<iframe style="border:1px solid #666; margin:8px 0; " width="480" height="360" src="http://www.kickstarter.com/projects/384590180/an-events-space-and-a-design-studio-for-hacker-doj/widget/video.html" frameborder="0"></iframe></div>
+
+<div style="margin:8px 12px" class="fb-like" data-href="http://www.kickstarter.com/projects/384590180/an-events-space-and-a-design-studio-for-hacker-doj" data-send="true" data-width="730" data-show-faces="true"></div>
+
+</div>
+</body>
+</html>
View
44 static/style/jquery.interstitial.css
@@ -0,0 +1,44 @@
+/*
+ * jQuery interstitial plugin v1.0
+ * jquery.interstitial.css
+ *
+ * https://github.com/brettdewoody/jQuery-Interstitial
+ *
+ * Brett DeWoody
+ * Digital Wax Works - Bozeman, Montana
+ * http://www.DigitalWaxWorks.com
+ * Created: Feb 4, 2011
+ * Updated: Feb 4, 2011
+ */
+
+#fade {
+ display: none;
+ background-color: #000;
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%; height: 100%;
+ opacity: .70;
+ z-index: 1000000;
+
+}
+#popupBlock {
+ display: none;
+ background-color: #FFFFFF;
+ float: left;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ z-index: 1000001;
+-webkit-border-radius: 8px;
+-moz-border-radius: 8px;
+border-radius: 8px;
+}
+
+/*--Making IE6 Understand Fixed Positioning--*/
+*html #fade {
+ position: absolute;
+}
+*html #popupBlock {
+ position: absolute;
+}
View
18 templates/index.html
@@ -16,7 +16,7 @@
{% block content %}
<section class="hero-image" >
- <a href="/Give" style="position:absolute; right:-105px; top:-70px; z-index:200"><img width="292" height="282" alt="Help save the Dojo! Donate now" src="{{cdn}}/static/images/save2.png" border="0"></a>
+ <!--<a href="/Give" style="position:absolute; right:-105px; top:-70px; z-index:200"><img width="292" height="282" alt="Help save the Dojo! Donate now" src="{{cdn}}/static/images/save2.png" border="0"></a>-->
<div id="mycarousel" style="overflow:hidden">
<ul style="overflow:none">
<li>
@@ -114,5 +114,21 @@
<hr class="clear">
</article>
+
+<link href="{{cdn}}/static/style/jquery.interstitial.css" rel="stylesheet" type="text/css" />
+<script src="{{cdn}}/static/js/jquery.interstitial.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+var ie = (function(){ var undef, v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i');while ( div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', all[0] ); return v > 4 ? v : undef; }());
+
+$(document).ready(function(){
+ if (!ie) {
+ $().interstitial('open', {
+ 'url' : '/static/kickstarter.html?v=2',
+ 'height': 610,
+ 'width': 736,
+ });
+ }
+});
+</script>
{% endblock %}

0 comments on commit 4f0f184

Please sign in to comment.