Skip to content

Commit

Permalink
longer cursor blink and remove cursor at end command
Browse files Browse the repository at this point in the history
  • Loading branch information
erinnmclaughlin committed Nov 24, 2023
1 parent d9d619b commit 80ecdf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions PersonalWebsite/Components/TerminalCommand.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<p>
<span style="line-break: anywhere">> @TypedCommand</span>
@if (ShowCursor)
{
<TerminalCursor />
}
</p>

@code {
Expand All @@ -12,7 +8,6 @@
[Parameter] public EventCallback OnAnimationComplete { get; set; }

private string TypedCommand { get; set; } = "";
private bool ShowCursor { get; set; }

protected override async Task OnInitializedAsync()
{
Expand All @@ -32,11 +27,7 @@
await Task.Delay(50);
}

ShowCursor = true;
StateHasChanged();

await Task.Delay(200);
ShowCursor = false;
await OnAnimationComplete.InvokeAsync();
}
}
6 changes: 3 additions & 3 deletions PersonalWebsite/Components/TerminalCursor.razor.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.terminal-cursor {
opacity: 1;
-webkit-animation: blink 0.7s infinite;
-moz-animation: blink 0.7s infinite;
animation: blink 0.7s infinite;
-webkit-animation: blink 0.8s infinite;
-moz-animation: blink 0.8s infinite;
animation: blink 0.8s infinite;
}

@keyframes blink {
Expand Down

0 comments on commit 80ecdf3

Please sign in to comment.