Skip to content
Merged
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
67 changes: 66 additions & 1 deletion packages/sdk/src/core-templates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import {
ws,
type TemplateMeta,
} from "@webstudio-is/template";
import { CheckboxCheckedIcon, RadioCheckedIcon } from "@webstudio-is/icons/svg";
import {
CheckboxCheckedIcon,
RadioCheckedIcon,
Webstudio1cIcon,
} from "@webstudio-is/icons/svg";
import {
blockComponent,
collectionComponent,
Expand Down Expand Up @@ -350,6 +354,66 @@ const forms: Record<string, TemplateMeta> = {
},
};

const builtWithWebstudioMeta: TemplateMeta = {
category: "other",
description:
"A “Built with Webstudio” badge should be added to every project page on the free plan. This helps Webstudio spread awareness as a platform.",
icon: Webstudio1cIcon,
template: (
<ws.element
ws:tag="a"
ws:label="Built with Webstudio"
href="https://webstudio.is"
target="_blank"
ws:style={css`
display: inline-flex;
gap: 6px;
align-items: center;
justify-content: center;
position: fixed;
z-index: 1000;
padding: 6px 10px;
right: 16px;
bottom: 16px;
color: rgba(251, 252, 253, 1);
font-family: system-ui, sans-serif;
font-size: 12px;
font-weight: 500;
line-height: 1;
border: 1px solid transparent;
border-radius: 9px;
text-decoration-line: none;
text-wrap-mode: nowrap;
background-clip: padding-box, border-box;
background-origin: padding-box, border-box;
background-image:
linear-gradient(135deg, #4a4efa 0%, #bd2fdb 66%, #ec59ce 100%),
linear-gradient(
135deg,
#92fddc 0%,
#7d7ffb 31.94%,
#ed72fe 64.24%,
#fdd791 100%
);
`}
>
<$.HtmlEmbed
ws:label="Logo"
code={Webstudio1cIcon}
ws:style={css`
display: block;
width: 16px;
height: 16px;
flex-shrink: 0;
`}
></$.HtmlEmbed>
<ws.element ws:tag="div" ws:label="Text">
Built with Webstudio
</ws.element>
</ws.element>
),
};

export const coreTemplates = {
[elementComponent]: elementMeta,
link: linkMeta,
Expand All @@ -358,4 +422,5 @@ export const coreTemplates = {
[blockComponent]: blockMeta,
...typography,
...forms,
builtWithWebstudio: builtWithWebstudioMeta,
};
1 change: 1 addition & 0 deletions packages/sdk/src/schema/component-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const componentCategories = [
"localization",
"radix",
"xml",
"other",
"hidden",
"internal",
] as const;
Expand Down
1 change: 1 addition & 0 deletions packages/template/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const templateCategories = [
"localization",
"radix",
"xml",
"other",
"hidden",
"internal",
] as const;
Expand Down