From e5a893a71046806e12c6f7c12325b0357d6d6739 Mon Sep 17 00:00:00 2001 From: Zachary Kain Date: Sat, 9 Mar 2013 01:34:15 -0500 Subject: [PATCH] revamp rewards and pets UI. Obv pets is temporary pending new pet system --- styles/app/items.styl | 109 ++++++++++++++++++++---------- styles/app/shop_sprites.styl | 6 +- styles/app/tasks.styl | 9 ++- views/app/rewards.html | 73 ++++++++++----------- views/app/tasks.html | 124 ++++++++++++++++++----------------- 5 files changed, 185 insertions(+), 136 deletions(-) diff --git a/styles/app/items.styl b/styles/app/items.styl index eaf078a71b..b90d2ea53a 100644 --- a/styles/app/items.styl +++ b/styles/app/items.styl @@ -1,42 +1,83 @@ -/* ----- Items, Weapons, Armor -----*/ -.item-store-popover img - float:left - padding-right:7px; +// money styles +.money + display: inline-block + line-height: 1.5em + padding-left: 0.75em -.item .task-text img - max-height: 16px + [class^="shop_"] + vertical-align: top + display: inline-block -.buy-link, .item-buy-link - background-color: #DEE5F2 - padding: 2px - margin-right: 10px - border-radius: 5px +.btn-buy + width: 4.5em + height: 3em + padding: 0.75em 0 0 + text-align: center + vertical-align: top + background-color: $better - img - height:20px + color: #555 + &:hover, &:focus + background-color: $bad + text-decoration: none - .item-buy-link - background-color: #ccffcc +.rewards + margin-bottom: 1.5em + padding-bottom: 1.5em + border-bottom: 1px solid rgba(0,0,0,0.1) -.item - position:relative +.reward-item + background: white -.shop-table - position:absolute - top: 0 - left: 50px +.reward-cost + display: inline -#money - position:relative -.shop_gold, .shop_silver, .shop_copper - float:right -.money-table - position:absolute - top: 0 -.shop-pet - mouse: pointer -.shop-pet-owned-check - position:absolute - right:0px - bottom:0px +// store items +.btn-reroll + background-color: $better + cursor: pointer + box-shadow: inset -1px -1px 0 rgba(0,0,0,0.1) + &:hover, &:focus + background-color: $bad + +.item-img + display: inline-block + vertical-align: top + // background-color: $bad + height: 3em + margin-left: -0.5em + margin-right: 0.5em + // border: 1px solid rgba(0,0,0,0.1) + border-top: 0 + border-bottom: 0 + +.token-wallet + cursor: pointer + .tile + background-color: darken($neutral, 10%) + .add-token-btn + opacity: 0 + &:hover, &:focus + .add-token-btn + opacity: 1 + background-color: $good + .tile + opacity: 1 + + +// pets (this will all change when pet system is overhauled) +.pet-grid + padding-top: 1.5em + border-top: rgba(0,0,0,0.1) + table + width: 100% + td + padding: 0.5em + width: 25% + &.active-pet + background-color: $bad + outline: 1px solid rgba(0,0,0,0.1) + outline-offset: -1px + &:hover, &:focus + background-color: darken($better, 10%) \ No newline at end of file diff --git a/styles/app/shop_sprites.styl b/styles/app/shop_sprites.styl index b3abb056c5..b609105fa1 100644 --- a/styles/app/shop_sprites.styl +++ b/styles/app/shop_sprites.styl @@ -49,6 +49,6 @@ .shop_armor_1 {background-position: -800px 0; width: 40px; height: 40px} .shop_reroll {background-position: -840px 0; width: 40px; height: 40px} .shop_potion {background-position: -880px 0; width: 40px; height: 40px} -.shop_copper {background-position: -920px 0; width: 40px; height: 40px} -.shop_silver {background-position: -960px 0; width: 40px; height: 40px} -.shop_gold {background-position: -1000px 0; width: 40px; height: 40px} +.shop_copper {background-position: -923px -8px; width: 32px; height: 22px} +.shop_silver {background-position: -963px -8px; width: 32px; height: 22px} +.shop_gold {background-position: -1003px -8px; width: 32px; height: 22px} diff --git a/styles/app/tasks.styl b/styles/app/tasks.styl index 5b23320169..0aac92adb2 100644 --- a/styles/app/tasks.styl +++ b/styles/app/tasks.styl @@ -200,6 +200,7 @@ for $stage in $stages .action-yesno // uncompleted icon label:after + // content: '▨' content: '◯' display: block height: 1.714285714em @@ -325,7 +326,13 @@ for $stage in $stages background-color: lighten($best, 20%) &:hover, &:focus background-color: lighten($best, 40%) - +.tile.flush + margin-left: 0 + border: 1px solid rgba(0,0,0,0.2) + outline: 0 + line-height: 2em + &:first-child + border-right: 0 // todos ui diff --git a/views/app/rewards.html b/views/app/rewards.html index dd4394e625..6a8c0bb4a7 100644 --- a/views/app/rewards.html +++ b/views/app/rewards.html @@ -1,7 +1,12 @@ + + + + {#if _rewardList}
    {#each _rewardList as :task}{/}
+ {/} {#if _user.flags.itemsEnabled} @@ -16,48 +21,40 @@ {/} -
-
- {#if _user.items.pets[.name]}{/} - -
-
+ + + -
-
- {tokens(_user.balance)} - Tokens -
-
- + + + {tokens(_user.balance)} Tokens + - {#unless :item.hide} -
  • -
    - -
    -
    - {#if @reroll} - - {else} - {:item.value} - {/} -
    -
    - {#if :item.icon} - {:item.text} - {else} - - - -
    {:item.text}
    - {/} - -
    -
  • - {/} \ No newline at end of file + {#unless :item.hide} +
  • + +
    + +
    + + +
    + {#if @reroll} + + {else} + + {:item.value} + + + {/} +
    + + +

    {:item.text}

    +
  • + {/} \ No newline at end of file diff --git a/views/app/tasks.html b/views/app/tasks.html index 2dd39a9e83..c038cfdb8d 100644 --- a/views/app/tasks.html +++ b/views/app/tasks.html @@ -56,85 +56,84 @@
    - -
    -

    Rewards

    -
    - {#unless _view.activeTabPets} - - - - - - -
    {gold(_user.stats.gp)}
    {silver(_user.stats.gp)}
    - {else} - - {/} + + + {#unless _view.activeTabPets} +
    + {gold(_user.stats.gp)} +
    -
    - +
    + {silver(_user.stats.gp)} + +
    + + {else} + + {/} + +

    Rewards

    + {#if equal(_user.flags.petsEnabled,true)}
    -
    - -
    + + +
    {#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]}{/} -
    - - + + + {#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} - {/}
    + {/} +
    @@ -170,11 +169,16 @@
    {#if equal(:task.type, 'habit')} - {#if :task.up}{/} - {#if :task.down}{/} + {#if :task.up}{/} + {#if :task.down}{/} + {else if equal(:task.type, 'reward')} - {:task.value} + + {:task.value} + + + {else}