Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from LeaPhant/master
Browse files Browse the repository at this point in the history
Update (29/2/20 17:50)
  • Loading branch information
MartinNemi03 authored Feb 29, 2020
2 parents fa89900 + 7d6be14 commit 4519b84
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/resources.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/resources/css/index.css?v26">
<link rel="stylesheet" href="/resources/css/index.css?v27">
<link rel="stylesheet" href="/resources/css/inventory.css?v10">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:site_name" content="SkyBlock Stats">
Expand Down
14 changes: 14 additions & 0 deletions public/resources/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,10 @@ html.no-clip-path #other_players, html.no-clip-path #other_profiles{
font-weight: 500;
}

.stat-pets .piece:not(.active-pet){
margin-bottom: 25px;
}

.active-pet-info div{
margin: 4px;
}
Expand All @@ -1047,6 +1051,16 @@ html.no-clip-path #other_players, html.no-clip-path #other_profiles{
font-weight: 700;
}

.other-pet-level{
position: absolute;
top: calc(100% + 10px);
width: 100%;
text-align: center;
font-weight: 600;
text-transform: uppercase;
font-size: 15px;
}

#inventory_container{
display: inline-block;
background-color: rgba(0,0,0,0.3);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,11 +1058,11 @@ module.exports = {

let lore = [
`§8${helper.capitalizeFirstLetter(petData.type)} Pet`,
''
];

if(pet.level.level < 100){
lore.push(
'',
`§7Progress to Level ${pet.level.level + 1}: §e${(pet.level.progress * 100).toFixed(1)}%`
);

Expand All @@ -1076,7 +1076,7 @@ module.exports = {
levelBar += '-';
}

levelBar += ` §e${pet.level.xpCurrent.toLocaleString()}§6/§e${helper.formatNumber(pet.level.xpForNext, true, 1)}`;
levelBar += ` §e${pet.level.xpCurrent.toLocaleString()}§6/§e${helper.formatNumber(pet.level.xpForNext, false, 10)}`;

lore.push(levelBar);
}
Expand Down
5 changes: 4 additions & 1 deletion views/stats.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,15 @@ if(calculated.bank)
<p></p>
<div class="pieces">
<% } %>
<div data-pet-index="<%= index %>" class="rich-item piece piece-<%= pet.rarity %>-bg">
<div data-pet-index="<%= index %>" class="<%= pet.active ? 'active-pet' : '' %> rich-item piece piece-<%= pet.rarity %>-bg">
<% if(pet.rarity == 'legendary'){ %>
<div class="piece-shine"></div>
<% } %>
<div class="piece-hover-area"></div>
<div style='background-image: url("<%= pet.texture_path %>")' class="piece-icon item-icon custom-icon"></div>
<% if(index > 0 || index == 0 && !pet.active){ %>
<div class="other-pet-level">Lvl <%= pet.level.level %></div>
<% } %>
</div>
<% if(index == 0 && pet.active) { %>
<div class="active-pet-info">
Expand Down

0 comments on commit 4519b84

Please sign in to comment.