126 lines
3.3 KiB
Plaintext
126 lines
3.3 KiB
Plaintext
@using WebAssembly.Components.Inputs
|
|
@implements IDisposable;
|
|
@inject IMyDialogService MyDialogService
|
|
|
|
@if (MyDialogService.IsVisible && MyDialogService.GetDialogContents().TechStack != null)
|
|
{
|
|
var techStack = MyDialogService.GetDialogContents().TechStack;
|
|
|
|
<div class="techStackDialogBackground" onclick="@CloseDialog">
|
|
<div class="techStackDialogContainer"
|
|
@onclick:preventDefault="true"
|
|
@onclick:stopPropagation="true">
|
|
|
|
<div class="techStackDialogHeader">
|
|
@techStack.Name
|
|
</div>
|
|
<div class="techStackDialogBody">
|
|
<div class="description">
|
|
@techStack.Description
|
|
</div>
|
|
<hr/>
|
|
<div class="extendedNotes">
|
|
@((MarkupString)(techStack.ExtendedNotes?.Replace("\n", "<br />") ?? ""))
|
|
</div>
|
|
</div>
|
|
|
|
<div class="techStackDialogFooter">
|
|
<ButtonComponent MyButtonType="MyButtonType.Primary"
|
|
OnClick="CloseDialog">
|
|
Close
|
|
</ButtonComponent>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.pageContents * {
|
|
filter: blur(2px);
|
|
}
|
|
|
|
.techStackDialogBackground {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.techStackDialogContainer {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
margin-top: 64px;
|
|
width: 800px;
|
|
max-height: 80vh;
|
|
background-color: var(--paper);
|
|
border-width: var(--dialog-border-width);
|
|
border-style: solid;
|
|
border-color: var(--dialog-border-color);
|
|
border-radius: var(--dialog-radius);
|
|
padding: 16px;
|
|
box-shadow: 1px 2px 2px black;
|
|
display: flex;
|
|
flex-direction: column;
|
|
color: white;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.techStackDialogHeader {
|
|
font-size: 1.8em;
|
|
font-weight: bold;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid var(--paper-border);
|
|
}
|
|
|
|
.techStackDialogBody {
|
|
padding: 16px 0;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.description {
|
|
font-style: italic;
|
|
margin-bottom: 16px;
|
|
color: #ccc;
|
|
}
|
|
|
|
.extendedNotes {
|
|
white-space: pre-wrap;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.techStackDialogFooter {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--paper-border);
|
|
}
|
|
|
|
</style>
|
|
}
|
|
|
|
|
|
@code {
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
MyDialogService.Subscribe(StateHasChanged);
|
|
|
|
Console.WriteLine("TechStackDialogComponent initialized");
|
|
}
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
MyDialogService.Unsubscribe(StateHasChanged);
|
|
}
|
|
|
|
public void CloseDialog()
|
|
{
|
|
Console.WriteLine( "Closing dialog");
|
|
MyDialogService.Hide();
|
|
}
|
|
}
|