Compare commits

...

1 Commits

Author SHA1 Message Date
dwelle e8d4b0a8df feat: tweak sidebar promo style 2026-04-15 20:59:32 +02:00
10 changed files with 123 additions and 17 deletions
+59 -3
View File
@@ -4,21 +4,32 @@
display: flex;
flex-direction: column;
text-align: center;
gap: 1rem;
gap: 1.5rem;
flex: 1 1 auto;
.link-button {
margin: 0 auto !important;
width: 100%;
button {
width: 100%;
}
}
}
.app-sidebar-promo-image {
margin: 1rem 0;
height: 16.25rem;
height: 295px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
background-size: calc(
var(--right-sidebar-width, 100%) - var(--space-factor) * 2
);
background-image: radial-gradient(
circle,
transparent 60%,
transparent 0%,
var(--sidebar-bg-color) 100%
),
var(--image-source);
@@ -33,4 +44,49 @@
.link-button {
margin: 0 auto;
}
.app-sidebar-promo-text {
padding: 0 0.5rem;
font-size: 0.875rem;
font-weight: 700;
line-height: 1.4;
}
.app-sidebar-promo-illustration {
position: relative;
min-height: 7rem;
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 0.125rem;
.app-sidebar-promo-heart {
width: 46px;
transform: translateX(-14px);
height: auto;
}
.app-sidebar-promo-trial-note {
position: absolute;
top: 2.75rem;
left: 50%;
transform: translateX(-56%) rotate(-7deg);
font-size: 1rem;
line-height: 1.15;
color: var(--color-primary);
white-space: nowrap;
}
.app-sidebar-promo-trial-arrow {
position: absolute;
top: 3.35rem;
left: 55%;
width: 4.5rem;
height: 3rem;
transform: translateX(1.75rem) rotate(10deg);
color: var(--color-primary);
overflow: visible;
}
}
}
+64 -12
View File
@@ -8,6 +8,63 @@ import { useUIAppState } from "@excalidraw/excalidraw/context/ui-appState";
import "./AppSidebar.scss";
type SidebarPromoCopyProps = {
text: string;
};
const SidebarPromoCopy = (props: SidebarPromoCopyProps) => {
return (
<div className="app-sidebar-promo-copy">
<div className="app-sidebar-promo-illustration" aria-hidden="true">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 300 250"
className="app-sidebar-promo-heart"
>
<path
d="M 145 75
C 110 35, 60 55, 65 120
C 70 180, 140 190, 215 200
C 225 180, 260 110, 235 55
C 210 -5, 140 20, 160 105"
fill="none"
stroke="#D06B64"
strokeWidth="16"
strokeLinecap="round"
/>
</svg>
<div className="app-sidebar-promo-trial-note excalifont">
14 days of
<br />
free trial
</div>
<svg
className="app-sidebar-promo-trial-arrow"
viewBox="0 0 72 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5 6C23 1 50 8 48 32"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
/>
<path
d="M42 26L48 32L54 26"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</div>
<div className="app-sidebar-promo-text">{props.text}</div>
</div>
);
};
export const AppSidebar = () => {
const { theme, openSidebar } = useUIAppState();
@@ -32,15 +89,13 @@ export const AppSidebar = () => {
<div
className="app-sidebar-promo-image"
style={{
["--image-source" as any]: `url(/oss_promo_comments_${
["--image-source" as any]: `url(/sidebar-comments-promo-${
theme === THEME.DARK ? "dark" : "light"
}.jpg)`,
opacity: 0.7,
opacity: 0.9,
}}
/>
<div className="app-sidebar-promo-text">
Make comments with Excalidraw+
</div>
<SidebarPromoCopy text="Make comments with Excalidraw+" />
<LinkButton
href={`${
import.meta.env.VITE_APP_PLUS_LP
@@ -55,16 +110,13 @@ export const AppSidebar = () => {
<div
className="app-sidebar-promo-image"
style={{
["--image-source" as any]: `url(/oss_promo_presentations_${
["--image-source" as any]: `url(/sidebar-presentation-promo-${
theme === THEME.DARK ? "dark" : "light"
}.svg)`,
backgroundSize: "60%",
opacity: 0.4,
}.jpg)`,
opacity: 0.7,
}}
/>
<div className="app-sidebar-promo-text">
Create presentations with Excalidraw+
</div>
<SidebarPromoCopy text="Create presentation with Excalidraw+" />
<LinkButton
href={`${
import.meta.env.VITE_APP_PLUS_LP
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB