feat(developer): replace placeholder letters with Bootstrap icons on agents page
All checks were successful
All checks were successful
Use dioxus_free_icons Bootstrap icons: BsCpu for hero, BsBook for docs, BsLightningCharge for getting started, BsGithub for GitHub, BsCodeSquare for examples, BsBoxArrowUpRight for API reference. Also fix conditional serde import for server feature. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use serde::{Deserialize, Serialize};
|
#[cfg(feature = "server")]
|
||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
use crate::models::AgentEntry;
|
use crate::models::AgentEntry;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use dioxus_free_icons::icons::bs_icons::{
|
||||||
|
BsBook, BsBoxArrowUpRight, BsCodeSquare, BsCpu, BsGithub, BsLightningCharge,
|
||||||
|
};
|
||||||
|
use dioxus_free_icons::Icon;
|
||||||
|
|
||||||
use crate::i18n::{t, Locale};
|
use crate::i18n::{t, Locale};
|
||||||
use crate::models::ServiceUrlsContext;
|
use crate::models::ServiceUrlsContext;
|
||||||
@@ -41,7 +45,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
// -- Hero section --
|
// -- Hero section --
|
||||||
div { class: "agents-hero",
|
div { class: "agents-hero",
|
||||||
div { class: "agents-hero-row",
|
div { class: "agents-hero-row",
|
||||||
div { class: "agents-hero-icon placeholder-icon", "A" }
|
div { class: "agents-hero-icon",
|
||||||
|
Icon { icon: BsCpu, width: 24, height: 24 }
|
||||||
|
}
|
||||||
h2 { class: "agents-hero-title",
|
h2 { class: "agents-hero-title",
|
||||||
{t(l, "developer.agents_title")}
|
{t(l, "developer.agents_title")}
|
||||||
}
|
}
|
||||||
@@ -150,7 +156,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
href: "https://langchain-ai.github.io/langgraph/",
|
href: "https://langchain-ai.github.io/langgraph/",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
div { class: "agents-card-icon placeholder-icon", "D" }
|
div { class: "agents-card-icon",
|
||||||
|
Icon { icon: BsBook, width: 18, height: 18 }
|
||||||
|
}
|
||||||
div { class: "agents-card-title",
|
div { class: "agents-card-title",
|
||||||
{t(l, "developer.agents_docs")}
|
{t(l, "developer.agents_docs")}
|
||||||
}
|
}
|
||||||
@@ -165,7 +173,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
href: "https://langchain-ai.github.io/langgraph/tutorials/introduction/",
|
href: "https://langchain-ai.github.io/langgraph/tutorials/introduction/",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
div { class: "agents-card-icon placeholder-icon", "G" }
|
div { class: "agents-card-icon",
|
||||||
|
Icon { icon: BsLightningCharge, width: 18, height: 18 }
|
||||||
|
}
|
||||||
div { class: "agents-card-title",
|
div { class: "agents-card-title",
|
||||||
{t(l, "developer.agents_getting_started")}
|
{t(l, "developer.agents_getting_started")}
|
||||||
}
|
}
|
||||||
@@ -180,7 +190,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
href: "https://github.com/langchain-ai/langgraph",
|
href: "https://github.com/langchain-ai/langgraph",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
div { class: "agents-card-icon placeholder-icon", "H" }
|
div { class: "agents-card-icon",
|
||||||
|
Icon { icon: BsGithub, width: 18, height: 18 }
|
||||||
|
}
|
||||||
div { class: "agents-card-title",
|
div { class: "agents-card-title",
|
||||||
{t(l, "developer.agents_github")}
|
{t(l, "developer.agents_github")}
|
||||||
}
|
}
|
||||||
@@ -195,7 +207,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
href: "https://github.com/langchain-ai/langgraph/tree/main/examples",
|
href: "https://github.com/langchain-ai/langgraph/tree/main/examples",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
div { class: "agents-card-icon placeholder-icon", "E" }
|
div { class: "agents-card-icon",
|
||||||
|
Icon { icon: BsCodeSquare, width: 18, height: 18 }
|
||||||
|
}
|
||||||
div { class: "agents-card-title",
|
div { class: "agents-card-title",
|
||||||
{t(l, "developer.agents_examples")}
|
{t(l, "developer.agents_examples")}
|
||||||
}
|
}
|
||||||
@@ -210,7 +224,9 @@ pub fn AgentsPage() -> Element {
|
|||||||
href: "{api_ref_href}",
|
href: "{api_ref_href}",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
div { class: "agents-card-icon placeholder-icon", "R" }
|
div { class: "agents-card-icon",
|
||||||
|
Icon { icon: BsBoxArrowUpRight, width: 18, height: 18 }
|
||||||
|
}
|
||||||
div { class: "agents-card-title",
|
div { class: "agents-card-title",
|
||||||
{t(l, "developer.agents_api_ref")}
|
{t(l, "developer.agents_api_ref")}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user