From e1864520d9d3a3be788db9c758f12846ecb72e33 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Fri, 3 Jul 2015 20:37:48 -0400 Subject: [PATCH] Redesign teambuilder - Nicer looking buttons - Nicer layout - Ctrl+F-able pokemon species names --- js/client-teambuilder.js | 9 ++++---- js/storage.js | 2 +- style/battle.css | 8 ++++++++ style/client.css | 44 ++++++++++++++++++++++++++++++++++++---- 4 files changed, 54 insertions(+), 9 deletions(-) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index 1edfe0c25..761d389f3 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -132,10 +132,11 @@ this.$el.html(buf); return; } - buf = '

y\'know zarel this is a pretty good teambuilder

'; - buf += '

aww thanks I\'m glad you like it :)

'; + buf = '

y\'know strawberries have more potassium than bananas

'; + buf += '

that doesn\'t have anything to do with teambuilding!

'; + buf += '

fiiiiiiine press Ctrl+F to find teams by pokemon name

'; buf += this.clipboardHTML(); - buf += '
    '; + buf += '
      '; if (!window.localStorage && !window.nodewebkit) buf += '
    • == CAN\'T SAVE ==
      Your browser doesn\'t support localStorage and can\'t save teams! Update to a newer browser.
    • '; if (Storage.cantSave) buf += '
    • == CAN\'T SAVE ==
      You hit your browser\'s limit for team storage! Please backup them and delete some of them. Your teams won\'t be saved until you\'re under the limit again.
    • '; if (!teams.length) { @@ -169,7 +170,7 @@ formatText = '['+team.format+'] '; } - buf += '
    • '; } diff --git a/js/storage.js b/js/storage.js index 25289960c..93d4eb290 100644 --- a/js/storage.js +++ b/js/storage.js @@ -456,7 +456,7 @@ Storage.packedTeamIcons = function(buf) { if (!buf) return '(empty team)'; return this.packedTeamNames(buf).map(function (species) { - return ''; + return '' + toId(species) + ''; }).join(''); }; diff --git a/style/battle.css b/style/battle.css index 31b0dab21..305b2851e 100644 --- a/style/battle.css +++ b/style/battle.css @@ -895,3 +895,11 @@ License: GPLv2 .message-error { color: #992222; } +.message-overflow, +.chat small.message-overflow { + font-size: 0pt; +} +.message-overflow::before { + font-size:9pt; + content: '...'; +} diff --git a/style/client.css b/style/client.css index 3aaafb493..07bdf7034 100644 --- a/style/client.css +++ b/style/client.css @@ -23,6 +23,9 @@ body { margin: 0; padding: 5px 15px; } +.pad p { + margin: 9px 0; +} .label { font-size: 9pt; font-weight: bold; @@ -472,9 +475,8 @@ p.or:after { border: 1px solid #888888; background: #D5D5D5; } -.select { +.select, .team { cursor: pointer; - box-sizing: border-box; width: 230px; height: 32px; padding: 0 5px; @@ -488,18 +490,19 @@ p.or:after { box-shadow: inset 0 1px 0 #FFFFFF; background: linear-gradient(to bottom, #edf2f8, #d7e3ec); color: black; + box-sizing: border-box; } .select.teamselect { height: 43px; white-space: nowrap; overflow: hidden; } -.select:hover { +.select:hover, .team:hover { border-color: #555555; background: #FFFFFF; background: linear-gradient(to bottom, #dce4ec, #c6d3e0); } -.select:active { +.select:active, .team:active { border-color: #777777; background: #DDDDDD; box-shadow: none; @@ -1753,6 +1756,39 @@ div[class^='tournament-message-'], div[class*=' tournament-message-'] { * Teambuilder *********************************************************/ +.teamlist { + list-style: none; + margin: 0; + padding: 0; +} +.teamlist li { + margin: 3px 16px; + padding: 0; +} + +.teamlist .team { + white-space: nowrap; + width: 360px; + height: 49px; + padding: 1px 6px 1px 6px; + font-size: 8pt; + vertical-align: middle; + text-align: center; +} +.teamlist .team small { + display: block; + padding: 3px 74px 0 74px; +} +.teamlist .team .pokemonicon span { + font-size: 9px !important; + display: block; + overflow: visible; + position: relative; + width: 32px; + top: 22px; + color: transparent; +} + .teamedit { position: absolute; display: block;