feat: Tree background

This commit is contained in:
Mikhail Shabanov committed 2022-08-06 13:01:32 +02:00
1 parent 5b9e65be9f
commit 10f9dc1557
2 files changed
+17 -4

No files matched your search

@@ -3,11 +3,24 @@
<div style="overflow-y: auto; overflow-x: auto;"> <div style="overflow-y: auto; overflow-x: auto;">
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="1400" width="@((CardWidth + 40) * 10)"
height="@FrameHeigth" height="@FrameHeigth"
style="background-color: darkcyan; "> >
<!-- Background -->
@for (int i = 0; i < 10; i++)
{
<rect
x="@(i * (CardWidth + 40))"
y="0"
width="@(CardWidth + 40)"
height="@FrameHeigth"
fill="@(i % 2 == 0 ? "#464A5D" : "#3A3D4B")"
>
</rect>
}
@for (int i = 0; i < 3; i++) @for (int i = 0; i < 3; i++)
{ {
<!-- Tank card svg-->
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
x="20" x="20"
@@ -24,7 +37,7 @@
rx="10" rx="10"
ry="10" ry="10"
fill="@(i == 0 ? "#275950" : (i == 1 ? "#2E353B" : "#66502b"))" fill="@(i == 0 ? "#275950" : (i == 1 ? "#2E353B" : "#66502b"))"
stroke="#4a8777"> >
</rect> </rect>
<!--Tank type--> <!--Tank type-->
@@ -64,7 +64,7 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
Notifications.ReportError("Can not get data from backend", e.Message); Notifications.ReportError("Can not get data from backend", e.Message);
} }
FrameHeigth = screenHeight - 390; FrameHeigth = screenHeight + 390;
} }
public int GetTextWidth(string text, string fontFace, int fontSize) public int GetTextWidth(string text, string fontFace, int fontSize)