Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ai page style #554

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ssr/src/component/icons/chevron_left_icon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
use leptos::*;

#[component]
pub fn ChevronLeftIcon(
#[prop(optional, default = "w-full h-full".to_string())] classes: String,
) -> impl IntoView {
view! {
<svg
class=format!("{}", classes)
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M15.2404 2.03981C15.7611 1.47858 16.6491 1.47858 17.1697 2.03981C17.638 2.54456 17.638 3.32496 17.1697 3.82972L9.58989 12L17.1697 20.1703C17.638 20.675 17.638 21.4554 17.1697 21.9602C16.6491 22.5214 15.7611 22.5214 15.2404 21.9602L7.26194 13.3602C6.55021 12.5931 6.55021 11.4069 7.26194 10.6398L15.2404 2.03981Z"
fill="currentColor"
/>
</svg>
}
}
3 changes: 3 additions & 0 deletions ssr/src/component/icons/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub mod chevron_left_icon;
pub mod pump_ai_logo;
pub mod send_icon;
76 changes: 76 additions & 0 deletions ssr/src/component/icons/pump_ai_logo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
use leptos::*;

#[component]
pub fn PumpAILogo(
#[prop(optional, default = "w-full h-full".to_string())] classes: String,
#[prop(optional)] animate: bool,
) -> impl IntoView {
view! {
<svg
class=format!("{}", classes)
viewBox="0 0 72 72"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M59.3831 43.2173C42.6979 48.7298 37.1418 54.287 31.6292 70.9712C31.1757 72.3429 29.2361 72.3429 28.7826 70.9712C23.2702 54.286 17.713 48.73 1.02874 43.2173C-0.342912 42.7638 -0.342912 40.8242 1.02874 40.3708C17.7139 34.8583 23.27 29.3011 28.7826 12.6169C29.2362 11.2452 31.1757 11.2452 31.6292 12.6169C37.1417 29.3021 42.6989 34.8581 59.3831 40.3708C60.7547 40.8243 60.7547 42.7639 59.3831 43.2173Z"
fill="url(#paint0_linear_234_3401)"
style=""
/>
<path
class=("animate-scale-rotate", animate)
d="M71.4854 15.8165C63.1448 18.5709 60.3647 21.3511 57.6065 29.6953C57.3816 30.3812 56.4119 30.3812 56.1833 29.6953C53.4288 21.3547 50.6486 18.5747 42.3044 15.8165C41.6186 15.5916 41.6186 14.6218 42.3044 14.3932C50.645 11.6388 53.425 8.85857 56.1833 0.514375C56.4082 -0.171458 57.3779 -0.171458 57.6065 0.514375C60.361 8.85499 63.1412 11.635 71.4854 14.3932C72.1712 14.6181 72.1712 15.5879 71.4854 15.8165Z"
fill="url(#paint1_linear_234_3401)"
style=""
/>
<defs>
<linearGradient
id="paint0_linear_234_3401"
x1="57.0557"
y1="19.5591"
x2="20.9765"
y2="65.2877"
gradientUnits="userSpaceOnUse"
>
<stop
stop-color="#FF78C1"
style="stop-color:#FF78C1;stop-color:color(display-p3 1.0000 0.4701 0.7574);stop-opacity:1;"
/>
<stop
offset="0.509385"
stop-color="#E2017B"
style="stop-color:#E2017B;stop-color:color(display-p3 0.8863 0.0039 0.4824);stop-opacity:1;"
/>
<stop
offset="1"
stop-color="#5F0938"
style="stop-color:#5F0938;stop-color:color(display-p3 0.3734 0.0335 0.2178);stop-opacity:1;"
/>
</linearGradient>
<linearGradient
id="paint1_linear_234_3401"
x1="70.3215"
y1="3.986"
x2="52.2796"
y2="26.8531"
gradientUnits="userSpaceOnUse"
>
<stop
stop-color="#FF78C1"
style="stop-color:#FF78C1;stop-color:color(display-p3 1.0000 0.4701 0.7574);stop-opacity:1;"
/>
<stop
offset="0.509385"
stop-color="#E2017B"
style="stop-color:#E2017B;stop-color:color(display-p3 0.8863 0.0039 0.4824);stop-opacity:1;"
/>
<stop
offset="1"
stop-color="#5F0938"
style="stop-color:#5F0938;stop-color:color(display-p3 0.3734 0.0335 0.2178);stop-opacity:1;"
/>
</linearGradient>
</defs>
</svg>
}
}
36 changes: 36 additions & 0 deletions ssr/src/component/icons/send_icon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use leptos::*;

#[component]
pub fn SendIcon(
#[prop(optional, default = "w-full h-full".to_string())] classes: String,
#[prop(optional)] filled: bool,
) -> impl IntoView {
view! {
<svg
class=format!("{}", classes)
viewBox="0 0 31 30"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<mask
id="mask0_500_15024"
style="mask-type:alpha"
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="31"
height="30"
>
<rect x="0.5" width="30" height="30" fill="currentColor" />
</mask>
<g mask="url(#mask0_500_15024)">
<path
d="M18.9781 12.0763L18.978 12.0763L18.9776 12.0768L18.9775 12.0769C18.9304 12.1301 16.5743 14.7906 15.5453 15.9467C15.4021 16.1077 15.3455 16.3697 15.4085 16.5726L17.1255 22.1025C17.2376 22.4634 17.7416 22.4819 17.8798 22.1301L24.1026 6.29093C24.2304 5.9658 23.9092 5.64463 23.5841 5.77237L7.74489 11.9952C7.39309 12.1334 7.41156 12.6374 7.77254 12.7495L13.3015 14.4663C13.5048 14.5294 13.7676 14.4726 13.9289 14.329C15.0897 13.296 17.7645 10.9273 17.7986 10.8971L17.7987 10.897L17.7988 10.8969L17.8014 10.8946L18.9781 12.0763ZM18.9781 12.0763L18.9809 12.0731C18.981 12.073 18.981 12.073 18.981 12.0729M18.9781 12.0763L18.981 12.0729M18.0798 11.2806L18.0797 11.2807M18.0798 11.2806L18.08 11.2804L18.0797 11.2807M18.0798 11.2806C18.0798 11.2807 18.0797 11.2807 18.0797 11.2807M18.0798 11.2806L18.0797 11.2807M18.981 12.0729C18.9811 12.0729 18.9811 12.0729 18.9811 12.0729M18.981 12.0729L18.9811 12.0729M18.9811 12.0729C19.3318 11.674 19.1903 11.1832 18.9373 10.933M18.9811 12.0729L18.9373 10.933M18.9373 10.933C18.6877 10.6859 18.1985 10.5451 17.8016 10.8944L18.9373 10.933Z"
stroke=move || format!("{} ", if filled { "none" } else { "currentColor" })
fill=move || format!("{} ", if filled { "currentColor" } else { "none" })
stroke-width="1.2"
/>
</g>
</svg>
}
}
2 changes: 2 additions & 0 deletions ssr/src/component/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub mod dashbox;
pub mod feed_popup;
pub mod hn_icons;
pub mod ic_symbol;
pub mod icons;
pub mod infinite_scroller;
pub mod loading;
pub mod login_modal;
Expand All @@ -23,6 +24,7 @@ pub mod overlay;
pub mod profile_placeholders;
pub mod scrolling_post_view;
pub mod share_popup;
pub mod shimmer;
pub mod social;
pub mod spinner;
pub mod title;
Expand Down
11 changes: 11 additions & 0 deletions ssr/src/component/shimmer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use leptos::*;

#[component]
pub fn Shimmer() -> impl IntoView {
view! {
<div
style="background: linear-gradient(-45deg, rgb(24, 24, 27) 40%, rgb(20, 20, 20) 50%, rgb(24, 24, 27) 60%); background-size: 300%; background-position-x: 100%;"
class="w-full h-8 bg-transparent animate-shimmer bg-zinc-900 rounded-full"
/>
}
}
Loading
Loading