Skip to content

Commit

Permalink
new design
Browse files Browse the repository at this point in the history
  • Loading branch information
DeinFreund committed Dec 24, 2017
1 parent fb9a08c commit 62e31ec
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 76 deletions.
42 changes: 31 additions & 11 deletions Zero-K.info/Styles/userpage.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.username{
text-align: center;
letter-spacing: 0.3px;
margin-left: 150px;
margin-right: 150px;
}

.progress_filler{
Expand Down Expand Up @@ -68,19 +70,35 @@
.user_buttons{
float: right;
text-align: center;
width: 64px;
bottom: 0px;
margin-top: 11px;
margin-top: 0px;
}

.user_buttons table{
}
.user_buttons tr td{
padding: 4px;
}

#avatar{
margin-top: 15px;
float:left;
padding-left: 15px;
margin-left: auto;
margin-right: auto;
margin-top: 5px;
background-image: url("/img/ranks/level-elo/velvetbacking.jpg");
background-size: 100% 100%;
width: 94px;
height: 180px;
}
.user_buttons table{
.avatarbg{
background-image: url("/img/avatarbg.png");
display: inline-block;
}
#avatar table {
width: 100%;
padding-top: 10px;
}
.user_buttons tr td{
#avatar table tr td{
text-align: center;
padding: 4px;
}
#usr_info{
Expand All @@ -94,19 +112,21 @@
}
#badges{
height: 26px;
width: 300px;
width: 400px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#levelrank{
padding-top: 4px;
padding-top: 0px;
margin-left: auto;
margin-right: auto;
}
.ranks{
height: 200px;
}
#velvet{
display:none;
#badge,
#avatarwrap{
width: 49%;
display: inline-block;
}
145 changes: 80 additions & 65 deletions Zero-K.info/Views/Shared/UserDetail.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<link href="/Styles/userpage.css" rel="stylesheet">

