Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8300afd606
Fetching contributors…

Cannot retrieve contributors at this time

175 lines (175 sloc) 5.426 kb
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="local.js"></script>
<script src="api_key.js"></script>
<script id="config" type="text/javascript" charset="utf-8">
var $parameters = {
urlname: "techcrunch",
width: 200,
_height: 200,
_name: "Everywhere Badge",
_description: "Shows stats for the specified container."
};
var $queries = {
containers: function() {
return mup_widget.api_call("/ew/containers", {urlname: $parameters.urlname, fields: "meetup_count,past_meetup_count,member_count,geo_ip"});
}
};
</script>
<link rel="stylesheet" type="text/css" href="http://static2.meetupstatic.com/style/widget.css">
<script type="text/javascript" charset="utf-8">
mup_widget.with_jquery(function($, ctx) {
var container = '',
addLink = function( content, link ) {
return '<a href="' + link + '">' + content + '</a>';
},
numberFormat = function(nStr){
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1))
x1 = x1.replace(rgx, '$1' + ',' + '$2');
return x1 + x2;
};
$.getJSON($queries.containers(), function(data) {
if (data.results.length == 0) {
$('.mup-widget-2', ctx).width($parameters.width);
$('.mup-widget-2', ctx).append(
'<div class="mup-widget error">\
<div class="errorMsg">Oops. No results for "' + $parameters.urlname + '"</div>\
</div>');
}
else {
container = data.results[0];
$('.mup-widget-2', ctx).width($parameters.width);
$('.mup-widget-2', ctx).append(
'<div class="mup-widget">\
<div class="mup-bd">\
<h3>' + addLink( container.name, container.meetup_url ) + '</h3>\
<span class="mup-stats">' + numberFormat(container.meetup_count+container.past_meetup_count) + '<span class="mup-tlabel"> MEETUPS</span> <span style="color:#000">|</span> ' + numberFormat(container.member_count) + '<span class="mup-tlabel"> PEOPLE</span></span>\
<div style="overflow:hidden;"><span style="font-size:11px; float:left; display:block; padding:2px 0 0 3px;">Find a meetup near you </span><span class="mup-button" style="float:right;margin-right:2px;">' + addLink( 'GO', container.meetup_url ) + '</span></div>\
</div>\
<div class="mup-ft">\
<div class="mup-logo">' + addLink( '<img src="http://img1.meetupstatic.com/84869143793177372874/img/birddog/everywhere_widget.png" />', container.meetup_url ) + '</div>\
<div class="mup-getwdgt">' + addLink( 'ADD THIS TO YOUR SITE', 'http://www.meetup.com/meetup_api/foundry/#'+$parameters._name.toLowerCase().replace(/ /g,"-") ) + '</div>\
</div>\
</div>'
);
}
});
});
</script>
<style type="text/css" media="screen">
.mup-widget-2 {
font-family: "lucida grande", lucida, tahoma, helvetica, arial, sans-serif !important;
font-size: 12px;
}
.mup-widget-2 .mup-widget,
.mup-widget-2 .mup-widget .mup-hd a {
background: #1A1A1A;
color: #f2f2f2;
}
.mup-widget-2 .mup-widget {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding-top: 8px;
}
.mup-widget-2 .mup-widget h3,
.mup-widget-2 .mup-widget h4,
.mup-widget-2 .mup-widget p {
line-height: 1.2 !important;
text-align: center;
}
.mup-widget-2 .mup-widget h3 {
font-size: 15px;
color: #f2f2f2;
font-weight: bold;
}
.mup-widget-2 .mup-widget h4 {
font-size: 13px;
}
.mup-widget-2 .mup-widget h5 {
font-size: 20px;
margin: 0 auto;
text-align: center;
letter-spacing: -1px;
text-shadow: 1px 1px 1px #1A1A1A;
}
.mup-widget-2 .mup-widget p {
text-align: center;
}
.mup-widget-2 .mup-widget .mup-bd,
.mup-widget-2 .mup-widget .mup-timeline,
.mup-widget-2 .mup-widget .mup-bd p {
color: #f2f2f2;
}
.mup-widget-2 .mup-widget .mup-bd {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 8px 6px;
margin: 0 8px;
background: #333;
}
.mup-widget-2 .mup-widget a,
.mup-widget-2 .mup-widget a:active,
.mup-widget-2 .mup-widget a:visited,
.mup-widget-2 .mup-widget a:hover {
color: #f2f2f2;
text-decoration: none;
}
.mup-widget-2 .mup-widget .mup-tlabel {
font-size: 8px;
color: #AAA;
}
.mup-widget-2 .mup-widget .mup-stats {
display: block;
margin: 6px 0;
padding: 4px;
text-align: center;
background: #1A1A1A;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.mup-widget-2 .mup-widget .mup-button {
display:block;
margin: 0 auto;
padding: 2px 4px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2266BB), to(#102f56));
background: -moz-linear-gradient(0% 100% 90deg,#102F56, #2266BB);
background-color: #2266BB;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
font-size: 10px;
font-weight: bold;
color: #f2f2f2 !important;
text-align: center;
border: 1px solid #0d2748;
}
.mup-widget-2 .mup-widget .mup-ft .mup-getwdgt {
padding: 3px 0;
font-size: 8px;
text-align: center;
background: #0A0A0A;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
.mup-widget-2 .mup-widget .mup-ft .mup-logo {
padding: 6px 8px;
}
</style>
</head>
<body class="framed-mup-widget">
<div class="mup-widget-2"></div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.