-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set max prompt limit and refactoring
- Loading branch information
1 parent
c5c7166
commit c0098f4
Showing
9 changed files
with
110 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
use leptos::{component, view, IntoView}; | ||
|
||
pub const HELP: &str = r#"<span class="grn semibold"> ________________ __ _____________ __ ________ | ||
/_ __/ ____/ __ \/ |/ / ____/ __ \/ / / _/ __ \ | ||
/ / / __/ / /_/ / /|_/ / /_ / / / / / / // / / / | ||
/ / / /___/ _, _/ / / / __/ / /_/ / /____/ // /_/ / | ||
/_/ /_____/_/ |_/_/ /_/_/ \____/_____/___/\____/ | ||
</span> | ||
Hello, welcome to <u class="blu semibold">Termfolio</u>. Type one of these commands - | ||
<span class="rd semibold">about</span> - View about me | ||
<span class="rd semibold">github</span> - View about Github profile | ||
<span class="rd semibold">repos</span> - View about my pinned repos / projects | ||
<span class="rd semibold">links</span> - View contact info and links | ||
<span class="rd semibold">help</span> - View this help section | ||
<span class="rd semibold">theme</span> - Cycle through themes | ||
<span class="rd semibold">credits</span> - View credits and repo"#; | ||
|
||
#[component] | ||
pub fn Banner() -> impl IntoView { | ||
let banner = termfolio::banner(); | ||
|
||
view! { | ||
<p class="inline">"user@termfolio:~$ "</p> | ||
<p style="display:inline;padding:2px;">"help"</p> | ||
<pre> | ||
<div class="output" inner_html={HELP}></div> | ||
<div class="output" inner_html={banner}></div> | ||
</pre> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Config { | ||
pub github: String, | ||
pub about: About, | ||
pub links: Links, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct About { | ||
pub name: String, | ||
pub intro: String, | ||
pub interests: Vec<String>, | ||
pub langs: Vec<String>, | ||
pub experience: Vec<Experience>, | ||
pub education: Vec<Education>, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Experience { | ||
pub title: String, | ||
pub description: Vec<String>, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Education { | ||
pub institute: String, | ||
pub course: String, | ||
pub duration: String, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Links { | ||
pub github: String, | ||
pub email: Option<String>, | ||
pub linkedin: Option<String>, | ||
pub twitter: Option<String>, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct UserInfo { | ||
pub name: Option<String>, | ||
pub bio: Option<String>, | ||
pub public_repos: u16, | ||
pub company: Option<String>, | ||
pub location: Option<String>, | ||
pub followers: u16, | ||
pub following: u16, | ||
pub created_at: String, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct UserStats { | ||
pub stars: u16, | ||
pub forks: u16, | ||
} | ||
|
||
#[derive(Deserialize, Serialize)] | ||
pub struct ApiResponse { | ||
pub response: Vec<Repository>, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Repository { | ||
pub name: String, | ||
pub repo: String, | ||
pub description: String, | ||
pub language: Language, | ||
pub stars: u16, | ||
pub forks: u16, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Clone)] | ||
pub struct Language { | ||
pub name: String, | ||
pub color: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters