feat(editor): tweak sidebar promo style (#11181)
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 38 KiB |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 138 165" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="m11.55 6.521 114.882-.02 4.293.973 1.369 1.457.168 4.434.44 55.498-.595 3.556-1.573 2.251-4.433.734-114.808.115-3.06-1.048-2.497-2.759.721-3.003-.73-55.875 1.064-1.95.021-2.498 2.04-.472 3.437-1.008" fill="#4F4D6F"/><path d="M12.061 6.822c42.517-.332 85.113-.654 114.106 0m-114.106 0c44.606.049 88.915.018 114.106 0m-114.106 0C7.883 6.67 6.534 9.165 5.778 13.07m6.283-6.248c-3.454.646-5.415 1.355-6.283 6.248m120.389-6.248c3.423-.486 5.903 2.349 6.284 6.248m-6.284-6.248c3.67.603 7.067 1.423 6.284 6.248m0 0c-1.174 20.402-.324 40.87 0 55.71m0-55.71c.322 15.398.224 30.96 0 55.71m0 0c.428 4.795-2.496 5.927-6.284 6.247m6.284-6.248c.717 4.866-1.638 7.074-6.284 6.248m0 0c-27.612.672-55.472.188-114.106 0m114.106 0c-29.165-.576-58.4-.527-114.106 0m0 0c-3.426.569-5.816-2.704-6.283-6.248m6.283 6.248c-3.324-.404-6.219-1.706-6.283-6.248m0 0c-.34-15.249-.85-31.052 0-55.709m0 55.71c.214-12.22.465-24.702 0-55.71" stroke="#A8A5FF" stroke-width="2" stroke-linecap="round"/><path d="m4.818 1.617 128.861-.121 1.518.425.913 2.093-.515 4.907.073 2.435-2.376 1.068-128.85-.933-2.084.523-.8-2.734.815-5.539.063-1.968 2.082-.043" fill="#4F4D6F"/><path d="M4.486 1.952c31.255-.175 62.584-.636 128.731 0m-128.731 0c27.438-.185 54.944-.14 128.731 0m-128.731 0c-1.734.444-1.813.248-2.521 2.508m2.52-2.508c-1.935-.878-2.595.153-2.52 2.508m131.252-2.508c1.133.079 2.786.819 2.521 2.508m-2.521-2.508c1.196-.246 2.794 1.133 2.521 2.508m0 0c-.76 1.243.069 2 0 5.012m0-5.012c.35 1.41-.218 2.7 0 5.012m0 0c-.349 1.161-1.143 2.768-2.521 2.507m2.521-2.507c-.371 2.5-1.103 3.106-2.521 2.507m0 0c-33.063.421-66.11.32-128.731 0m128.731 0c-47.335-.244-94.721-.092-128.731 0m0 0c-1.357-.434-2.321-.16-2.521-2.507m2.52 2.507c-1.76-.06-2.793-.127-2.52-2.507m0 0c-.393-1.154.294-3.628 0-5.012m0 5.012a83.685 83.685 0 0 1 0-5.012" stroke="#A8A5FF" stroke-width="2" stroke-linecap="round"/><path d="m4.819 72.339 128.965.9.658-.17 1.569 1.123.002 5.428.135 3.008-2.517.875L4.47 82.171 2.5 81.71l.118-1.738.328-5.635.463-1.708 1.514-.498" fill="#4F4D6F"/><path d="M4.785 72.706c50.976.318 102.405.498 128.731 0m-128.73 0c28.322.185 56.85-.028 128.73 0m-128.73 0c-1.727-.49-2.447 1.28-2.522 2.507m2.521-2.507c-2.148-.22-2.794 1.595-2.521 2.507m131.252-2.507c1.999-.196 3.079.185 2.522 2.507m-2.522-2.507c1.446.742 3.113 1.683 2.522 2.507m0 0c-.597 1.523.604 3.92 0 5.012m0-5.012c.015 2.296-.246 3.815 0 5.012m0 0c.597 2.072-.564 2.085-2.522 2.507m2.522-2.507c-.032 1.527-.591 2.517-2.522 2.507m0 0c-26.528.62-52.8.594-128.73 0m128.73 0c-37.61.554-74.95.318-128.73 0m0 0c-2.387-.37-2.699-.879-2.522-2.507m2.521 2.507c-.95-.166-1.736-.213-2.521-2.507m0 0c-.403-1.103-.526-2.683 0-5.012m0 5.012c-.14-1.533.212-2.513 0-5.012" stroke="#A8A5FF" stroke-width="2" stroke-linecap="round"/><path d="M62.287 24.268c2.167-1.127 5.572-1.601 8.166-1.568 2.592.033 5.172.717 7.391 1.77 2.217 1.052 4.31 2.727 5.917 4.547 1.606 1.82 2.867 4.002 3.723 6.373.856 2.37 1.479 5.357 1.412 7.853-.067 2.495-.733 4.852-1.81 7.118-1.079 2.27-2.785 4.698-4.659 6.493-1.873 1.794-4.243 3.463-6.582 4.276-2.338.812-5.01.745-7.451.595-2.443-.15-4.96-.535-7.2-1.495-2.238-.961-4.482-2.49-6.234-4.27-1.75-1.781-3.444-3.984-4.273-6.417-.828-2.432-.777-5.63-.695-8.179.08-2.55.189-4.88 1.184-7.117.996-2.237 2.382-4.479 4.792-6.308 2.411-1.832 7.52-3.954 9.67-4.677 2.149-.722 3.152-.011 3.227.34m16.33 6.453c1.521 1.607 1.941 4.323 2.468 6.752.526 2.429.797 5.256.695 7.828-.104 2.57-.151 5.402-1.308 7.595-1.157 2.193-3.495 3.991-5.632 5.559-2.138 1.57-4.771 3.278-7.195 3.858-2.42.58-4.88-.047-7.334-.38-2.454-.335-5.2-.465-7.395-1.62-2.195-1.151-4.273-3.373-5.775-5.3-1.502-1.93-2.513-3.87-3.236-6.268-.722-2.398-1.406-5.522-1.1-8.119.309-2.596 1.642-5.375 2.94-7.458 1.296-2.084 2.92-3.534 4.846-5.044 1.925-1.507 4.265-3.36 6.708-4.006 2.443-.646 5.435-.117 7.947.123 2.511.242 4.919.105 7.122 1.326 2.201 1.22 5.12 4.977 6.09 5.992.97 1.015.064-.006-.274.101" fill="#191919"/><path d="M78.568 25.176c2.26.828 4.224 3.18 5.756 5.139 1.53 1.96 2.62 4.272 3.43 6.617.81 2.347 1.599 5.01 1.426 7.459-.175 2.446-1.314 5.059-2.469 7.226-1.156 2.167-2.55 4.21-4.463 5.777-1.912 1.57-4.597 2.9-7.018 3.638-2.421.738-5.038 1.025-7.51.793-2.47-.233-5.108-1.057-7.32-2.185-2.21-1.129-4.327-2.687-5.945-4.589-1.618-1.901-3-4.397-3.762-6.828-.76-2.428-1.021-5.22-.801-7.75.22-2.526.991-5.316 2.118-7.415 1.128-2.099 2.779-3.655 4.644-5.178 1.866-1.52 4.092-3.089 6.551-3.954 2.46-.863 4.862-2.071 8.208-1.226 3.344.844 9.349 4.528 11.862 6.297 2.514 1.769 3.49 4.106 3.217 4.315m-4.307-5.555c2.052 1.295 3.715 3.32 4.856 5.655 1.141 2.337 1.929 5.806 1.992 8.362.06 2.558-.713 4.706-1.623 6.984-.907 2.277-2.21 4.78-3.832 6.684-1.624 1.904-3.714 3.676-5.903 4.737-2.19 1.06-4.827 1.482-7.234 1.622-2.41.143-4.846.106-7.214-.771-2.369-.877-5.127-2.806-6.999-4.489-1.87-1.685-3.216-3.38-4.22-5.615-1.005-2.236-1.659-5.217-1.806-7.8-.147-2.582.075-5.397.923-7.69.848-2.292 Line truncated
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 138 165" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="m11.55 6.521 114.882-.02 4.293.973 1.369 1.457.168 4.434.44 55.498-.595 3.556-1.573 2.251-4.433.734-114.808.115-3.06-1.048-2.497-2.759.721-3.003-.73-55.875 1.064-1.95.021-2.498 2.04-.472 3.437-1.008" fill="#E3E2FE"/><path d="M12.061 6.822c42.517-.332 85.113-.654 114.106 0m-114.106 0c44.606.049 88.915.018 114.106 0m-114.106 0C7.883 6.67 6.534 9.165 5.778 13.07m6.283-6.248c-3.454.646-5.415 1.355-6.283 6.248m120.389-6.248c3.423-.486 5.903 2.349 6.284 6.248m-6.284-6.248c3.67.603 7.067 1.423 6.284 6.248m0 0c-1.174 20.402-.324 40.87 0 55.71m0-55.71c.322 15.398.224 30.96 0 55.71m0 0c.428 4.795-2.496 5.927-6.284 6.247m6.284-6.248c.717 4.866-1.638 7.074-6.284 6.248m0 0c-27.612.672-55.472.188-114.106 0m114.106 0c-29.165-.576-58.4-.527-114.106 0m0 0c-3.426.569-5.816-2.704-6.283-6.248m6.283 6.248c-3.324-.404-6.219-1.706-6.283-6.248m0 0c-.34-15.249-.85-31.052 0-55.709m0 55.71c.214-12.22.465-24.702 0-55.71" stroke="#6965DB" stroke-width="2" stroke-linecap="round"/><path d="m4.818 1.617 128.861-.121 1.518.425.913 2.093-.515 4.907.073 2.435-2.376 1.068-128.85-.933-2.084.523-.8-2.734.815-5.539.063-1.968 2.082-.043" fill="#E3E2FE"/><path d="M4.486 1.953c31.255-.176 62.584-.637 128.731 0m-128.731 0c27.438-.186 54.944-.141 128.731 0m-128.731 0c-1.734.443-1.813.247-2.521 2.507m2.52-2.507c-1.935-.88-2.595.152-2.52 2.507m131.252-2.507c1.133.078 2.786.818 2.521 2.507m-2.521-2.507c1.196-.247 2.794 1.132 2.521 2.507m0 0c-.76 1.243.069 2 0 5.012m0-5.012c.35 1.41-.218 2.7 0 5.012m0 0c-.349 1.161-1.143 2.768-2.521 2.507m2.521-2.507c-.371 2.5-1.103 3.106-2.521 2.507m0 0c-33.063.421-66.11.32-128.731 0m128.731 0c-47.335-.244-94.721-.092-128.731 0m0 0c-1.357-.434-2.321-.16-2.521-2.507m2.52 2.507c-1.76-.06-2.793-.127-2.52-2.507m0 0c-.393-1.154.294-3.628 0-5.012m0 5.012a83.685 83.685 0 0 1 0-5.012" stroke="#6965DB" stroke-width="2" stroke-linecap="round"/><path d="m4.819 72.339 128.965.9.658-.17 1.569 1.123.002 5.428.135 3.008-2.517.875L4.47 82.172l-1.97-.463.118-1.738.328-5.635.463-1.708 1.514-.498" fill="#E3E2FE"/><path d="M4.785 72.706c50.976.318 102.405.498 128.731 0m-128.73 0c28.322.185 56.85-.028 128.73 0m-128.73 0c-1.727-.49-2.447 1.28-2.522 2.507m2.521-2.507c-2.148-.22-2.794 1.595-2.521 2.507m131.252-2.507c1.999-.196 3.079.185 2.522 2.507m-2.522-2.507c1.446.742 3.113 1.683 2.522 2.507m0 0c-.597 1.523.604 3.92 0 5.012m0-5.012c.015 2.296-.246 3.815 0 5.012m0 0c.597 2.072-.564 2.085-2.522 2.507m2.522-2.507c-.032 1.527-.591 2.517-2.522 2.507m0 0c-26.528.62-52.8.594-128.73 0m128.73 0c-37.61.555-74.95.318-128.73 0m0 0c-2.387-.37-2.699-.879-2.522-2.507m2.521 2.507c-.95-.166-1.736-.213-2.521-2.507m0 0c-.403-1.103-.526-2.683 0-5.012m0 5.012c-.14-1.533.212-2.513 0-5.012" stroke="#6965DB" stroke-width="2" stroke-linecap="round"/><path d="M62.287 24.268c2.167-1.127 5.572-1.601 8.166-1.568 2.592.033 5.172.717 7.391 1.77 2.217 1.052 4.31 2.727 5.917 4.547 1.606 1.82 2.867 4.002 3.723 6.372.856 2.37 1.479 5.358 1.412 7.854-.067 2.495-.733 4.852-1.81 7.118-1.079 2.27-2.785 4.698-4.659 6.492-1.873 1.795-4.243 3.464-6.582 4.276-2.338.813-5.01.746-7.451.596-2.443-.15-4.96-.535-7.2-1.496-2.238-.96-4.482-2.489-6.234-4.27-1.75-1.78-3.444-3.983-4.273-6.416-.828-2.432-.777-5.63-.695-8.179.08-2.55.189-4.88 1.184-7.117.996-2.237 2.382-4.479 4.792-6.308 2.411-1.832 7.52-3.954 9.67-4.677 2.149-.722 3.152-.011 3.227.34m16.33 6.453c1.521 1.607 1.941 4.323 2.468 6.752.526 2.429.797 5.256.695 7.828-.104 2.57-.151 5.402-1.308 7.595-1.157 2.193-3.495 3.99-5.632 5.559-2.138 1.57-4.771 3.278-7.195 3.858-2.42.58-4.88-.047-7.334-.38-2.454-.335-5.2-.466-7.395-1.62-2.195-1.151-4.273-3.373-5.775-5.3-1.502-1.93-2.513-3.87-3.236-6.268-.722-2.398-1.406-5.522-1.1-8.119.309-2.596 1.642-5.375 2.94-7.458 1.296-2.084 2.92-3.534 4.846-5.044 1.925-1.507 4.265-3.36 6.708-4.006 2.443-.646 5.435-.117 7.947.123 2.511.242 4.919.105 7.122 1.326 2.201 1.22 5.12 4.977 6.09 5.992.97 1.015.064-.006-.274.101" fill="#fff"/><path d="M78.568 25.176c2.26.828 4.224 3.18 5.756 5.139 1.53 1.96 2.62 4.272 3.43 6.617.81 2.347 1.599 5.01 1.426 7.459-.175 2.446-1.314 5.059-2.469 7.226-1.156 2.167-2.55 4.21-4.463 5.777-1.912 1.57-4.597 2.9-7.018 3.638-2.421.738-5.038 1.025-7.51.793-2.47-.233-5.108-1.057-7.32-2.185-2.21-1.129-4.327-2.687-5.945-4.589-1.618-1.901-3-4.397-3.762-6.828-.76-2.428-1.021-5.22-.801-7.75.22-2.526.991-5.316 2.118-7.415 1.128-2.099 2.779-3.655 4.644-5.178 1.866-1.52 4.092-3.089 6.551-3.954 2.46-.863 4.862-2.071 8.208-1.226 3.344.844 9.349 4.528 11.862 6.297 2.514 1.769 3.49 4.106 3.217 4.315m-4.307-5.555c2.052 1.295 3.715 3.32 4.856 5.655 1.141 2.337 1.929 5.806 1.992 8.362.06 2.558-.713 4.706-1.623 6.984-.907 2.277-2.21 4.78-3.832 6.684-1.624 1.904-3.714 3.676-5.903 4.737-2.19 1.06-4.827 1.482-7.234 1.622-2.41.143-4.846.106-7.214-.771-2.369-.877-5.127-2.806-6.999-4.489-1.87-1.685-3.216-3.38-4.22-5.615-1.005-2.236-1.659-5.217-1.806-7.8-.147-2.582.075-5.397.923-7.69.848-2.292 2.476Line truncated
|
||||
|
Before Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 134 KiB |