int badge_width = 60;
int badge_width = 69;
int padding = 10;
<style>
#levelrank {
Expand Down Expand Up @@ -63,6 +63,31 @@
}
@if (!Model.IsDeleted || Global.IsModerator)
{
<div class="user_buttons">
<table>
<tr>
<td>
@if (Model.AccountID != Global.AccountID)
{
<a href="@Html.PrintSpringLink("chat/user/" + Model.Name)" nicetitle="Chat with @Model.Name in the lobby"><img src="/img/chat.png" height="32" /></a><br />
}
</td>
<td>
@if (Model.AccountID == Global.AccountID)
{
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Contact administrators"><img src="/img/help.png" height="32" /></a>
}
else
{
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Report abuse to administrators"><img src="/img/abuse.png" height="32" /></a>
}
</td>
<td>
<a href="/Wiki/CodeOfConduct" nicetitle="Code of Conduct"><b><img src="/img/conduct.png" height="32" /></b></a>
</td>
</tr>
</table>
</div>
<h1 class="username">
@if (Model.Country != "??")
{
Expand All @@ -73,86 +98,76 @@

<div id="usr_info" style="background-image: url('/img/rankbg/@(backgroundImages[Model.Rank]).png')">
<div class="ranks">
<div class="user_buttons">
<table>
<tr>
<td>
@if (Model.AccountID != Global.AccountID)
{
<a href="@Html.PrintSpringLink("chat/user/" + Model.Name)" nicetitle="Chat with @Model.Name in the lobby"><img src="/img/chat.png" height="32" /></a><br />
}
</td>
</tr>
<tr>
<td>
@if (Model.AccountID == Global.AccountID)
{
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Contact administrators"><img src="/img/help.png" height="32" /></a>
}
else
{
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Report abuse to administrators"><img src="/img/abuse.png" height="32" /></a>
}
</td>
</tr>
<tr>
<td>
<a href="/Wiki/CodeOfConduct" nicetitle="Code of Conduct"><b><img src="/img/conduct.png" height="32" /></b></a>
</td>
</tr>
</table>

<div id="badges">
@Html.PrintBadges(Model, 64, false)
</div>


<div id="avatar">
@Html.AccountAvatar(Model)<br />
@if (Model.Faction != null) { Html.PrintFaction(Model.Faction, true); }<br />
@if (Model.Clan != null) { Html.PrintClan(Model.Clan, true, true); }<br />
<div id="avatarwrap">
<div id="avatar">
<table>
<tr>
<td>
<div class="avatarbg">
@Html.AccountAvatar(Model)
</div>
</td>
</tr>
<tr>
<td>
<div class="avatarbg">
@Html.AccountAvatar(Model)
@if (Model.Clan != null) { Html.PrintClan(Model.Clan, true, true); }
else if (Model.Faction != null) { Html.PrintFaction(Model.Faction, true); }
</div>
</td>
</tr>
</table>
</div>
</div>

@if (!Global.IsLobbyAccess)
@if (!Global.IsLobbyAccess)
{
int star = 0;
int chev = 0;
int bars = 0;
<div id="badge">
<div id="badges">
@Html.PrintBadges(Model, 64, false)
</div>
<div id="levelrank" title="This is a graphical representation of your level. Play more games to gain more rank!">
<div id="velvet"><img src="../../img/ranks/level-elo/velvetbacking.jpg" width="100%" height="100%" /></div>
<div id="badge-center">
@if (Model.Level > 125)
{
star = 125;
<div id="badge-star">
<img src="../../img/ranks/level-elo/star.png" class="rank star" />
</div>
}
<div id="badge-chevrons">
@for (int i = 0; i < (Model.Level - star) / 25; i++)
<div id="badge">
<div id="levelrank" title="This is a graphical representation of your level. Play more games to gain more rank!">
<div id="velvet"><img src="../../img/ranks/level-elo/velvetbacking.jpg" width="100%" height="100%" /></div>
<div id="badge-center">
@if (Model.Level > 125)
{
<img src="../../img/ranks/level-elo/chevron_gold.png" class="rank chev chev-@(i + 1)" />
chev += 25;
star = 125;
<div id="badge-star">
<img src="../../img/ranks/level-elo/star.png" class="rank star" />
</div>
}
</div>
<div id="badge-bars">
@for (int i = 0; i < (Model.Level - star - chev) / 5; i++)
{
<img src="../../img/ranks/level-elo/bar_gold.png" class="rank bar bar-@(i + 1)" />
bars += 1;
}
<div class="rank dotline bar-@(bars + 1)">
@for (int i = 0; i < (Model.Level - star - chev) % 5; i++)
<div id="badge-chevrons">
@for (int i = 0; i < (Model.Level - star) / 25; i++)
{
<img src="../../img/ranks/level-elo/dot_gold.png" class="dot" />
<img src="../../img/ranks/level-elo/chevron_gold.png" class="rank chev chev-@(i + 1)" />
chev += 25;
}
</div>
<div id="badge-bars">
@for (int i = 0; i < (Model.Level - star - chev) / 5; i++)
{
<img src="../../img/ranks/level-elo/bar_gold.png" class="rank bar bar-@(i + 1)" />
bars += 1;
}
<div class="rank dotline bar-@(bars + 1)">
@for (int i = 0; i < (Model.Level - star - chev) % 5; i++)
{
<img src="../../img/ranks/level-elo/dot_gold.png" class="dot" />
}
</div>
</div>
</div>
</div>
</div>
</div>
}
</div>
}
</div>
<br />
@foreach (Punishment p in Model.PunishmentsByAccountID.Where(x => x.BanExpires > DateTime.UtcNow))
{
Expand Down
Binary file added Zero-K.info/img/avatarbg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Zero-K.info/img/progressl_base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Zero-K.info/img/progressl_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Zero-K.info/img/progressr_base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Zero-K.info/img/progressr_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 62e31ec

Please sign in to comment.