-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrick.html
executable file
·495 lines (413 loc) · 15.9 KB
/
rick.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<html>
<head>
<!--
Meetup Group Home Prototype
try:
/rick.html#theme=true
/rick.html#theme=true&group=1
/rick.html#theme=true&group=2
/rick.html#theme=true&group=3
-->
<meta name='viewport' content='content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0' />
<!-- prototyper requires JS -->
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/ractive/ractive.js"></script>
<script type="text/javascript" src="bower_components/moment/moment.js"></script>
<script type="text/javascript" src="bower_components/jquery-waypoints/waypoints.min.js"></script>
<script type="text/javascript" src="js/helpers_ractive.js"></script>
<script type="text/javascript" src="js/gimme.js"></script>
<script type="text/javascript" src="js/extras.js"></script>
<script type="text/javascript" src="js/jquery-ajax-localstorage-cache.js"></script><!-- avoid repeated ajax calls -->
<link href="css/whitney.css" type="text/css" rel="stylesheet" /> <!-- whitney will get bowerized -->
<link href="css/patch.css" type="text/css" rel="stylesheet" /> <!-- this includes sassquatch -->
<!-- page specific stuff -->
<link href="css/home.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/demo_groups.js"></script>
<link rel="stylesheet" type="text/css" href="css/calendario.css" />
<script type="text/javascript" src="components/Calendario/js/jquery.calendario.js"></script>
<link rel="stylesheet" type="text/css" href="components/ElegantIcons/style.css" />
</head>
<body>
<script type="text/html" id="main-template">
<!-- pages -->
<div class="page off inverted" id="page-members">
<div class="page-header">
<div class="fixflex">
<div class="flex big">
</div>
<div class="fix">
<div id="page-members-close" class="clickable nobreak"><span class="arrow_carrot-down_alt2"></span> Done</div>
</div>
</div>
</div>
<div class="page-body" style="display: flex; align-items: center; justify-content: center;">
<ul class="inlineList hscroll" style="vertical-align: top;">
{{#members}}
<li class="align-center" style="display: inline-block; width: 280px; vertical-align: top;">
<div style="padding: 24px;">
<div class="avatar-160 clickable" style="background-image: url({{photo}})"></div>
<h3 class="clickable">{{name}}</h3>
<p class="less">Joined {{helpers.dateFormat(joined)}}</p>
<p>{{#bio}}“{{.bio}}”{{/bio}}</p>
</div>
{{/members}}
</ul>
</div>
</div>
<div class="page off inverted" id="page-calendar">
<div class="calendar-wrapper" id="calendar">
<div class="page-header">
<div class="fixflex">
<div class="flex big">
<strong class="custom-month"></strong>
<span class="custom-year"></span>
<span class="custom-prev clickable arrow_carrot-left"></span>
<span class="custom-next clickable arrow_carrot-right"></span>
</div>
<div class="fix">
<div id="page-calendar-close" class="clickable nobreak"><span class="arrow_carrot-down_alt2"></span> Done</div>
</div>
</div>
</div>
<div class="page-body">
<div class="fc-calendar-container"></div>
</div>
</div>
</div>
<!-- screen start -->
<div class="doc-stripe {{#if opts.member}}groupinfo-collapsed{{/if}}" id="groupstuff">
<!-- header -->
<div class="fixflex extended-visible" id="navbar-group">
<div class="fix clickable" style="padding: 8px 8px 8px 0;">
<div class="arrow_carrot-left" style="font-size: 32px; line-height: 18px;"></div>
</div>
<div class="flex align-center" style="padding: 8px;">
<h4>{{group.name}}</h4>
</div>
<div class="fix clickable" id="action-search" style="padding: 8px;">
<div class="icon_cog" style="font-size: 18px; line-height: 18px;"></div>
</div>
</div>
<div id="groupheader" style="position: relative; overflow: hidden; border-bottom: 1px solid rgba(0,0,0,1); background-image: url({{banner}}); background-size: cover; background-position: center center;">
<div class="line hide-at-handheld hide-at-medium" style="position: absolute; height: 100%; font-size: 0; ">
<div class="unit" style="width: 6%; border-right: 2px solid rgba(0,0,0,1); box-sizing: border-box;">
<div class="photo100" style="background-image: url({{group.photos[3].photo_link}})" />
</div>
<div class="unit" style="width: 10%; border-right: 2px solid rgba(0,0,0,1); box-sizing: border-box;">
<div class="photo100" style="background-image: url({{group.photos[2].photo_link}})" />
</div>
<div class="unit" style="width: 68%">
<div class="photo100" style="background-image: url({{banner}})" />
</div>
<div class="unit" style="width: 10%; border-left: 2px solid rgba(0,0,0,1); box-sizing: border-box;">
<div class="photo100" style="background-image: url({{group.photos[0].photo_link}}); " />
</div>
<div class="unit" style="width: 6%; border-left: 2px solid rgba(0,0,0,1); box-sizing: border-box;">
<div class="photo100" style="background-image: url({{group.photos[1].photo_link}})" />
</div>
</div>
<div class="nametag-photo inverted" style="background: transparent; height: 100%; {{#if opts.theme}}background: {{theme.gradient}};{{/if}}">
<div class="nametag-photo-name" style="{{#if opts.theme}}background: transparent;{{/if}}">
<div id="groupheader-icon">logo</div>
<h1>{{group.name}}</h1>
<h4 class="muted margin-bottom">We're {{helpers.numberFormat(group.members)}} {{group.who}} </h4>
</div>
</div>
</div>
</div>
<div id="header-bottom"></div>
<div class="doc-stripe bg-black inverted" style=" {{#if opts.theme}}background: {{theme.solid}};{{/if}}">
<div id="groupinfo">
<div class="doc-bounds">
<!-- this could be less hacky -->
<style>
{{#if opts.theme}}
.hscroll-wrap-wrap:before{
background-image: linear-gradient(to right, {{theme.solid}}, rgba(42, 42, 42, 0))!important;
}
.hscroll-wrap-wrap:after{
background-image: linear-gradient(to left, {{theme.solid}}, rgba(42, 42, 42, 0))!important;
}
{{/if}}
</style>
<div style="margin-top: -14px; margin-bottom: 8px;">
<ul class="inlineList hscroll" id="members" style="padding-top: 8px;" data-count="{{group.members}}">
{{#members}}
<li>
<div class="avatar avatar-55 margin-none clickable" style="background-image: url({{photo}}); margin-right: 6px !important;"></div>
</li>
{{/members}}
</ul>
</div>
<div class="line-gutters linear-at-medium linear-at-handheld">
<div class="unit size2of3">
<div class="big">{{{helpers.truncate(group.description, 440)}}}</div>
</div>
<div class="unit size1of3">
<div class="button-alt block">Join us!</div>
<div class="align-center hide-at-medium hide-at-handheld muted">
<p class="margin-minimal">Founded {{helpers.dateFormat(group.created, "MMMM YYYY")}}</p>
<p class="margin-minimal">42 Meetups and counting</p>
<p>
<!-- API does not give org photo -->
Organized by <a href="">{{group.organizer.name}}</a>
<span class="avatar avatar-30 clickable" style="background-image: url('http://api.randomuser.me/0.3/portraits/women/1.jpg'); margin-bottom: 0; margin-left: 2px; vertical-align: middle; width: 22px; height: 22px; -webkit-filter: grayscale(100%);"></span>
</p>
</div>
</div>
</div>
<!-- collapsable group info -->
<!-- group data collapses into swipeable stuff at small sizes -->
<!-- members are swipeable -->
</div>
</div>
</div>
<ul class="tabs full" data-activesize="medium" style="background: #eee; margin: 0; padding: 26px 8px 0; box-sizing: border-box;" >
<li class="selected" data-show="talk-container">Talk</li>
<li data-show="meetups-container">Calendar</li>
</ul>
<div class="doc-stripe" style="width: 100%; overflow: hidden;"><div class="doc-bounds">
<div class="line-gutters wide linear-at-medium">
<div class="unit size2of3" id="talk-container">
<!-- discussion -->
<ul class="dividedList">
{{#discussions}}
{{#if started_by.name}}
<li>
<div class="figureset">
<div class="figureset-figure">
<div class="avatar avatar-55 margin-none clickable" style="background-image: url('{{started_by.photo}}')"></div>
</div>
<div class="figureset-description">
<h4>{{started_by.name}}</h4>
<p class="margin-minimal">{{helpers.truncate(body, 400)}}</p>
<p class="small">
{{#if likes}}
<strong>{{likes}} likes</strong> ·
{{/if}}
<a href="">Like</a> ·
<a href="">Comment</a> ·
<span class="less">{{helpers.dateRelative(created)}}</span>
</p>
{{#if replies}}
<div class="replies">
{{#replies}}
<div class="figureset">
<div class="figureset-figure">
<div class="avatar avatar-35 margin-none clickable" style="background-image: url('{{photo}}')"></div>
</div>
<div class="figureset-description">
<h4>{{name}}</h4>
<p class="margin-minimal">{{body}}</p>
<p class="small">
{{#if likes}}
<strong>{{likes}} likes</strong> ·
{{/if}}
<a href="">Like</a> ·
<a href="">Comment</a> ·
<span class="less">{{helpers.dateRelative(../created)}}</span>
</p>
</div>
</div>
{{/replies}}
</div>
{{/if}}
</div>
</div>
</li>
{{/if}}
{{/discussions}}
</ul>
</div>
<div class="unit size1of3" id="meetups-container">
<!-- events -->
<div class="calendar-wrapper calendar-mini hide-at-medium" id="mini-calendar">
<div class="custom-header fixflex">
<div class="flex big">
<span class="custom-month"></span>
<span class="custom-year"></span>
<span class="custom-prev clickable arrow_carrot-left"></span>
<span class="custom-next clickable arrow_carrot-right"></span>
</div>
<div class="fix">
<span id="show-calendar" class="clickable"><span class="arrow_expand avatar-30" style="background: #fff; margin: -5px -5px 0 0; text-align: center; line-height: 30px;"></span></span>
</div>
</div>
<div class="fc-calendar-container"></div>
</div>
<ul class="dividedList">
{{#events}}
<li>
<div class="figureset">
<div class="figureset-figure">
<div class="tinycal">
<div class="month"></div>
<div class="day">{{helpers.dateFormat(time, "D")}}</div>
</div>
</div>
<div class="figureset-description" style="padding-left: 9px;">
<p class="margin-none">{{helpers.dateFormat(time, "dddd, MMM D [at] h:mma")}}</p>
<h4 class="margin-minimal">{{name}}</h4>
<p class="small">{{helpers.numberFormat(yes_rsvp_count)}} {{group.who}} going</p>
</div>
</div>
</li>
{{/events}}
</ul>
</div>
</div>
</div></div>
<div class="doc-stripe bg-gray"><div class="doc-bounds">
<h3 class="margin-minimal">Members of this group are also in</h3>
<ul class="blockList has5" style="overflow-y: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;">
{{#groups}}
<li style="min-width: 200px;">
<div class="doc-box clickable">
<div class="nametag-photo" style="background-image: url({{photo}})"><div class="nametag-photo-name">
<div class="doc-content inverted">
<h4 class="margin-minimal padding-none" style="white-space: normal;">{{name}}</h4>
</div>
</div></div>
</div>
<!-- no </li> tag to avoid whitespace -->
{{/groups}}
</ul>
</div></div>
<!--
{{#if group.sponsors}}
<div class="doc-stripe bg-gray"><div class="doc-bounds">
<h3 class="margin-minimal">{{group.name}} is sponsored by</h3>
<ul class="blockList has5" >
{{#group.sponsors}}
<li>
<h4 class="margin-minimal padding-none">{{name}}</h4>
{{info}}
{{/group.sponsors}}
</ul>
</div></div>
{{/if}}
-->
</script>
<script type="text/javascript">
$(function(){
/*
* Uncomment the data you want -- it will be available in the template
* Check out the Meetup API docs for a list of fields to use in the template
* http://www.meetup.com/meetup_api/docs/
*
* A few notes:
* -- You can specify any field supported by the API
* -- You can leave every field unspecified except "gimme" -- something random/fun will be picked for you.
*/
/* Add your own pre-rendering JS here */
function getHashParams() {
var hashParams = {};
var e, a = /\+/g,
// Regex for replacing addition symbol with a space
r = /([^&;=]+)=?([^&;]*)/g,
d = function(s) {
return decodeURIComponent(s.replace(a, " "));
},
q = window.location.hash.substring(1);
while (e = r.exec(q))
hashParams[d(e[1])] = d(e[2]);
return hashParams;
}
var opts = getHashParams();
/*
var shoppingList = [
//{"gimme": "groups", "page": 5},
//{"gimme": "group"},
//{"gimme": "open_events"},
//{"gimme": "dates_with_open_events"},
//{"gimme": "events", "page": 15},
//{"gimme": "event"},
//{"gimme": "rsvps"},
//{"gimme": "event_comments"},
//{"gimme": "photo_albums"},
//{"gimme": "photos"},
//{"gimme": "members", "page": 40},
//{"gimme": "profile"},
//{"gimme": "categories"},
//{"gimme": "discussions", "page": 9}
];
*/
var theme = {
"gradient": "linear-gradient(-180deg, rgba(214,16,211,0.11) 10%, rgba(0,28,78,0.9) 100%)",
"solid": "#03002E"
};
var demo = opts.group || 0;
var shoppingList = DEMO_GROUPS[demo].shoppingList;
var extraContext = $.extend( DEMO_GROUPS[demo].extraContext, {"opts": opts, "theme": theme} ); // anything else to add to the handlebars context?
// Let's go!
var gme = new Gimme(shoppingList, function(){
var ractive = new Ractive( {el: 'body', template: '#main-template', data: $.extend(this.context, extraContext) });
defaultRenderCompleteActions(); // do standard jquery magicks
//-------------- HEADER --------------
$('#header-bottom').waypoint({
handler: function(direction) {
if(direction == 'down'){
$('#navbar-group').removeClass('extended-visible');
}
else{
$('#navbar-group').addClass('extended-visible');
}
}
});
// -------------- MEMBERS ---------------
$('#members,#org').click(function(){
$('#page-members').removeClass('off');
});
$('#page-members-close').click(function(){
$('#page-members').addClass('off');
});
// -------------- CALENDAR ---------------
// parse events into calendario-style data
// TODO support multiple events per day
var cal_events = {};
for(var i = 0; i < this.context.events.length; i++){
var ev = this.context.events[i];
var ev_date = moment( ev.time ).format("MM-DD-YYYY");
cal_events[ev_date] = "<div>"+ev.name+"</div>";
}
// render calendario
function setup_calendar($el, opts){
var $cal = $el.find(".fc-calendar-container:first");
var cal = $cal.calendario( opts );
console.dir(cal);
var $month = $el.find( '.custom-month' ).html( cal.getMonthName() );
var $year = $el.find( '.custom-year' ).html( cal.getYear() );
$el.find( '.custom-next' ).on( 'click', function() {
cal.gotoNextMonth( updateMonthYear );
} );
$el.find( '.custom-prev' ).on( 'click', function() {
cal.gotoPreviousMonth( updateMonthYear );
} );
function updateMonthYear() {
$month.html( cal.getMonthName() );
$year.html( cal.getYear() );
}
return cal;
}
setup_calendar( $( '#calendar' ), {
caldata : cal_events,
displayWeekAbbr : true
});
setup_calendar( $( '#mini-calendar' ), {
caldata : cal_events,
displayWeekAbbr : true
});
$('#show-calendar').click(function(){
$('#page-calendar').removeClass('off');
});
$('#page-calendar-close').click(function(){
$('#page-calendar').addClass('off');
});
// -------------- DISCUSSION ---------------
}, extraContext);
});
</script>
<div id="template-holder"></div>
</body>
</html>