From 88c64a6f80000aa76d5146a61b08cb9d34fcaa3a Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Wed, 4 Dec 2013 16:52:06 -0700 Subject: [PATCH] classes & grunt-spritesmith: NPCs habitrpg-shared#85164c9 --- public/css/npcs.styl | 47 +++++++++++--------------- public/js/services/guideServices.js | 4 +-- views/options/inventory/inventory.jade | 4 +-- views/options/inventory/stable.jade | 42 +++++++++++++---------- views/options/social/tavern.jade | 2 +- views/shared/header/header.jade | 2 +- views/shared/modals/achievements.jade | 2 +- views/shared/modals/buy-gems.jade | 2 +- views/shared/modals/new-stuff.jade | 2 +- 9 files changed, 52 insertions(+), 55 deletions(-) diff --git a/public/css/npcs.styl b/public/css/npcs.styl index 2c2370808c..f7127f5f72 100644 --- a/public/css/npcs.styl +++ b/public/css/npcs.styl @@ -1,36 +1,27 @@ -.NPC-Alex, .NPC-Bailey, .NPC-Bailey-Head, .NPC-Daniel, .NPC-Justin, .NPC-Justin-Head, .NPC-Matt {background: url("/bower_components/habitrpg-shared/img/npcs/NPC-SpriteSheet.png") no-repeat} +.npc_alex_container + margin-bottom: 20px -.NPC-Alex {background-position: 0 0; width: 162px; height: 138px;} -.NPC-Alex-container{margin-bottom: 20px;} -.NPC-Daniel {background-position: -222px 0; width: 135px; height: 123px} -.NPC-Justin {background-position: -357px 0; width: 84px; height: 119px} -.NPC-Justin-Head {background-position: -396px 0; width: 36px; height: 96px} -.NPC-Matt {background-position: -441px 0; width: 100%; padding-left: 208px; padding-bottom: 20px;} +.npc_matt + margin-bottom: 20px -// Bailey -.NPC-Bailey - background-position: -162px -42px - width: 60px - height: 72px - float:left -.NPC-Bailey-Head - background-position: -162px -42px - width: 60px - height: 30px - position: absolute - top: 117px // 147 (header-height) - 30 (bailey height) - right: 50px - cursor: pointer - - -.static-popover - z-index 0 - display block - position:relative +.npc_bailey + float:left +.npc_bailey_head + height: 30px !important + position: absolute + top: 117px // 147 (header-height) - 30 (bailey height) + right: 50px + cursor: pointer // Tour (Justin) -.NPC-Justin.float-left +.npc_justin.float-left float: left margin-right: 5px margin-bottom: 5px + +.static-popover + z-index 0 + display block + position:relative + .popover-navigation {clear:both;} \ No newline at end of file diff --git a/public/js/services/guideServices.js b/public/js/services/guideServices.js index ebb9cadb36..e51dd44d06 100644 --- a/public/js/services/guideServices.js +++ b/public/js/services/guideServices.js @@ -52,7 +52,7 @@ angular.module('guideServices', []). } ]; _.each(tourSteps, function(step){ - step.content = "
" + step.content + "
"; // add Justin NPC img + step.content = "
" + step.content + "
"; // add Justin NPC img }); $('.main-herobox').popover('destroy'); var tour = new Tour({ @@ -75,7 +75,7 @@ angular.module('guideServices', []). if (!placement) placement = 'bottom'; $(selector).popover('destroy'); var button = ""; - html = "
" + html + '
' + button + '
'; + html = "
" + html + '
' + button + '
'; $(selector).popover({ title: title, placement: placement, diff --git a/views/options/inventory/inventory.jade b/views/options/inventory/inventory.jade index 90a57f379c..8547ddfdef 100644 --- a/views/options/inventory/inventory.jade +++ b/views/options/inventory/inventory.jade @@ -38,10 +38,10 @@ script(type='text/ng-template', id='partials/options.inventory.inventory.html') .span6 h2 Market .row-fluid - table.NPC-Alex-container + table.npc_alex_container tr td - .NPC-Alex.pull-left + .npc_alex.pull-left td .popover.static-popover.fade.right.in .arrow diff --git a/views/options/inventory/stable.jade b/views/options/inventory/stable.jade index 4df4017525..939c86cad4 100644 --- a/views/options/inventory/stable.jade +++ b/views/options/inventory/stable.jade @@ -14,15 +14,18 @@ script(type='text/ng-template', id='partials/options.inventory.stable.html') script(type='text/ng-template', id='partials/options.inventory.stable.mounts.html') .stable - .NPC-Matt - .popover.static-popover.fade.right.in(style='max-width: 550px; margin-left: 10px;') - .arrow - h3.popover-title - a(target='_blank', href='http://www.kickstarter.com/profile/mattboch') Matt Boch - .popover-content - p. - Shall I bring you your steed, {{user.profile.name}}? Click a mount to saddle up. - h4 {{mountCount}} / {{totalPets}} Mounts Tamed + table(style='width:100%') + tr + td.npc_matt + td + .popover.static-popover.fade.right.in(style='max-width: 550px; margin-left: 10px;') + .arrow + h3.popover-title + a(target='_blank', href='http://www.kickstarter.com/profile/mattboch') Matt Boch + .popover-content + p. + Shall I bring you your steed, {{user.profile.name}}? Click a mount to saddle up. + h4 {{mountCount}} / {{totalPets}} Mounts Tamed menu.pets(type='list') li.customize-menu(ng-repeat='egg in Items.eggs') menu @@ -42,15 +45,18 @@ script(type='text/ng-template', id='partials/options.inventory.stable.mounts.htm script(type='text/ng-template', id='partials/options.inventory.stable.pets.html') .stable - .NPC-Matt - .popover.static-popover.fade.right.in(style='max-width: 550px; margin-left: 10px;') - .arrow - h3.popover-title - a(target='_blank', href='http://www.kickstarter.com/profile/mattboch') Matt Boch - .popover-content - p. - Welcome to the Stable! I'm Matt, the beast master. Choose a pet here to venture at your side. Have a look-see at all the pets you can collect. - h4 {{petCount}} / {{totalPets}} Pets Found + table(style='width:100%') + tr + td.npc_matt + td + .popover.static-popover.fade.right.in(style='max-width: 550px; margin-left: 10px;') + .arrow + h3.popover-title + a(target='_blank', href='http://www.kickstarter.com/profile/mattboch') Matt Boch + .popover-content + p. + Welcome to the Stable! I'm Matt, the beast master. Choose a pet here to venture at your side. Have a look-see at all the pets you can collect. + h4 {{petCount}} / {{totalPets}} Pets Found menu.pets(type='list') li.customize-menu(ng-repeat='egg in Items.eggs') diff --git a/views/options/social/tavern.jade b/views/options/social/tavern.jade index 46a773f8f4..b3bc2657d9 100644 --- a/views/options/social/tavern.jade +++ b/views/options/social/tavern.jade @@ -4,7 +4,7 @@ table tr td - .NPC-Daniel + .npc_daniel td .popover.static-popover.fade.right.in .arrow diff --git a/views/shared/header/header.jade b/views/shared/header/header.jade index 4ff786fa96..051c71d8db 100644 --- a/views/shared/header/header.jade +++ b/views/shared/header/header.jade @@ -35,5 +35,5 @@ .herobox-wrap(ng-repeat='profile in partyMinusSelf') include avatar - .NPC-Bailey-Head(ng-show='user.flags.newStuff', tooltip='Psst', tooltip-placement='top', ng-click='modals.newStuff=true') + .npc_bailey.npc_bailey_head(ng-show='user.flags.newStuff', tooltip='Psst', tooltip-placement='top', ng-click='modals.newStuff=true') diff --git a/views/shared/modals/achievements.jade b/views/shared/modals/achievements.jade index fd05296c54..c599d910e1 100644 --- a/views/shared/modals/achievements.jade +++ b/views/shared/modals/achievements.jade @@ -35,7 +35,7 @@ div(modal='user.flags.contributor') .modal-header h3 Contributor Achievement! .modal-body - .NPC-Justin.float-left + .npc_justin.float-left p. {{user.profile.name}}, you awesome person! You're now a level {{user.contributor.level}} contributor for helping HabitRPG. See what prizes you've earned for your contribution! diff --git a/views/shared/modals/buy-gems.jade b/views/shared/modals/buy-gems.jade index e041f2d0ae..61688ef33c 100644 --- a/views/shared/modals/buy-gems.jade +++ b/views/shared/modals/buy-gems.jade @@ -7,7 +7,7 @@ div(modal='modals.buyGems') table tr td - .NPC-Justin + .npc_justin td .popover.static-popover.fade.right.in.wide-popover .arrow diff --git a/views/shared/modals/new-stuff.jade b/views/shared/modals/new-stuff.jade index a24c8049c8..e7bd9bde38 100644 --- a/views/shared/modals/new-stuff.jade +++ b/views/shared/modals/new-stuff.jade @@ -5,7 +5,7 @@ div(modal='modals.newStuff') table tr td - .NPC-Bailey + .npc_bailey td .popover.static-popover.fade.right.in.wide-popover .arrow