mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 10:38:40 +00:00
Shrink slot icon on mobile
This commit is contained in:
parent
9cb165ce67
commit
e0cc1da084
4 changed files with 21 additions and 3 deletions
|
@ -10,6 +10,7 @@
|
||||||
await using Database database = new();
|
await using Database database = new();
|
||||||
|
|
||||||
string slotName = string.IsNullOrEmpty(Model.Name) ? "Unnamed Level" : Model.Name;
|
string slotName = string.IsNullOrEmpty(Model.Name) ? "Unnamed Level" : Model.Name;
|
||||||
|
bool isMobile = (bool?)ViewData["IsMobile"] ?? false;
|
||||||
|
|
||||||
bool isQueued = false;
|
bool isQueued = false;
|
||||||
bool isHearted = false;
|
bool isHearted = false;
|
||||||
|
@ -28,7 +29,10 @@
|
||||||
if (string.IsNullOrWhiteSpace(iconHash) || iconHash.StartsWith('g')) iconHash = ServerSettings.Instance.MissingIconHash;
|
if (string.IsNullOrWhiteSpace(iconHash) || iconHash.StartsWith('g')) iconHash = ServerSettings.Instance.MissingIconHash;
|
||||||
}
|
}
|
||||||
<div class="slotCard">
|
<div class="slotCard">
|
||||||
<div class="slotCardIcon" style="background-image: url('/gameAssets/@iconHash');">
|
@{
|
||||||
|
int size = isMobile ? 50 : 100;
|
||||||
|
}
|
||||||
|
<div class="slotCardIcon" style="background-image: url('/gameAssets/@iconHash'); min-width: @(size)px; width: @(size)px; height: @(size)px">
|
||||||
</div>
|
</div>
|
||||||
<div class="slotCardStats">
|
<div class="slotCardStats">
|
||||||
@if (showLink)
|
@if (showLink)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
@page "/slot/{id:int}"
|
@page "/slot/{id:int}"
|
||||||
|
@using LBPUnion.ProjectLighthouse.Helpers.Extensions
|
||||||
@model LBPUnion.ProjectLighthouse.Pages.SlotPage
|
@model LBPUnion.ProjectLighthouse.Pages.SlotPage
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
@ -20,6 +21,9 @@
|
||||||
{
|
{
|
||||||
"ShowLink", false
|
"ShowLink", false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"IsMobile", Model.Request.IsMobile()
|
||||||
|
},
|
||||||
})
|
})
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
@page "/slots/{pageNumber:int}"
|
@page "/slots/{pageNumber:int}"
|
||||||
|
@using LBPUnion.ProjectLighthouse.Helpers.Extensions
|
||||||
@using LBPUnion.ProjectLighthouse.Types.Levels
|
@using LBPUnion.ProjectLighthouse.Types.Levels
|
||||||
@model LBPUnion.ProjectLighthouse.Pages.SlotsPage
|
@model LBPUnion.ProjectLighthouse.Pages.SlotsPage
|
||||||
|
|
||||||
|
@ -23,6 +24,9 @@
|
||||||
{
|
{
|
||||||
"ShowLink", true
|
"ShowLink", true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"IsMobile", Model.Request.IsMobile()
|
||||||
|
},
|
||||||
})
|
})
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,6 @@ div.statsUnderTitle > span {
|
||||||
|
|
||||||
.slotCardIcon {
|
.slotCardIcon {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
height: 100px;
|
|
||||||
width: 100px;
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
@ -53,7 +51,15 @@ div.statsUnderTitle > span {
|
||||||
|
|
||||||
.slotCardButtons {
|
.slotCardButtons {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.slotCardButtons > a {
|
||||||
|
margin-bottom: 5px !important;
|
||||||
|
vertical-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
/*#endregion Slot cards*/
|
/*#endregion Slot cards*/
|
Loading…
Add table
Add a link
Reference in a new issue