Merge pull request #3 from bdfin/add-home-page-copy

Add home copy
This commit is contained in:
2024-03-06 23:17:36 +00:00
committed by GitHub
4 changed files with 86 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ else
} }
@code { @code {
private const int typingDelayMilliseconds = 100; private const int typingDelayMilliseconds = 80;
private const int lineEndDelayMilliseconds = 1000; private const int lineEndDelayMilliseconds = 1000;
private static List<Typewriter> instances = []; private static List<Typewriter> instances = [];
@@ -23,6 +23,8 @@ else
[Parameter] [Parameter]
public string Text { get; set; } = ""; public string Text { get; set; } = "";
public static event Action? OnAllTypingCompleted;
protected override void OnInitialized() protected override void OnInitialized()
{ {
Text = Text.Trim(); Text = Text.Trim();
@@ -73,6 +75,12 @@ else
delayTimer.Dispose(); delayTimer.Dispose();
UpdateCursorVisibility(); UpdateCursorVisibility();
StartNextInstanceTyping(); StartNextInstanceTyping();
if (!instances.Any())
{
OnAllTypingCompleted?.Invoke();
}
InvokeAsync(StateHasChanged); InvokeAsync(StateHasChanged);
}; };

View File

@@ -1,12 +1,46 @@
@page "/" @page "/"
@implements IDisposable
<PageTitle>Home - Beau Findlay</PageTitle> <PageTitle>Home - Beau Findlay</PageTitle>
<div> <div>
<h1 class="text-3xl"> <h1 class="text-3xl">
<Typewriter Text="Hi! I'm Beau."/> <Typewriter Text="Hi! I'm Beau."/>
</h1> </h1>
<p class="text-lg mt-3">
<Typewriter Text="Welcome to my portfolio site." /> <p class="text-xl mt-8">
</p> <Typewriter Text="I'm a software engineer and I love building cool stuff."/>
</p>
<h2 class="text-2xl mt-10 underline underline-offset-4">
<Typewriter Text="A bit about me"/>
</h2>
<p class="text-xl mt-4">
<Typewriter Text="I mostly specialise in back-end .NET development and I build and maintain systems that scale for hundreds-of-thousands of global users."/>
</p>
<p class="text-xl mt-4">
<Typewriter Text="I'm currently heading up the tech as CTO at a cool startup called un:hurd."/>
</p>
</div> </div>
@code {
protected override void OnInitialized()
{
Typewriter.OnAllTypingCompleted += HandleTypingCompleted;
}
private static void HandleTypingCompleted()
{
Console.WriteLine("Typewriter finished typing.");
}
public void Dispose()
{
Typewriter.OnAllTypingCompleted -= HandleTypingCompleted;
}
}

View File

@@ -548,22 +548,22 @@ video {
position: static; position: static;
} }
.mt-10 {
margin-top: 2.5rem;
}
.mt-4 { .mt-4 {
margin-top: 1rem; margin-top: 1rem;
} }
.mt-3 { .mt-8 {
margin-top: 0.75rem; margin-top: 2rem;
} }
.flex { .flex {
display: flex; display: flex;
} }
.h-full {
height: 100%;
}
.min-h-screen { .min-h-screen {
min-height: 100vh; min-height: 100vh;
} }
@@ -581,36 +581,17 @@ video {
background-color: rgb(0 0 0 / var(--tw-bg-opacity)); background-color: rgb(0 0 0 / var(--tw-bg-opacity));
} }
.p-4 {
padding: 1rem;
}
.p-8 { .p-8 {
padding: 2rem; padding: 2rem;
} }
.py-4 {
padding-top: 1rem;
padding-bottom: 1rem;
}
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
}
.px-4 {
padding-left: 1rem;
padding-right: 1rem;
}
.font-mono { .font-mono {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
} }
.text-lg { .text-2xl {
font-size: 1.125rem; font-size: 1.5rem;
line-height: 1.75rem; line-height: 2rem;
} }
.text-3xl { .text-3xl {
@@ -618,11 +599,37 @@ video {
line-height: 2.25rem; line-height: 2.25rem;
} }
.text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.font-semibold {
font-weight: 600;
}
.text-slate-50 { .text-slate-50 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(248 250 252 / var(--tw-text-opacity)); color: rgb(248 250 252 / var(--tw-text-opacity));
} }
.underline {
text-decoration-line: underline;
}
.underline-offset-2 {
text-underline-offset: 2px;
}
.underline-offset-4 {
text-underline-offset: 4px;
}
.subpixel-antialiased { .subpixel-antialiased {
-webkit-font-smoothing: auto; -webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto; -moz-osx-font-smoothing: auto;

View File

@@ -13,7 +13,7 @@
<body class="bg-black font-mono text-slate-50 min-h-screen subpixel-antialiased"> <body class="bg-black font-mono text-slate-50 min-h-screen subpixel-antialiased">
<div id="app" class="p-8"> <div id="app" class="p-8">
<div class="flex items-center justify-center text-lg"> <div class="flex items-center justify-center text-xl">
<p>Loading beaufindlay.com<span class="blinking-cursor">|</span></p> <p>Loading beaufindlay.com<span class="blinking-cursor">|</span></p>
</div> </div>
</div> </div>