diff --git a/src/lib/cards/index.ts b/src/lib/cards/index.ts
index 6be995c..defa917 100644
--- a/src/lib/cards/index.ts
+++ b/src/lib/cards/index.ts
@@ -64,6 +64,7 @@ import { KichRecipeCollectionCardDefinition } from './social/KichRecipeCollectio
import { KichCookingLogCardDefinition } from './social/KichCookingLogCard';
import { SecretImageCardDefinition } from './media/SecretImageCard';
import { RPGActorCardDefinition } from './social/RPGActorCard';
+import { ButtondownCardDefinition } from './social/ButtondownCard';
// import { Model3DCardDefinition } from './visual/Model3DCard';
export const AllCardDefinitions = [
@@ -133,7 +134,8 @@ export const AllCardDefinitions = [
KichRecipeCollectionCardDefinition,
KichCookingLogCardDefinition,
SecretImageCardDefinition,
- RPGActorCardDefinition
+ RPGActorCardDefinition,
+ ButtondownCardDefinition
] as const;
export const CardDefinitionsByType = AllCardDefinitions.reduce(
diff --git a/src/lib/cards/social/ButtondownCard/ButtondownCard.svelte b/src/lib/cards/social/ButtondownCard/ButtondownCard.svelte
new file mode 100644
index 0000000..5f4edaa
--- /dev/null
+++ b/src/lib/cards/social/ButtondownCard/ButtondownCard.svelte
@@ -0,0 +1,118 @@
+
+
+
+ {#if status === 'success'}
+
+
+
+ {successMessage}
+
+
+ {:else}
+
+
+ {title}
+
+ {#if description}
+
+ {description}
+
+ {/if}
+
+
+ {#if username}
+
+
+ {#if status === 'error'}
+
+ Something went wrong. Please try again.
+
+ {/if}
+ {:else}
+
+ Set your Buttondown username in card settings to enable signups.
+
+ {/if}
+ {/if}
+
diff --git a/src/lib/cards/social/ButtondownCard/ButtondownCardSettings.svelte b/src/lib/cards/social/ButtondownCard/ButtondownCardSettings.svelte
new file mode 100644
index 0000000..2c8ac0f
--- /dev/null
+++ b/src/lib/cards/social/ButtondownCard/ButtondownCardSettings.svelte
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/lib/cards/social/ButtondownCard/index.ts b/src/lib/cards/social/ButtondownCard/index.ts
new file mode 100644
index 0000000..e2fceca
--- /dev/null
+++ b/src/lib/cards/social/ButtondownCard/index.ts
@@ -0,0 +1,36 @@
+import type { CardDefinition } from '../../types';
+import ButtondownCard from './ButtondownCard.svelte';
+import ButtondownCardSettings from './ButtondownCardSettings.svelte';
+
+export const ButtondownCardDefinition: CardDefinition = {
+ type: 'buttondown',
+ contentComponent: ButtondownCard,
+ settingsComponent: ButtondownCardSettings,
+ createNew: (card) => {
+ card.cardData = {
+ title: 'Subscribe',
+ description: 'Get updates straight to your inbox.',
+ buttonText: 'Subscribe',
+ placeholder: 'you@example.com',
+ successMessage: 'Thanks! Check your inbox to confirm.'
+ };
+ card.w = 4;
+ card.h = 2;
+ card.mobileW = 8;
+ card.mobileH = 3;
+ },
+
+ defaultColor: 'base',
+ allowSetColor: true,
+ canHaveLabel: false,
+
+ minW: 3,
+ minH: 2,
+ maxW: 8,
+ maxH: 4,
+
+ name: 'Buttondown',
+ keywords: ['buttondown', 'newsletter', 'subscribe', 'mailing list', 'email', 'signup'],
+ groups: ['Social'],
+ icon: ``
+};