Skip to content

Commit 62e31ec

Browse files
committed
new design
1 parent fb9a08c commit 62e31ec

7 files changed

Lines changed: 111 additions & 76 deletions

File tree

Zero-K.info/Styles/userpage.css

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.username{
22
text-align: center;
33
letter-spacing: 0.3px;
4+
margin-left: 150px;
5+
margin-right: 150px;
46
}
57

68
.progress_filler{
@@ -68,19 +70,35 @@
6870
.user_buttons{
6971
float: right;
7072
text-align: center;
71-
width: 64px;
7273
bottom: 0px;
73-
margin-top: 11px;
74+
margin-top: 0px;
7475
}
76+
77+
.user_buttons table{
78+
}
79+
.user_buttons tr td{
80+
padding: 4px;
81+
}
82+
7583
#avatar{
76-
margin-top: 15px;
77-
float:left;
78-
padding-left: 15px;
84+
margin-left: auto;
85+
margin-right: auto;
86+
margin-top: 5px;
87+
background-image: url("/img/ranks/level-elo/velvetbacking.jpg");
88+
background-size: 100% 100%;
89+
width: 94px;
90+
height: 180px;
7991
}
80-
.user_buttons table{
92+
.avatarbg{
93+
background-image: url("/img/avatarbg.png");
94+
display: inline-block;
95+
}
96+
#avatar table {
8197
width: 100%;
98+
padding-top: 10px;
8299
}
83-
.user_buttons tr td{
100+
#avatar table tr td{
101+
text-align: center;
84102
padding: 4px;
85103
}
86104
#usr_info{
@@ -94,19 +112,21 @@
94112
}
95113
#badges{
96114
height: 26px;
97-
width: 300px;
115+
width: 400px;
98116
margin-left: auto;
99117
margin-right: auto;
100118
text-align: center;
101119
}
102120
#levelrank{
103-
padding-top: 4px;
121+
padding-top: 0px;
104122
margin-left: auto;
105123
margin-right: auto;
106124
}
107125
.ranks{
108126
height: 200px;
109127
}
110-
#velvet{
111-
display:none;
128+
#badge,
129+
#avatarwrap{
130+
width: 49%;
131+
display: inline-block;
112132
}

Zero-K.info/Views/Shared/UserDetail.cshtml

Lines changed: 80 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

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

26-
int badge_width = 60;
26+
int badge_width = 69;
2727
int padding = 10;
2828
<style>
2929
#levelrank {
@@ -63,6 +63,31 @@
6363
}
6464
@if (!Model.IsDeleted || Global.IsModerator)
6565
{
66+
<div class="user_buttons">
67+
<table>
68+
<tr>
69+
<td>
70+
@if (Model.AccountID != Global.AccountID)
71+
{
72+
<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 />
73+
}
74+
</td>
75+
<td>
76+
@if (Model.AccountID == Global.AccountID)
77+
{
78+
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Contact administrators"><img src="/img/help.png" height="32" /></a>
79+
}
80+
else
81+
{
82+
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Report abuse to administrators"><img src="/img/abuse.png" height="32" /></a>
83+
}
84+
</td>
85+
<td>
86+
<a href="/Wiki/CodeOfConduct" nicetitle="Code of Conduct"><b><img src="/img/conduct.png" height="32" /></b></a>
87+
</td>
88+
</tr>
89+
</table>
90+
</div>
6691
<h1 class="username">
6792
@if (Model.Country != "??")
6893
{
@@ -73,86 +98,76 @@
7398

7499
<div id="usr_info" style="background-image: url('/img/rankbg/@(backgroundImages[Model.Rank]).png')">
75100
<div class="ranks">
76-
<div class="user_buttons">
77-
<table>
78-
<tr>
79-
<td>
80-
@if (Model.AccountID != Global.AccountID)
81-
{
82-
<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 />
83-
}
84-
</td>
85-
</tr>
86-
<tr>
87-
<td>
88-
@if (Model.AccountID == Global.AccountID)
89-
{
90-
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Contact administrators"><img src="/img/help.png" height="32" /></a>
91-
}
92-
else
93-
{
94-
<a href="@Url.Action("ReportToAdmin", "Users", new { id = Model.AccountID })" nicetitle="Report abuse to administrators"><img src="/img/abuse.png" height="32" /></a>
95-
}
96-
</td>
97-
</tr>
98-
<tr>
99-
<td>
100-
<a href="/Wiki/CodeOfConduct" nicetitle="Code of Conduct"><b><img src="/img/conduct.png" height="32" /></b></a>
101-
</td>
102-
</tr>
103-
</table>
101+
102+
<div id="badges">
103+
@Html.PrintBadges(Model, 64, false)
104104
</div>
105+
105106

106-
<div id="avatar">
107-
@Html.AccountAvatar(Model)<br />
108-
@if (Model.Faction != null) { Html.PrintFaction(Model.Faction, true); }<br />
109-
@if (Model.Clan != null) { Html.PrintClan(Model.Clan, true, true); }<br />
107+
<div id="avatarwrap">
108+
<div id="avatar">
109+
<table>
110+
<tr>
111+
<td>
112+
<div class="avatarbg">
113+
@Html.AccountAvatar(Model)
114+
</div>
115+
</td>
116+
</tr>
117+
<tr>
118+
<td>
119+
<div class="avatarbg">
120+
@Html.AccountAvatar(Model)
121+
@if (Model.Clan != null) { Html.PrintClan(Model.Clan, true, true); }
122+
else if (Model.Faction != null) { Html.PrintFaction(Model.Faction, true); }
123+
</div>
124+
</td>
125+
</tr>
126+
</table>
127+
</div>
110128
</div>
111129

112-
@if (!Global.IsLobbyAccess)
130+
@if (!Global.IsLobbyAccess)
113131
{
114132
int star = 0;
115133
int chev = 0;
116134
int bars = 0;
117-
<div id="badge">
118-
<div id="badges">
119-
@Html.PrintBadges(Model, 64, false)
120-
</div>
121-
<div id="levelrank" title="This is a graphical representation of your level. Play more games to gain more rank!">
122-
<div id="velvet"><img src="../../img/ranks/level-elo/velvetbacking.jpg" width="100%" height="100%" /></div>
123-
<div id="badge-center">
124-
@if (Model.Level > 125)
125-
{
126-
star = 125;
127-
<div id="badge-star">
128-
<img src="../../img/ranks/level-elo/star.png" class="rank star" />
129-
</div>
130-
}
131-
<div id="badge-chevrons">
132-
@for (int i = 0; i < (Model.Level - star) / 25; i++)
135+
<div id="badge">
136+
<div id="levelrank" title="This is a graphical representation of your level. Play more games to gain more rank!">
137+
<div id="velvet"><img src="../../img/ranks/level-elo/velvetbacking.jpg" width="100%" height="100%" /></div>
138+
<div id="badge-center">
139+
@if (Model.Level > 125)
133140
{
134-
<img src="../../img/ranks/level-elo/chevron_gold.png" class="rank chev chev-@(i + 1)" />
135-
chev += 25;
141+
star = 125;
142+
<div id="badge-star">
143+
<img src="../../img/ranks/level-elo/star.png" class="rank star" />
144+
</div>
136145
}
137-
</div>
138-
<div id="badge-bars">
139-
@for (int i = 0; i < (Model.Level - star - chev) / 5; i++)
140-
{
141-
<img src="../../img/ranks/level-elo/bar_gold.png" class="rank bar bar-@(i + 1)" />
142-
bars += 1;
143-
}
144-
<div class="rank dotline bar-@(bars + 1)">
145-
@for (int i = 0; i < (Model.Level - star - chev) % 5; i++)
146+
<div id="badge-chevrons">
147+
@for (int i = 0; i < (Model.Level - star) / 25; i++)
146148
{
147-
<img src="../../img/ranks/level-elo/dot_gold.png" class="dot" />
149+
<img src="../../img/ranks/level-elo/chevron_gold.png" class="rank chev chev-@(i + 1)" />
150+
chev += 25;
148151
}
149152
</div>
153+
<div id="badge-bars">
154+
@for (int i = 0; i < (Model.Level - star - chev) / 5; i++)
155+
{
156+
<img src="../../img/ranks/level-elo/bar_gold.png" class="rank bar bar-@(i + 1)" />
157+
bars += 1;
158+
}
159+
<div class="rank dotline bar-@(bars + 1)">
160+
@for (int i = 0; i < (Model.Level - star - chev) % 5; i++)
161+
{
162+
<img src="../../img/ranks/level-elo/dot_gold.png" class="dot" />
163+
}
164+
</div>
165+
</div>
150166
</div>
151167
</div>
152168
</div>
153-
</div>
154-
}
155-
</div>
169+
}
170+
</div>
156171
<br />
157172
@foreach (Punishment p in Model.PunishmentsByAccountID.Where(x => x.BanExpires > DateTime.UtcNow))
158173
{

Zero-K.info/img/avatarbg.png

3.04 KB
Loading

Zero-K.info/img/progressl_base.png

-13.5 KB
Loading

Zero-K.info/img/progressl_fill.png

-5.7 KB
Loading

Zero-K.info/img/progressr_base.png

-13.9 KB
Loading

Zero-K.info/img/progressr_fill.png

-3.25 KB
Loading

0 commit comments

Comments
 (0)