Fix home page component
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<image href="@ImagePath" height="100%" width="100%" clip-path="url(#theClippingPath)"></image>
|
||||
<path d="@PathLineData" stroke="@LineColor" stroke-width="@LineWidth" fill="none" />
|
||||
<g transform="translate(0,@(ObjH/4))">
|
||||
<foreignObject width="@(ObjW/2)" height="@(ObjH/3)">
|
||||
<foreignObject width="@(ObjW/2)" height="@(ObjH/2)">
|
||||
<div class="row text-white text-center">
|
||||
<div style="@TitleStyle" class="text-uppercase">
|
||||
@TitleText
|
||||
@@ -17,7 +17,7 @@
|
||||
@BodyText
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<button class="btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase">
|
||||
<button class="btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase" @onclick="() => raiseEvent()">
|
||||
@ButtonText
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
public int StartPoint { get; set; } = 220;
|
||||
|
||||
[Parameter]
|
||||
public string TitleStyle { get; set; } = "font-size: 5em;";
|
||||
public string TitleStyle { get; set; } = "font-size: 5.5em;";
|
||||
|
||||
[Parameter]
|
||||
public string TitleText { get; set; } = "Title Text";
|
||||
@@ -78,7 +78,7 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
string path = "";
|
||||
if (pathPointList.Count > 0)
|
||||
{
|
||||
path = $"M{pathPointList[0].px},{pathPointList[0].py} Q";
|
||||
path = $"M{pathPointList[0].px},{pathPointList[0].py} Q";
|
||||
for (int i = 1; i < pathPointList.Count; i++)
|
||||
{
|
||||
path += $" {pathPointList[i].px},{pathPointList[i].py}";
|
||||
@@ -104,14 +104,20 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
|
||||
protected void setupGraphParams()
|
||||
{
|
||||
pathPointList = new List<PointData>();
|
||||
pathClipCloseList = new List<PointData>();
|
||||
// calcolo i dati necessari a disegnare
|
||||
int deltaX = 20;
|
||||
int deltaY = 400;
|
||||
int deltaX = (ObjW / 2 - StartPoint) / 6;
|
||||
int deltaY = ObjH / 3;
|
||||
// inizio aggiungendo punti parametrici
|
||||
pathPointList.Add(new PointData(StartPoint, ObjH));
|
||||
pathPointList.Add(new PointData(StartPoint - deltaX, ObjH - (deltaY / 2)));
|
||||
pathPointList.Add(new PointData(StartPoint + deltaX, ObjH - deltaY));
|
||||
pathPointList.Add(new PointData((ObjW / 2) - deltaX * 3, (ObjH / 2) + deltaY / 8));
|
||||
pathPointList.Add(new PointData(ObjW / 2, ObjH / 2));
|
||||
pathPointList.Add(new PointData((ObjW / 2) + deltaX * 3, (ObjH / 2) - deltaY / 8));
|
||||
pathPointList.Add(new PointData(ObjW - (StartPoint + deltaX), deltaY));
|
||||
pathPointList.Add(new PointData(ObjW - (StartPoint - deltaX), (deltaY / 2)));
|
||||
pathPointList.Add(new PointData(ObjW - StartPoint, 0));
|
||||
// ora provvedo x la parte clip
|
||||
pathClipCloseList.Add(new PointData(ObjW - StartPoint, 0));
|
||||
@@ -148,6 +154,11 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
protected async Task raiseEvent()
|
||||
{
|
||||
await EC_ExeFunct.InvokeAsync(true);
|
||||
}
|
||||
|
||||
#endregion Protected Classes
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,6 @@
|
||||
|
||||
|
||||
<div class="shadow-lg">
|
||||
<HomeCard ObjH="1080" ObjW="1920" StartPoint="750" TitleText="Web Door Creator" BodyText="The new way to create doors" ButtonText="Go To Orders"></HomeCard>
|
||||
<HomeCard ObjH="1080" ObjW="1920" StartPoint="820" LineWidth="18" TitleText="Web Door Creator" BodyText="The new way to create doors" EC_ExeFunct="changePage" ButtonText="Go To Orders"></HomeCard>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.UI;
|
||||
using WebDoorCreator.UI.Components;
|
||||
using WebDoorCreator.UI.Components.Buttons;
|
||||
using WebDoorCreator.UI.Components.CompMan;
|
||||
using WebDoorCreator.UI.Components.DoorMan;
|
||||
using WebDoorCreator.UI.Components.DoorDef;
|
||||
using WebDoorCreator.UI.Components.Gen;
|
||||
using WebDoorCreator.UI.Components.Order;
|
||||
using WebDoorCreator.UI.Components.Users;
|
||||
using WebDoorCreator.UI.Components.Hardware;
|
||||
using WebDoorCreator.UI.Components.SvgComp;
|
||||
using WebDoorCreator.UI.Components.Filters;
|
||||
using WebDoorCreator.UI.Shared;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using EgwCoreLib.Razor;
|
||||
|
||||
namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
public partial class Index
|
||||
{
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
protected async Task changePage(bool newPage)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo("OrdersHomePage");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user