2012-04-27 02:03:01 +00:00
< Title: >
2012-06-20 22:42:48 +00:00
HabitRPG
2012-07-07 21:45:06 +00:00
< Head: >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2012-04-27 02:03:01 +00:00
< Header: >
2012-06-21 00:47:08 +00:00
< ui:connectionAlert >
2012-06-26 13:23:16 +00:00
< div id = "head" >
2012-07-11 23:27:53 +00:00
< div class = 'pull-right' >
< a class = 'btn pull-right' onClick = "$('#copy-link-section').toggle();" > < i class = icon-user > < / i > < / a > < br / >
< div id = copy-link-section style = 'display:none;' class = well >
< h3 > Secret Link< / h3 >
2012-07-11 23:44:52 +00:00
< p > Authentication isn't yet available (< a href = "https://github.com/lefnire/habitrpg#how-do-i-log-in--save-my-data" > follow progress here< / a > ),< br / >
2012-07-11 23:27:53 +00:00
In the meantime a persistent URL can be used accross < br / >
browsers to access your data. Bookmark the following URL.< / p >
< input type = text class = input-xlarge value = "{_purl}" onClick = "$(this).select();" / >
< / div >
< / div >
2012-06-26 13:23:16 +00:00
<!-- <% if current_user %> -->
< table id = "character" >
< tr >
< td id = "avatar" >
2012-07-08 23:37:36 +00:00
< div class = 'avatar-sprites' >
< img class = 'weapon weapon-{_user.items.weapon}' src = "/img/BrowserQuest/habitrpg_mods/weapon{_user.items.weapon}.png" / >
< img class = 'armor armor-{_user.items.armor}' src = "/img/BrowserQuest/habitrpg_mods/armor{_user.items.armor}.png" / >
< / div >
2012-07-08 20:59:07 +00:00
< div id = "lvl" > < span class = "badge badge-info" > Lvl: {_user.stats.lvl}< / span > < / div >
2012-06-26 13:23:16 +00:00
< / td >
< td id = "bars" >
< div class = "progress progress-danger" >
2012-07-08 20:59:07 +00:00
< span class = "progress-text" > HP: {round(_user.stats.hp)} / 50< / span >
< div class = "bar" style = "width: {percent(_user.stats.hp, 50)}%;" > < / div >
2012-06-26 13:23:16 +00:00
< / div >
< div class = "progress progress-warning" >
2012-07-08 21:59:59 +00:00
< span class = "progress-text" >
{#if _user.history.exp}
< a x-bind = click:toggleChart data-chart-selector = "exp-chart" data-history-path = "_user.history.exp" > < i class = icon-signal > < / i > < / a >
{/}
Exp: {round(_user.stats.exp)} / {_tnl}
< / span >
2012-07-08 20:59:07 +00:00
< div class = "bar" style = "width: {percent(_user.stats.exp,_tnl)}%;" > < / div >
2012-06-26 13:23:16 +00:00
< / div >
< / td >
< / tr >
2012-07-07 03:10:37 +00:00
< tr >
< td colspan = 2 >
< div id = "exp-chart" style = "display:none;" > < / div >
< / td >
< / tr >
2012-06-26 13:23:16 +00:00
< / table >
<!-- <% else %>
< h1 > HabitRPG< / h1 >
< p > A habit tracker app which treats your goals like a Role Playing Game. < a href = "https://github.com/lefnire/habitrpg#habitrpg" > More Information< / a > < / p >
< % end %>-->
< / div >
2012-06-01 00:02:17 +00:00
2012-06-26 13:24:12 +00:00
< Body: >
< br / >
2012-07-09 03:34:20 +00:00
<!-- Revive Modal -->
2012-07-09 03:29:54 +00:00
< div style = "{#unless equal(_user.stats.lvl,0)}display:none;{/}" >
< div data-action = "backdrop" class = "modal-backdrop" > < / div >
< div class = "modal" id = "dead-modal" >
< div class = "modal-body" >
2012-07-09 03:34:20 +00:00
< img src = "/img/BrowserQuest/habitrpg_mods/dead.png" / >
< h3 > You're Dead< / h3 >
2012-07-09 03:42:46 +00:00
< p > < a x-bind = click:revive class = "btn btn-danger btn-large" > Revive< / a > < / p >
2012-07-09 03:29:54 +00:00
< / div >
< / div >
< / div >
2012-06-26 13:24:12 +00:00
< div class = "container-fluid" >
2012-07-06 19:16:26 +00:00
{#if _debug}
< div class = "alert" >
2012-07-11 20:24:41 +00:00
< i class = "icon-warning-sign" > < / i > < b > Debugging Options< / b > < br / > < br / >
< a x-bind = click:poormanscron class = "btn" > Cron< / a >
< a x-bind = click:endOfDayTally class = "btn" > Tally< / a >
2012-07-06 19:16:26 +00:00
< / div >
{/}
2012-06-26 13:24:12 +00:00
< div class = "row-fluid" >
<!-- would rather have one component: <app:taskList>, which handles taskList, task, and newTask. However,
can't pass references as paramters. so < app:taskList newModel = {_newHabit} list = {_habitList} > doesn't work
and have to pass those in via {{{content}}} instead -->
2012-07-07 17:58:56 +00:00
<!-- helpTitle & helpContent moved to tour -->
< app:taskColumn title = "Habits" >
2012-06-26 16:01:57 +00:00
< ul class = 'habits' > {#each _habitList as :task}< app:task / > {/}< / ul >
2012-07-09 04:12:56 +00:00
< app:newTask type = habit > < input value = {_newHabit} type = "text" placeholder = "New Habit" / > < / app:newTask >
2012-07-07 17:08:36 +00:00
< / app:taskColumn >
2012-06-26 13:24:12 +00:00
2012-07-07 17:58:56 +00:00
< app:taskColumn title = "Daily" >
2012-07-07 04:07:30 +00:00
< ul class = 'dailys' > {#each _dailyList as :task}< app:task / > {/}< / ul >
2012-07-09 04:12:56 +00:00
< app:newTask type = daily > < input value = {_newDaily} type = "text" placeholder = "New Daily" / > < / app:newTask >
2012-07-07 17:08:36 +00:00
< / app:taskColumn >
2012-06-26 13:24:12 +00:00
2012-07-07 17:58:56 +00:00
< app:taskColumn title = "Todos" type = "todo" >
2012-06-26 14:22:01 +00:00
< div class = "tabbable" > <!-- Only required for left/right tabs -->
< ul class = "nav nav-tabs" >
< li class = "active" > < a href = "#tab1" data-toggle = "tab" > Remaining< / a > < / li >
< li > < a href = "#tab2" data-toggle = "tab" > Complete< / a > < / li >
< / ul >
< div class = "tab-content" >
< div class = "tab-pane active" id = "tab1" >
2012-06-27 13:37:36 +00:00
< ul class = 'todos' >
{#each _todoList as :task}< app:task / > {/}
< / ul >
2012-07-09 04:12:56 +00:00
< app:newTask type = todo > < input value = {_newTodo} type = "text" placeholder = "New Todo" / > < / app:newTask >
2012-06-26 14:22:01 +00:00
< / div >
< div class = "tab-pane" id = "tab2" >
2012-06-27 13:37:36 +00:00
< ul class = 'completeds' >
{#each _todoList as :task}< app:task / > {/}
< / ul >
2012-06-26 14:22:01 +00:00
< / div >
< / div >
< / div >
2012-06-29 14:16:02 +00:00
{#if _user.history.todos}
2012-07-07 02:46:22 +00:00
< a x-bind = click:toggleChart data-chart-selector = "todos-chart" data-history-path = "_user.history.todos" > < i class = icon-signal > < / i > < / a >
2012-06-29 14:16:02 +00:00
< div id = "todos-chart" style = "display:none;" > < / div >
{/}
2012-07-07 17:08:36 +00:00
< / app:taskColumn >
2012-06-26 13:24:12 +00:00
2012-07-07 17:58:56 +00:00
< app:taskColumn title = "Rewards" type = "reward" >
2012-07-08 20:59:07 +00:00
< div id = "money" > {gold(_user.stats.money)} < img src = '/img/coin_single_gold.png' / > {silver(_user.stats.money)} < img src = '/img/coin_single_silver.png' / > < / div >
2012-07-08 02:43:49 +00:00
< ul class = 'rewards' >
{#each _rewardList as :task}< app:task / > {/}
< / ul >
2012-07-08 21:59:50 +00:00
{#if _user.items.itemsEnabled}
< ul class = 'items' >
2012-07-09 01:20:30 +00:00
{#with _items.armor as :item}< app:item / > {/}
{#with _items.weapon as :item}< app:item / > {/}
{#with _items.potion as :item}< app:item / > {/}
2012-07-09 01:35:32 +00:00
{#with _items.reroll as :item}< app:item / > {/}
2012-07-08 21:59:50 +00:00
< / ul >
{/}
2012-07-09 04:12:56 +00:00
< app:newTask type = reward > < input value = {_newReward} type = "text" placeholder = "New Reward" / > < / app:newTask >
2012-07-07 17:08:36 +00:00
< / app:taskColumn >
2012-06-26 13:24:12 +00:00
< / div >
2012-07-07 21:03:58 +00:00
< footer class = "footer" >
2012-07-11 23:27:53 +00:00
< a href = "https://github.com/lefnire/habitrpg#habitrpg" > Help< / a > |
2012-07-12 01:24:14 +00:00
< a href = "https://github.com/lefnire/habitrpg/issues" > Bugs< / a > |
2012-07-11 23:27:53 +00:00
< a href = "https://github.com/lefnire/habitrpg" > Github< / a > |
< a href = "http://habitrpg-rails.herokuapp.com/" > Old Site< / a > |
2012-07-16 23:10:01 +00:00
Copyright © 2012 Tyler Renelle
2012-07-07 21:03:58 +00:00
< / footer >
2012-06-26 13:24:12 +00:00
< / div >
<!-- <% if !current_user %>
< %= link_to(image_tag("http://line6.com/images/connections/facebook-login-button.png", :alt => "Login with Facebook"), user_omniauth_authorize_path(:facebook)) %>
< % else %>-->
<!-- <% end %> -->
2012-07-07 17:58:56 +00:00
2012-07-07 17:08:36 +00:00
< taskColumn: nonvoid >
< div class = "span3 well {{{type}}}s" >
2012-07-07 17:58:56 +00:00
<!-- removing for now, help - info in the tour instead -->
<!-- <span class="help - icon" rel="popover" data - placement="bottom" data - original - title="{{{helpTitle}}}" data - content="{{{helpContent}}}"><i class="icon - question - sign"></i></span> -->
2012-07-07 17:08:36 +00:00
< h1 > {{{title}}}< / h1 >
{{{content}}}
< / div >
2012-06-26 13:24:12 +00:00
2012-06-26 14:22:01 +00:00
< newTask: nonvoid >
2012-06-26 12:56:57 +00:00
< form class = "form-inline" data-task-type = {{{type}}} x-bind = submit:addTask >
2012-06-26 14:22:01 +00:00
{{{content}}}
2012-06-26 12:56:57 +00:00
< input class = "btn" type = submit value = Add >
2012-07-08 02:43:49 +00:00
< / form >
2012-06-10 00:15:33 +00:00
< task: >
2012-06-27 13:37:36 +00:00
< li data-id = {{:task.id}} class = "task {taskClasses(:task.type, :task.completed, :task.value, _hideCompleted)}" >
2012-06-27 14:54:04 +00:00
< pre >
2012-06-29 02:32:19 +00:00
< div class = "task-meta-controls" >
2012-07-07 17:58:56 +00:00
2012-06-29 02:32:19 +00:00
< div class = "hover-show" >
2012-07-17 20:35:26 +00:00
< a x-bind = click:toggleTaskEdit data-hide-id = "{{:task.id}}-chart" data-toggle-id = "{{:task.id}}-edit" > < i class = "icon-pencil" > < / i > < / a >
2012-07-07 02:46:22 +00:00
{#if :task.history}
2012-07-17 20:35:26 +00:00
< a x-bind = click:toggleChart data-toggle-id = "{{:task.id}}-chart" data-hide-id = "{{:task.id}}-edit" data-history-path = "_user.tasks.{{:task.id}}.history" >
2012-07-07 02:46:22 +00:00
< i class = "icon-signal" > < / i >
< / a >
{/}
2012-06-29 02:32:19 +00:00
< / div >
2012-06-26 11:55:09 +00:00
{#if :task.notes}
2012-07-07 17:58:56 +00:00
{#if equal(:task.type,'reward')}
2012-07-09 01:51:25 +00:00
< span rel = "popover" data-placement = "left" data-content = "{:task.notes}" data-original-title = "{:task.text}" class = 'task-notes' > < i class = "icon-comment" > < / i > < / span >
2012-07-07 17:58:56 +00:00
{else}
2012-07-09 01:51:25 +00:00
< span rel = "popover" data-content = "{:task.notes}" data-original-title = "{:task.text}" class = 'task-notes' > < i class = "icon-comment" > < / i > < / span >
2012-07-07 17:58:56 +00:00
{/}
2012-06-26 11:55:09 +00:00
{/}
< / div >
< div class = "task-controls" >
2012-06-10 00:57:35 +00:00
<!-- Habits -->
2012-06-25 00:51:42 +00:00
{#if equal(:task.type, 'habit')}
2012-07-09 04:24:37 +00:00
{#if :task.up}< a data-direction = up x-bind = click:vote > < img src = "/img/add.png" / > < / a > {/}
{#if :task.down}< a data-direction = down x-bind = click:vote > < img src = "/img/remove.png" / > < / a > {/}
2012-06-10 00:57:35 +00:00
<!-- Rewards -->
2012-06-25 00:51:42 +00:00
{else if equal(:task.type, 'reward')}
2012-07-09 04:24:37 +00:00
< a x-bind = click:vote class = "buy-link" data-direction = down > {:task.value}< img src = "/img/coin_single_gold.png" / > < / a >
2012-06-10 00:57:35 +00:00
<!-- Daily & Todos -->
{else}
2012-06-26 14:55:24 +00:00
< input type = "checkbox" checked = {:task.completed} x-bind = click:vote data-direction = {:task.completed}/ >
2012-06-10 00:57:35 +00:00
{/}
< / div >
2012-07-09 04:07:39 +00:00
< div class = "task-text" > {:task.text}< / div >
2012-06-26 11:55:09 +00:00
2012-06-29 02:32:19 +00:00
< app:taskMeta / >
2012-06-27 14:54:04 +00:00
< / pre >
2012-06-10 00:15:33 +00:00
< / li >
2012-06-25 00:51:42 +00:00
2012-06-29 02:32:19 +00:00
< taskMeta: >
2012-06-25 01:51:13 +00:00
< div style = "display:none;" id = {{:task.id}}-edit >
2012-06-26 14:42:07 +00:00
< hr / >
2012-06-29 20:31:32 +00:00
< form x-bind = submit:toggleTaskEdit data-selector = "{{:task.id}}-edit" >
2012-06-27 13:48:47 +00:00
< div class = control-group >
< label > Text< / label > < input type = text value = {:task.text} / >
< label > Notes< / label > < textarea rows = 3 > {:task.notes}< / textarea >
2012-06-26 14:41:18 +00:00
< / div >
2012-06-27 13:48:47 +00:00
{#if equal(:task.type, 'habit')}
< div class = "control-group" >
< label class = "checkbox inline" > < input type = checkbox checked = {:task.up} > Up< / label >
< label class = "checkbox inline" > < input type = checkbox checked = {:task.down} > Down< / label >
< / div >
{/}
{#if equal(:task.type, 'reward')}
< div class = control-group >
< label > Price
< div class = "input-append" >
< input class = "span2" size = "16" type = "text" value = {:task.value} > < span class = "add-on" > Gold< / span >
< / div >
< / label >
< / div >
{/}
2012-06-29 01:22:24 +00:00
< button type = submit class = "btn" > Save< / button >
< button x-bind = click:del class = "btn btn-danger" > Delete< / button >
2012-06-27 13:48:47 +00:00
< / form >
2012-06-26 13:24:12 +00:00
< / div >
2012-06-08 18:57:27 +00:00
2012-06-29 08:33:09 +00:00
< div style = "display:none;" id = {{:task.id}}-chart > < / div >
2012-06-29 02:32:19 +00:00
2012-07-08 20:59:07 +00:00
< item: >
< li class = "task reward item" >
2012-07-08 02:43:49 +00:00
< pre >
< div class = "task-meta-controls" >
2012-07-09 01:51:25 +00:00
< span rel = "popover" data-placement = "left" data-content = "{:item.notes}" data-original-title = "{:item.text}" class = 'task-notes' > < i class = "icon-comment" > < / i > < / span >
2012-07-08 02:43:49 +00:00
< / div >
< div class = "task-controls" >
2012-07-09 01:20:30 +00:00
{{{#unless disabled}}}
2012-07-09 04:24:37 +00:00
< a x-bind = click:buyItem class = "item-buy-link" data-type = {:item.type} data-value = {:item.value} data-index = {:item.index} > {:item.value}< img src = "/img/coin_single_gold.png" / > < / a >
2012-07-09 01:20:30 +00:00
{{{/}}}
2012-07-08 02:43:49 +00:00
< / div >
2012-07-09 04:24:37 +00:00
< div class = "task-text" > < img src = "/img/BrowserQuest/habitrpg_mods/{:item.icon}.png" / > {:item.text}< / div >
2012-07-08 02:43:49 +00:00
< / pre >
< / li >
2012-07-07 21:03:58 +00:00
2012-04-27 17:04:44 +00:00
< Script s: >
2012-06-26 14:26:34 +00:00
< script src = /jquery.min.js > < / script >
< script src = /jquery-ui.min.js > < / script >
2012-06-26 14:25:27 +00:00
< script src = /bootstrap.min.js > < / script >
2012-07-07 16:31:51 +00:00
< script src = /jquery.cookie.js > < / script >
< script src = /bootstrap-tour.js > < / script >
2012-06-29 08:33:09 +00:00
< script type = "text/javascript" src = "https://www.google.com/jsapi" > < / script >
< script type = "text/javascript" >
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(function(){});
< / script >