Skip to content

Commit 3861c8c

Browse files
committed
Add blog to terminal
1 parent 8609a91 commit 3861c8c

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ fn HomePage() -> impl IntoView {
6565
<div class="md:w-1/2 w-5/6 flex flex-col justify-center items-center">
6666
<NameHeader/>
6767
<Links/>
68-
<div class="w-44 mb-6">
68+
<div class="w-44 mb-4">
6969
<a href="https://ko-fi.com/safstromo" target="_blank">
7070
<img src="kofi_button_blue.png"/>
7171
</a>
7272
</div>
7373

74-
<nav class="mt-4 text-white text-2xl font-semibold hover:border-peach hover:text-maroon border-base border-2 rounded-lg">
75-
<a class="mx-1 text-white" href="/blog">
74+
<nav class="my-4 text-white text-2xl font-semibold hover:border-peach border-base border-2 rounded-lg">
75+
<a class="mx-1 text-white hover:text-maroon" href="/blog">
7676
Blog
7777
</a>
7878
</nav>

src/components/terminal.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn TerminalInput(
4747
let help_command = Command {
4848
command: value.clone(),
4949
component: HtmlTag::P,
50-
value: "Available commands: help, pwd, git, vim, email, sudo, linkedin, clear"
50+
value: "Available commands: help, pwd, git, vim, email, blog, sudo, linkedin, clear"
5151
.to_string(),
5252
name: "help".to_string(),
5353
};
@@ -117,7 +117,16 @@ pub fn TerminalInput(
117117
};
118118
set_command_history.update(|commands| commands.push(vim_command));
119119
}
120-
120+
"blog" => {
121+
open_link("https://rabbitnook.com/blog".to_string());
122+
let blog_command = Command {
123+
command: value.clone(),
124+
component: HtmlTag::A,
125+
value: "https://rabbitnook.com/blog".to_string(),
126+
name: "blog".to_string(),
127+
};
128+
set_command_history.update(|commands| commands.push(blog_command));
129+
}
121130
_ => {
122131
let invalid_command = Command {
123132
command: value.clone(),

0 commit comments

Comments
 (0)