Skip to content

Instantly share code, notes, and snippets.

@hlfcoding
Created May 31, 2012 00:28
Show Gist options
  • Save hlfcoding/2839810 to your computer and use it in GitHub Desktop.
Save hlfcoding/2839810 to your computer and use it in GitHub Desktop.
treasure-hunt-snippets
// code that shows victory screen...
gapi.hangout.data.setValue(_ITEM_FOUND_KEY, JSON.stringify({
'item': item_data.id,
'found_by': Participants.getLocal()
}));
@-webkit-keyframes pulsate {
0% { opacity: 0.1; }
50% { opacity: 0.2; }
100% { opacity: 0.1; }
}
@-moz-keyframes pulsate {
0% { -moz-opacity: 0.1; }
50% { -moz-opacity: 0.2; }
100% { -moz-opacity: 0.1; }
}
@-ms-keyframes pulsate {
0% { opacity: 0.1; }
50% { opacity: 0.2; }
100% { opacity: 0.1; }
}
.overlays > .overlay.item {
-moz-animation: pulsate 5s infinite;
-webkit-animation: pulsate 5s infinite;
-ms-animation: pulsate 5s infinite;
opacity: 0.1;
-moz-opacity: 0.1;
filter:alpha(opacity=10);
/* ... */
}
.info {
/* ... */
box-align: stretch;
-moz-box-align: stretch;
-webkit-box-align: stretch;
box-orient: vertical;
-moz-box-orient: vertical;
-webkit-box-orient: vertical;
display: box;
display: -moz-box;
display: -webkit-box;
/* ... */
}
.info > .item {
box-flex: 0;
-moz-box-flex: 0;
-webkit-box-flex: 0;
max-height: 50%;
}
.info > .feed {
/* ... */
box-flex: 1;
-moz-box-flex: 1;
-webkit-box-flex: 1;
max-height: 50%;
/* ... */
}
gapi.hangout.data.onStateChanged.add(function(state_data) {
_.each(state_data.addedKeys, function(data) {
switch ( data.key ) {
case _ITEM_FOUND_KEY:
// code that shows defeat screen...
<head>
<!-- ... -->
<link href='//fonts.googleapis.com/css?family=Merriweather:400,700' rel='stylesheet' type='text/css'><!-- Available as font-family: 'Merriweather'; font-weight: 400; -->
<!-- ... -->
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment