GTS search design tweaks

This commit is contained in:
Greg Edwards 2015-04-22 19:53:33 -04:00
parent 8c8727a075
commit e1077cb9e6
7 changed files with 72 additions and 56 deletions

View File

@ -252,6 +252,10 @@ namespace PkmnFoundations.Structures
}
// todo: Implement trainer memo structure
// Dates encoding seems to be 1 byte for year, starting in 2000,
// 1 byte for month (1-12), and 1 byte for day of month (1-31, depending)
// EggDate is all 0s if not hatched.
// Platinum locations are 0 on DP, egg locations are 0 if not hatched.
public byte[] EggDate { get; set; } // 3 bytes
public byte[] Date { get; set; } // 3 bytes
public ushort EggLocationID { get; set; }

View File

@ -129,6 +129,7 @@ input[type=submit].large, button.large
margin: 0;
padding: 4px 8px;
border-bottom: 1px solid rgba(0,0,0,0.3);
height: 18px;
background-image: -moz-linear-gradient(top, transparent 0%, rgba(0,0,0,0.05) 100%); /* FF3.6+ */
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,transparent), color-stop(100%,rgba(0,0,0,0.05))); /* Chrome,Safari4+ */
background-image: -webkit-linear-gradient(top, transparent 0%,rgba(0,0,0,0.05) 100%); /* Chrome10+,Safari5.1+ */
@ -149,6 +150,10 @@ input[type=submit].large, button.large
background-color: #82d2e0;
}
.pfFormValue
{
}
.home .pfFormKey {background-color: #ff8063;}
.gts .pfFormKey {background-color: #43c4ff;}
.bv .pfFormKey {background-color: #9761e9;}

View File

@ -33,7 +33,13 @@
font-family: 'Meiryo UI',sans-serif;
}
.gtsOffer .colPortrait
.gtsOffer .colPortrait, .gtsOffer .pfFormValue.colPortrait
{
width: 104px;
padding-top: 8px;
}
.colPortrait ul
{
width: 104px;
white-space: nowrap;
@ -107,6 +113,11 @@
border-bottom: none;
}
.gtsPokemonSummary .pfFormKey
{
width: 64px;
}
.gtsPokemonSummary .pfFormValue
{
width: 180px;
@ -167,9 +178,9 @@
.gtsOffer
{
margin: 8px 0;
width: 672px;
}
.gtsOffer .pfColumn
{
margin: 0 8px;
}

View File

@ -85,8 +85,9 @@
<div class="clear"></div>
<asp:Repeater ID="rptPokemon" runat="server">
<ItemTemplate>
<div class="gtsPokemonSummary gtsOffer pfBoxThin">
<div class="pfColumn colPortrait">
<table class="gtsPokemonSummary gtsOffer pfBoxThin pfFormGroup">
<td class="pfFormValue colPortrait" rowspan="6">
<ul>
<li class="portrait">
<%# CreateOfferImage(Container.DataItem) %>
@ -99,57 +100,44 @@
<%# CreatePokerus(Container.DataItem) %>
</li>
</ul>
</div>
<div class="pfColumn colBasic">
<table class="pfFormGroup">
<tr class="pfFormPair">
<th class="pfFormKey">
Name
</th>
<td class="pfFormValue">
<%# CreateNickname(Container.DataItem) %>
</td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Species</th>
<td class="pfFormValue"><%# CreateSpecies(Container.DataItem) %>
(#<%# CreatePokedex(Container.DataItem) %>)
</td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Held item</th>
<td class="pfFormValue"><%# CreateHeldItem(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Nature</th>
<td class="pfFormValue"><%# CreateNature(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Ability</th>
<td class="pfFormValue"><%# CreateAbility(Container.DataItem) %></td>
</tr>
</table>
</div>
<div class="pfColumn colWanted">
<table class="pfFormGroup">
<tr class="pfFormPair">
<th class="pfFormKey">Offered by</th>
<td class="pfFormValue"><%# CreateTrainer(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey" rowspan="2">Wanted</th>
<td class="pfFormValue"><%# CreateWantedSpecies(Container.DataItem) %>
<%# CreateWantedGender(Container.DataItem) %>
</td>
</tr>
<tr class="pfFormPair">
<td class="pfFormValue"><%# CreateWantedLevel(Container.DataItem) %></td>
</tr>
</table>
</div>
</td>
<tr class="pfFormPair">
<th class="pfFormKey">
Name
</th>
<td class="pfFormValue">
<%# CreateNickname(Container.DataItem) %>
</td>
<th class="pfFormKey" rowspan="2">Offered by</th>
<td class="pfFormValue"><%# CreateTrainer(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Species</th>
<td class="pfFormValue"><%# CreateSpecies(Container.DataItem) %>
(#<%# CreatePokedex(Container.DataItem) %>)
</td>
<td class="pfFormValue"></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Held item</th>
<td class="pfFormValue"><%# CreateHeldItem(Container.DataItem) %></td>
<th class="pfFormKey" rowspan="2">Wanted</th>
<td class="pfFormValue"><%# CreateWantedSpecies(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Nature</th>
<td class="pfFormValue"><%# CreateNature(Container.DataItem) %></td>
<td class="pfFormValue"><%# CreateWantedGender(Container.DataItem) %>
<%# CreateWantedLevel(Container.DataItem) %></td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Ability</th>
<td class="pfFormValue"><%# CreateAbility(Container.DataItem) %></td>
<th class="pfFormKey">Date</th>
<td class="pfFormValue"><%# CreateDate(Container.DataItem) %></td>
</tr>
</table>
<div class="clear"></div>
</div>
</ItemTemplate>
</asp:Repeater>

View File

@ -100,7 +100,6 @@ namespace PkmnFoundations.GTS
case Pokerus.Infected:
return "<span class=\"pkrs\">PKRS</span>";
case Pokerus.Cured:
return "<span class=\"pkrs_cure\">CURED</span>";
case Pokerus.None:
default:
return "";
@ -238,5 +237,12 @@ namespace PkmnFoundations.GTS
GtsRecordBase record = (GtsRecordBase)DataItem;
return FormatLevels(record.RequestedMinLevel, record.RequestedMaxLevel);
}
protected String CreateDate(object DataItem)
{
GtsRecordBase record = (GtsRecordBase)DataItem;
if (record.TimeDeposited == null) return "";
return Common.HtmlEncode(((DateTime)record.TimeDeposited).ToString("f"));
}
}
}

View File

@ -24,7 +24,7 @@
</li>
<li class="specialFlags">
<asp:PlaceHolder ID="phShiny" runat="server">
<span class="shiny"></span>
<span class="shiny"></span>
</asp:PlaceHolder>
<%-- todo: use images for pkrs status --%>
<asp:PlaceHolder ID="phPkrs" runat="server">

View File

@ -64,6 +64,8 @@ namespace PkmnFoundations.Web
public static String SpeciesImageSmall(Form f)
{
// fixme: this is appending forms to some pokemon eg. arceus, keldeo, deerling
// todo: need to take gender here optionally
return "~/images/pkmn-sm/" + PokemonImage2(f, Genders.Male) + ".png";
}