Skip to content

Instantly share code, notes, and snippets.

@guymorita
Created July 25, 2013 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guymorita/6083188 to your computer and use it in GitHub Desktop.
Save guymorita/6083188 to your computer and use it in GitHub Desktop.
monument html
<head>
<title>monumentos</title>
<style>#map { width: 880px; height: 600px; }</style>
</head>
<body>
<div class="row">
<div class="span12 offset1">
<h1>Monumentos</h1>
<div class="row">
<div class="span9">{{> worldMap }}</div>
<div class="span2">
{{> currentUser}}
{{> currentPlayers}}
</div>
</div>
</div>
</div>
<div class="row">
<div class="span12 offset1">
<div class="row">
<div class="span6">
<h2>{{> currentPlace }}</h2>
<p><em>Try to click on the locations before your friends do!</em></p>
</div>
<div class="span3">
<h4>Score Feed</h4>
{{> latestScores }}
</div>
</div>
</div>
</div>
</body>
<template name="worldMap">
{{#constant}}
<div id="map"></div>
{{/constant}}
</template>
<template name="currentPlace">
<div id="placeAnnouncement">{{show}}</div>
</template>
<template name="currentUser">
<div>
{{#if user}}
<h2>{{ user }}</h2>
{{else}}
<input type='text' placeholder='Enter Your Name' id='enter_user'>
<input type="button" class="add btn btn-info" value="Set Name" />
{{/if}}
</div>
</template>
<template name="currentPlayers">
<table class="table table-striped">
<thead>
<th>Challengers:</th><th>Scores:</th>
</thead>
<tbody>
{{#each players}}
{{> player }}
{{/each}}
</tbody>
</table>
</template>
<template name="player">
<tr class="{{userRow}}">
<td>{{username}}</td>
<td><span class="{{userScore}}">{{score}}</span></td>
</span>
</tr>
</template>
<template name="latestScores">
<table class="table table-striped">
<thead>
<th>Challenger:</th><th>Latest Score:</th>
</thead>
<tbody>
{{#each scores}}
{{> score }}
{{/each}}
</tbody>
</table>
</template>
<template name="score">
<tr>
<td>{{username}}</td>
<td>{{score}}</td>
</span>
</tr>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment