From cb21101266bc34847e77c1879fe47d01d3eb5983 Mon Sep 17 00:00:00 2001 From: Matthijs Kuiper Date: Thu, 11 Jan 2018 20:20:52 +0100 Subject: Rank icons --- html/assets/images/ranks/1.png | Bin 0 -> 2791 bytes html/assets/images/ranks/2.png | Bin 0 -> 3075 bytes html/assets/images/ranks/3.png | Bin 0 -> 3142 bytes html/assets/style.css | 108 +++++++++++++++++------------------------ html/includes/functions.php | 11 ++--- html/pages/match_player.php | 11 +++-- 6 files changed, 56 insertions(+), 74 deletions(-) create mode 100644 html/assets/images/ranks/1.png create mode 100644 html/assets/images/ranks/2.png create mode 100644 html/assets/images/ranks/3.png diff --git a/html/assets/images/ranks/1.png b/html/assets/images/ranks/1.png new file mode 100644 index 0000000..50ea666 Binary files /dev/null and b/html/assets/images/ranks/1.png differ diff --git a/html/assets/images/ranks/2.png b/html/assets/images/ranks/2.png new file mode 100644 index 0000000..32ab0d5 Binary files /dev/null and b/html/assets/images/ranks/2.png differ diff --git a/html/assets/images/ranks/3.png b/html/assets/images/ranks/3.png new file mode 100644 index 0000000..bd7d8e3 Binary files /dev/null and b/html/assets/images/ranks/3.png differ diff --git a/html/assets/style.css b/html/assets/style.css index 2bca6f0..fd700d0 100755 --- a/html/assets/style.css +++ b/html/assets/style.css @@ -241,16 +241,10 @@ th { font-weight: 700; font-size: 10pt; color: #ffffff; - background: -webkit-linear-gradient( - #b40101, - #870202 - ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#b40101, #870202); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #b40101, - #870202 - ); /* For Firefox 3.6 to 15 */ - background: linear-gradient(#b40101, #870202); /* Standard syntax */ + background: -webkit-linear-gradient(#b40101, #870202); + background: -o-linear-gradient(#b40101, #870202); + background: -moz-linear-gradient(#b40101, #870202); + background: linear-gradient(#b40101, #870202); height: 30px; } .blue { @@ -258,16 +252,10 @@ th { font-weight: 700; font-size: 10pt; color: #ffffff; - background: -webkit-linear-gradient( - #2069a1, - #194c74 - ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#2069a1, #194c74); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #2069a1, - #194c74 - ); /* For Firefox 3.6 to 15 */ - background: linear-gradient(#2069a1, #194c74); /* Standard syntax */ + background: -webkit-linear-gradient(#2069a1, #194c74); + background: -o-linear-gradient(#2069a1, #194c74); + background: -moz-linear-gradient(#2069a1, #194c74); + background: linear-gradient(#2069a1, #194c74); height: 30px; } .green { @@ -275,18 +263,10 @@ th { font-weight: 700; font-size: 10pt; color: #ffffff; - background: -webkit-linear-gradient( - #278040, - #216635 - ); /* For Safari 5.1 to 6.0 */ + background: -webkit-linear-gradient(#278040, #216635); background: -o-linear-gradient(#278040, #216635); - /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #278040, - #216635 - ); /* For Firefox 3.6 to 15 */ + background: -moz-linear-gradient(#278040, #216635); background: linear-gradient(#278040, #216635); - /* Standard syntax */ height: 30px; } .yellow { @@ -295,14 +275,9 @@ th { font-size: 10pt; color: #ffffff; background: -webkit-linear-gradient(#efc100, #e0b501); - /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#efc100, #e0b501); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #efc100, - #e0b501 - ); /* For Firefox 3.6 to 15 */ + background: -o-linear-gradient(#efc100, #e0b501); + background: -moz-linear-gradient(#efc100, #e0b501); background: linear-gradient(#efc100, #e0b501); - /* Standard syntax */ height: 30px; } .Gold { @@ -310,16 +285,10 @@ th { font-weight: 700; font-size: 10pt; color: #1e1e1e; - background: -webkit-linear-gradient( - #efc100, - #e0b501 - ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#efc100, #e0b501); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #efc100, - #e0b501 - ); /* For Firefox 3.6 to 15 */ - background: linear-gradient(#efc100, #e0b501); /* Standard syntax */ + background: -webkit-linear-gradient(#efc100, #e0b501); + background: -o-linear-gradient(#efc100, #e0b501); + background: -moz-linear-gradient(#efc100, #e0b501); + background: linear-gradient(#efc100, #e0b501); height: 30px; } .score { @@ -327,14 +296,22 @@ th { font-size: 50px; padding: 20px; } -/** Button from Scott CSS **/ +.rank { + border: 0; + height: 14px; + width: 14px; + margin-bottom: -2px; +} +.player-name { + margin-bottom: 5px; + margin-top: 10px; +} .navCTA { padding: 10px 16px; font-size: 14px; line-height: 5; text-transform: uppercase; color: #fff; - background: rgba(30, 30, 30); background: rgba(32, 105, 161, 0.8); border: 1px #fff solid; -webkit-transition: background-color 0.4s; @@ -692,10 +669,8 @@ a.heading:hover { #4c84b0 ); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#2069a1, #4c84b0); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient( - #2069a1, - #4c84b0 - ); /* For Firefox 3.6 to 15 */ + background: -moz-linear-gradient(#2069a1, #4c84b0); + /* For Firefox 3.6 to 15 */ background: linear-gradient(#2069a1, #4c84b0); /* Standard syntax */ height: 30px; } @@ -1041,12 +1016,12 @@ a.pages:hover { #2069a1, #194c74 ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#2069a1, #194c74); - /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient(#2069a1, #194c74); - /* For Firefox 3.6 to 15 */ - background: linear-gradient(#2069a1, #194c74); - /* Standard syntax */ + background: -o-linear-gradient(#2069a1, #194c74); /* For Opera 11.1 to 12.0 */ + background: -moz-linear-gradient( + #2069a1, + #194c74 + ); /* For Firefox 3.6 to 15 */ + background: linear-gradient(#2069a1, #194c74); /* Standard syntax */ } .redteam, .redteamb, @@ -1057,9 +1032,12 @@ a.pages:hover { #b40101, #870202 ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#b40101, #870202); /* For Opera 11.1 to 12.0 */ - background: -moz-linear-gradient(#b40101, #870202); - /* For Firefox 3.6 to 15 */ + background: -o-linear-gradient(#b40101, #870202); + /* For Opera 11.1 to 12.0 */ + background: -moz-linear-gradient( + #b40101, + #870202 + ); /* For Firefox 3.6 to 15 */ background: linear-gradient(#b40101, #870202); /* Standard syntax */ } .greenteam, @@ -1076,7 +1054,8 @@ a.pages:hover { #278040, #216635 ); /* For Firefox 3.6 to 15 */ - background: linear-gradient(#278040, #216635); /* Standard syntax */ + background: linear-gradient(#278040, #216635); + /* Standard syntax */ } .goldteam, .goldteamb, @@ -1087,7 +1066,8 @@ a.pages:hover { #efc100, #e0b501 ); /* For Safari 5.1 to 6.0 */ - background: -o-linear-gradient(#efc100, #e0b501); /* For Opera 11.1 to 12.0 */ + background: -o-linear-gradient(#efc100, #e0b501); + /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient( #efc100, #e0b501 diff --git a/html/includes/functions.php b/html/includes/functions.php index fb24308..99baeae 100755 --- a/html/includes/functions.php +++ b/html/includes/functions.php @@ -342,18 +342,15 @@ function RankImageOrText($pid, $name, $rank, $gid, $gamename, $mini = true, $for $rank = $r_no['no']; } + $img = ''; $ranktext = $rank.ordinal($rank); if (file_exists("assets/images/ranks/$rank.png")) { - $width = ($mini) ? 15 : 15; - $height = ($mini) ? 12 : 12; - $img = ''. $rank .''; - } else { - $img = ''; + $img = ''. $rank .''; } $moveimg = ''; - if ($rankchange !== NULL) { - $moveimg = ' '. RankMovement($rankchange); + if ($rankchange !== null) { + $moveimg = ' '. RankMovement($rankchange); } if (empty($format)) { diff --git a/html/pages/match_player.php b/html/pages/match_player.php index 55c1892..664bc88 100755 --- a/html/pages/match_player.php +++ b/html/pages/match_player.php @@ -1,4 +1,5 @@ Individual Match Stats for - '.FlagImage($country) .' '. htmlentities($playername) .' - '. RankImageOrText($pid, $playername, NULL, $gid, $gamename, true, '(%IT% in %GN% with %RP% ranking points)') .' -
+ +
+ '.FlagImage($country) .' '. htmlentities($playername) .' +
+
'. + RankImageOrText($pid, $playername, NULL, $gid, $gamename, true, '%IT% in %GN% with %RP% ranking points.') + .'
Player page '; -- cgit