Skip to repository content87 lines · 2.8 KB · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T04:49:36.972Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
skills_illustration.rs
1use crate::prelude::*;
2use gpui::{linear_color_stop, linear_gradient};
3
4#[derive(IntoElement)]
5pub struct SkillsIllustration;
6
7impl SkillsIllustration {
8 pub fn new() -> Self {
9 Self
10 }
11}
12
13impl RenderOnce for SkillsIllustration {
14 fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
15 let skill_crease = |label: SharedString, source: SharedString| {
16 h_flex()
17 .py_1()
18 .px_1p5()
19 .gap_1p5()
20 .border_1()
21 .border_color(cx.theme().colors().border)
22 .bg(cx.theme().colors().element_active.opacity(0.5))
23 .justify_center()
24 .rounded_md()
25 .shadow_sm()
26 .child(
27 Icon::new(IconName::Sparkle)
28 .color(Color::Muted)
29 .size(IconSize::XSmall),
30 )
31 .child(Label::new(label).size(LabelSize::XSmall).buffer_font(cx))
32 .child(
33 Label::new(format!("({source})"))
34 .size(LabelSize::XSmall)
35 .color(Color::Muted)
36 .buffer_font(cx),
37 )
38 };
39
40 let skill_list = v_flex()
41 .absolute()
42 .top_8()
43 .gap_2p5()
44 .items_center()
45 .child(
46 h_flex()
47 .gap_2p5()
48 .child(skill_crease("img-gen".into(), "studio".into()))
49 .child(skill_crease("frontend-design".into(), "global".into())),
50 )
51 .child(
52 h_flex()
53 .gap_2p5()
54 .child(skill_crease("brainstorming".into(), "global".into()))
55 .child(skill_crease("borrow-checker-expert".into(), "zed".into())),
56 )
57 .child(
58 h_flex()
59 .gap_2p5()
60 .child(skill_crease("grill-with-docs".into(), "global".into()))
61 .child(skill_crease("video-edit".into(), "studio".into())),
62 );
63
64 let gradient_bg = cx.theme().colors().editor_background;
65 let gradient_fade = div()
66 .absolute()
67 .rounded_t_md()
68 .inset_0()
69 .bg(linear_gradient(
70 0.,
71 linear_color_stop(gradient_bg.opacity(0.8), 0.),
72 linear_color_stop(gradient_bg.opacity(0.0), 1.),
73 ));
74
75 v_flex()
76 .relative()
77 .h(rems_from_px(150.))
78 .justify_end()
79 .items_center()
80 .rounded_t_md()
81 .overflow_hidden()
82 .bg(gpui::black().opacity(0.2))
83 .child(skill_list)
84 .child(gradient_fade)
85 }
86}
87