From e2016e1eed8eb5ebee795d2cd6ad7b255d071ee2 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 17 Feb 2013 00:25:34 -0500 Subject: [PATCH] separate everything out into individual html files --- views/app/alerts.html | 36 ++ views/app/footer.html | 40 +++ views/app/header.html | 66 ++++ views/app/index.html | 757 +----------------------------------------- views/app/modals.html | 208 ++++++++++++ 5 files changed, 361 insertions(+), 746 deletions(-) create mode 100644 views/app/alerts.html create mode 100644 views/app/footer.html create mode 100644 views/app/header.html create mode 100644 views/app/modals.html diff --git a/views/app/alerts.html b/views/app/alerts.html new file mode 100644 index 0000000000..c9c1067aef --- /dev/null +++ b/views/app/alerts.html @@ -0,0 +1,36 @@ + + {#if _flash.error} + + {/} + + {#if equal(_user.flags.kickstarter,'show')} +
+ [x] + + + + +
+ Hi everyone, last stretch of the Kickstarter! Let's get a ton of new features plus mobile apps. With ~25k registered users, if everyone backs $1 we can do it! Help spread the word: + +
+ + + + +
+
+ +
+ {/} + + {#unless equal(_user.flags.celebrationEvent,'hide')} +
+ [x] + We did it! Let's have a celebration live-stream for making our Kickstarter goal. Sun 2/17 5pm EST, details the G+ event. +
+ {/} \ No newline at end of file diff --git a/views/app/footer.html b/views/app/footer.html new file mode 100644 index 0000000000..a99aaba7f1 --- /dev/null +++ b/views/app/footer.html @@ -0,0 +1,40 @@ + +
+
+ {#if equal(_view.nodeEnv, 'production')} + + + +
+ + +
+ + +
+
+ {else} +
+ + +
+ {/} +
+ +
+
+
\ No newline at end of file diff --git a/views/app/header.html b/views/app/header.html new file mode 100644 index 0000000000..5acb4b472f --- /dev/null +++ b/views/app/header.html @@ -0,0 +1,66 @@ + +
+
+ + +
+ +
+ + + {#each _partyMembers as :member} + {#unless equal(:member.id, _userId)} +
+ +
+ {/} + {/} + + +
+
+
+ {round(_user.stats.hp)} / 50 +
+ +
+
+ + {#if _user.history.exp} +   + {/} + {round(_user.stats.exp)} / {_tnl} + +
+ +
+ +
+ +
+ + +
+ {#unless _loggedIn} + Login / Register + {else} +
+ + + +
+ {/} +
\ No newline at end of file diff --git a/views/app/index.html b/views/app/index.html index c3001ef05b..e4c1832ef4 100644 --- a/views/app/index.html +++ b/views/app/index.html @@ -1,11 +1,10 @@ - + + + + + + + HabitRPG | Gamify Your Life @@ -14,759 +13,25 @@ do a find for the string after "→" - - {#if _loggedIn} - -

API

- Copy these for use in third party applications. -
User ID
-
{_user.id}
- -
API Token
-
{_user.apiToken}
- -
- Reset - - <@footer> - - -
- - -

This resets your entire account - your tasks will be deleted and your character will start over.

-

This is highly discouraged because you'll lose historical data, which is useful for graphing your progress over time. However, some people find it useful in the beginning after playing with the app for a while.

- <@footer> - - - -
- - - {#if _user.party.current} -

{_party.name}

- - {#each _partyMembers as :member} - - {/} -
{username(:member.auth)}({:member.id})
-
- {#if _view.partyError} -
{_view.partyError}
- {/} -
- - -
-
- Leave - - {else if _user.party.invitation} - -

You're Invited To {_party.name}

- Accept - Reject - - {else} -

Create A Party

- -

You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:

-
{_user.id}
-
- {#if _view.partyError} -
{_view.partyError}
- {/} -
- - -
-
- - {/} - <@footer> - - -
- - {else} - - Login / Register With Facebook -

Or

- - - -
-
-
-
-
- {/} - -
- -
- -
-

You died! Game Over.

- Continue -
-
- - - - -

Highly discouraged because red tasks provide good incentive to improve (read more). However, this becomes necessary after long bouts of bad habits.

- <@footer> - {#if lt(_user.balance,1)} - Buy More TokensNot enough tokens - {else} - Re-Roll4 Tokens - {/} - -
- - - - -

You're out of tokens, which are used to buy pets and mounts.

- <@footer> - Buy More TokensNot enough tokens - -
- - - - {#with _user.preferences} - - - -
-
- - -
- -
{username(_user.auth)}
-
- - - - -
  • - - - - -
  • - - -
  • - - - - - - -
  • - - -
  • - - - - - - - -
  • -
    - - {#if equal(_user.preferences.gender, 'f')} - -
  • - - - - -
  • -
    - {/} -
    - -
    -
    - {/} - <@footer> - - -
    - - -
    -
    - {#if _profileEditing} - Save - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
      - {#each _user.profile.websites as :website} - -
    • {:website}
    • - {/} -
    - -
    - Save - {else} -

    - {#if @user.profile.name}{@user.profile.name} - {else}{username(@user.auth)} - {/} - {#if @main}Edit{/} -

    - {#if @user.profile.imageUrl} - - {/} - {#if @user.profile.blurb} -

    {@user.profile.blurb}

    - {/} - {#if @user.profile.websites} -
      - {#each @user.profile.websites as :website} -
    • {:website}
    • - {/} -
    - {/} - - {/} -
    - -
    -

    Badges

    -

    Coming Soon

    -
    - -
    - - - {#if _flash.error} -
      - {#each _flash.error as :error}
    • {:error}
    • {/} -
    - {/} - - {#if equal(_user.flags.kickstarter,'show')} -
    - [x] - - - - -
    - Hi everyone, last stretch of the Kickstarter! Let's get a ton of new features plus mobile apps. With ~25k registered users, if everyone backs $1 we can do it! Help spread the word: - -
    - - - - -
    -
    - -
    - {/} - - {#unless equal(_user.flags.celebrationEvent,'hide')} -
    - [x] - We did it! Let's have a celebration live-stream for making our Kickstarter goal. Sun 2/17 5pm EST, details the G+ event. -
    - {/} -
    - -
    - - - -
    -

    Habits

    - -
      {#each _habitList as :task}{/}
    -
    - -
    -

    Daily

    - -
      {#each _dailyList as :task}{/}
    -
    - -
    -

    Todos

    -
    - -
    -
      - {#each _todoList as :task}{/} -
    -
    - Clear Completed -

     

    -
    - - {#if _user.history.todos} - - {/} - {#if _user.flags.enableDueDates} -  iCal -  Google Calendar - {/} - - - - -
    - -
    - - -
    -

    Rewards

    -
    - {#unless _view.activeTabPets} - - - - - - -
    {gold(_user.stats.gp)}
    {silver(_user.stats.gp)}
    - {else} - - {/} -
    -
    - - - {#if _user.flags.petsEnabled} -
    - -
    -
    - -
    - -
    - {#with _view.items.pets as :pets} - -
    - {#with :pets[0]}{/} - {#with :pets[1]}{/} - {#with :pets[2]}{/} - {#with :pets[3]}{/} -
    - -
    - {#with :pets[4]}{/} - {#with :pets[5]}{/} - {#with :pets[6]}{/} - {#with :pets[7]}{/} -
    - -
    - {#with :pets[8]}{/} - {#with :pets[9]}{/} - {#with :pets[10]}{/} - {#with :pets[11]}{/} -
    - -
    - {#with :pets[12]}{/} - {#with :pets[13]}{/} - {#with :pets[14]}{/} - {#with :pets[15]}{/} -
    - -
    - {#with :pets[16]}{/} -
    - - - {/} -
    - -
    - - - -
    - {else} - - {/} -
    - - +
    - -
    -
    - {#if equal(_view.nodeEnv, 'production')} - - - -
    - - -
    - - -
    -
    - {else} -
    - - -
    - {/} -
    - -
    -
    -
    - - -
      - {#each _rewardList as :task}{/} -
    - - - {#if _user.flags.itemsEnabled} -
      - {#with _view.items.weapon as :item}{/} - {#with _view.items.armor as :item}{/} - {#with _view.items.head as :item}{/} - {#with _view.items.shield as :item}{/} - {#with _view.items.potion as :item}{/} - {#with _view.items.reroll as :item}{/} -
    - {/} - - -
    -
    - {#if _user.items.pets[.name]}{/} - -
    -
    - - - - - {{#if @noDismiss}}{{/}} - - - -
    -
    - {tokens(_user.balance)} - Tokens -
    -
    - - - -
    - - -
    - - -
  • -
    -    
    - -
    - - - {#if :task.history} - - - - {/} -
    - - {#if :task.notes} - - {/} -
    - -
    - - {#if equal(:task.type, 'habit')} - {#if :task.up}{/} - {#if :task.down}{/} - - {else if equal(:task.type, 'reward')} - {:task.value} - - {else} - - {/} -
    -
    {:task.text}
    - - -
    -
  • - - - - - - - - {#unless :item.hide} -
  • -
    -      
    - -
    -
    - {#if @reroll} - - {else} - {:item.value} - {/} -
    -
    - {#if :item.icon} - {:item.text} - {else} - - - -
    {:item.text}
    - {/} - -
    -
    -
  • - {/} - - - -
    - {#unless @minimal}{#if @profile.items.pet}{/}{/} -
    - {#with @profile.preferences as :p} - - - - - - - {/} -
    - {{#unless @minimal}} -
    Lvl {@profile.stats.lvl}
    - {{/}} -
    + diff --git a/views/app/modals.html b/views/app/modals.html new file mode 100644 index 0000000000..92ee097888 --- /dev/null +++ b/views/app/modals.html @@ -0,0 +1,208 @@ + + {#if _loggedIn} + +

    API

    + Copy these for use in third party applications. +
    User ID
    +
    {_user.id}
    + +
    API Token
    +
    {_user.apiToken}
    + +
    + Reset + + <@footer> + + +
    + + +

    This resets your entire account - your tasks will be deleted and your character will start over.

    +

    This is highly discouraged because you'll lose historical data, which is useful for graphing your progress over time. However, some people find it useful in the beginning after playing with the app for a while.

    + <@footer> + + + +
    + + + {#if _user.party.current} +

    {_party.name}

    + + {#each _partyMembers as :member} + + {/} +
    {username(:member.auth)}({:member.id})
    +
    + {#if _view.partyError} +
    {_view.partyError}
    + {/} +
    + + +
    +
    + Leave + + {else if _user.party.invitation} + +

    You're Invited To {_party.name}

    + Accept + Reject + + {else} +

    Create A Party

    + +

    You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:

    +
    {_user.id}
    +
    + {#if _view.partyError} +
    {_view.partyError}
    + {/} +
    + + +
    +
    + + {/} + <@footer> + + +
    + + {else} + + Login / Register With Facebook +

    Or

    + + + +
    +
    +
    +
    +
    + {/} + +
    + +
    + +
    +

    You died! Game Over.

    + Continue +
    +
    + + + + +

    Highly discouraged because red tasks provide good incentive to improve (read more). However, this becomes necessary after long bouts of bad habits.

    + <@footer> + {#if lt(_user.balance,1)} + Buy More TokensNot enough tokens + {else} + Re-Roll4 Tokens + {/} + +
    + + + + +

    You're out of tokens, which are used to buy pets and mounts.

    + <@footer> + Buy More TokensNot enough tokens + +
    + + + + {#with _user.preferences} + + + +
    +
    + + +
    + +
    {username(_user.auth)}
    +
    + + + + +
  • + + + + +
  • + + +
  • + + + + + + +
  • + + +
  • + + + + + + + +
  • +
    + + {#if equal(_user.preferences.gender, 'f')} + +
  • + + + + +
  • +
    + {/} +
    + +
    +
    + {/} + <@footer> + + +
    + + + + {{#if @noDismiss}}{{/}} + \ No newline at end of file