From ae70e812b056ca4cccdec8d1e9864f11006e5c75 Mon Sep 17 00:00:00 2001 From: Beau Findlay Date: Wed, 6 Mar 2024 23:06:51 +0000 Subject: [PATCH 1/2] Add home copy --- .../Components/Typewriter/Typewriter.razor | 10 ++- BeauFindlay/BeauFindlay/Pages/Home.razor | 48 +++++++++++--- .../BeauFindlay/wwwroot/css/app.min.css | 63 ++++++++++--------- 3 files changed, 85 insertions(+), 36 deletions(-) diff --git a/BeauFindlay/BeauFindlay/Components/Typewriter/Typewriter.razor b/BeauFindlay/BeauFindlay/Components/Typewriter/Typewriter.razor index 38ffb4f..6ee47ac 100644 --- a/BeauFindlay/BeauFindlay/Components/Typewriter/Typewriter.razor +++ b/BeauFindlay/BeauFindlay/Components/Typewriter/Typewriter.razor @@ -10,7 +10,7 @@ else } @code { - private const int typingDelayMilliseconds = 100; + private const int typingDelayMilliseconds = 80; private const int lineEndDelayMilliseconds = 1000; private static List instances = []; @@ -22,6 +22,8 @@ else [Parameter] public string Text { get; set; } = ""; + + public static event Action? OnAllTypingCompleted; protected override void OnInitialized() { @@ -73,6 +75,12 @@ else delayTimer.Dispose(); UpdateCursorVisibility(); StartNextInstanceTyping(); + + if (!instances.Any()) + { + OnAllTypingCompleted?.Invoke(); + } + InvokeAsync(StateHasChanged); }; diff --git a/BeauFindlay/BeauFindlay/Pages/Home.razor b/BeauFindlay/BeauFindlay/Pages/Home.razor index 451dabf..58d0f88 100644 --- a/BeauFindlay/BeauFindlay/Pages/Home.razor +++ b/BeauFindlay/BeauFindlay/Pages/Home.razor @@ -1,12 +1,46 @@ @page "/" +@implements IDisposable + Home - Beau Findlay
-

- -

-

- -

-
\ No newline at end of file +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ + +@code { + + protected override void OnInitialized() + { + Typewriter.OnAllTypingCompleted += HandleTypingCompleted; + } + + private static void HandleTypingCompleted() + { + Console.WriteLine("Typewriter finished typing."); + } + + public void Dispose() + { + Typewriter.OnAllTypingCompleted -= HandleTypingCompleted; + } + +} \ No newline at end of file diff --git a/BeauFindlay/BeauFindlay/wwwroot/css/app.min.css b/BeauFindlay/BeauFindlay/wwwroot/css/app.min.css index 6ae6288..8db0cbb 100644 --- a/BeauFindlay/BeauFindlay/wwwroot/css/app.min.css +++ b/BeauFindlay/BeauFindlay/wwwroot/css/app.min.css @@ -548,22 +548,22 @@ video { position: static; } +.mt-10 { + margin-top: 2.5rem; +} + .mt-4 { margin-top: 1rem; } -.mt-3 { - margin-top: 0.75rem; +.mt-8 { + margin-top: 2rem; } .flex { display: flex; } -.h-full { - height: 100%; -} - .min-h-screen { min-height: 100vh; } @@ -581,36 +581,17 @@ video { background-color: rgb(0 0 0 / var(--tw-bg-opacity)); } -.p-4 { - padding: 1rem; -} - .p-8 { 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-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; } .text-3xl { @@ -618,11 +599,37 @@ video { 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 { --tw-text-opacity: 1; 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 { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; From c9f74dda0672f30faeafc4e2d32b9bb2e6ea686a Mon Sep 17 00:00:00 2001 From: Beau Findlay Date: Wed, 6 Mar 2024 23:14:02 +0000 Subject: [PATCH 2/2] Update copy --- BeauFindlay/BeauFindlay/Pages/Home.razor | 4 ++-- BeauFindlay/BeauFindlay/wwwroot/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BeauFindlay/BeauFindlay/Pages/Home.razor b/BeauFindlay/BeauFindlay/Pages/Home.razor index 58d0f88..71f4631 100644 --- a/BeauFindlay/BeauFindlay/Pages/Home.razor +++ b/BeauFindlay/BeauFindlay/Pages/Home.razor @@ -18,11 +18,11 @@

- +

- +

diff --git a/BeauFindlay/BeauFindlay/wwwroot/index.html b/BeauFindlay/BeauFindlay/wwwroot/index.html index 54f4f1f..9360eef 100644 --- a/BeauFindlay/BeauFindlay/wwwroot/index.html +++ b/BeauFindlay/BeauFindlay/wwwroot/index.html @@ -13,7 +13,7 @@
-
+

Loading beaufindlay.com|