Theme Block

Discount code generator

66 个配置项,0 类嵌套 block。

Schema

{
  "name": "Discount code generator",
  "settings": [
    {
      "type": "header",
      "content": "Content"
    },
    {
      "type": "text",
      "id": "heading",
      "label": "Heading",
      "default": "🔥 Limited time offer!"
    },
    {
      "type": "textarea",
      "id": "description",
      "label": "Description",
      "default": "Copy the code below and apply it at checkout to get your exclusive discount!"
    },
    {
      "type": "text",
      "id": "discount_code",
      "label": "Discount code",
      "default": "SAVE20"
    },
    {
      "type": "text",
      "id": "button_text",
      "label": "Button text",
      "default": "Copy code"
    },
    {
      "type": "text",
      "id": "success_text",
      "label": "Success text",
      "default": "Copied!"
    },
    {
      "type": "header",
      "content": "Countdown timer"
    },
    {
      "type": "checkbox",
      "id": "show_countdown",
      "label": "Show countdown timer",
      "default": true
    },
    {
      "type": "text",
      "id": "countdown_text",
      "label": "Countdown text",
      "default": "⏰ Hurry! Offer expires in:"
    },
    {
      "type": "text",
      "id": "countdown_end",
      "label": "Countdown end date (Eastern Time)",
      "default": "2024-12-31 23:59:59",
      "info": "Format: YYYY-MM-DD HH:MM:SS (Eastern Time Zone). Section will automatically hide when countdown reaches zero."
    },
    {
      "type": "header",
      "content": "Sticky reminder bar"
    },
    {
      "type": "text",
      "id": "sticky_message",
      "label": "Sticky bar message",
      "default": "✅ You've got a discount code!"
    },
    {
      "type": "header",
      "content": "Expiry and terms"
    },
    {
      "type": "text",
      "id": "expiry_text",
      "label": "Expiry label",
      "default": "Valid until:"
    },
    {
      "type": "text",
      "id": "expiry_date",
      "label": "Expiry date",
      "default": "December 31, 2024"
    },
    {
      "type": "textarea",
      "id": "terms",
      "label": "Terms and conditions",
      "default": "Cannot be combined with other offers. Valid for new customers only."
    },
    {
      "type": "header",
      "content": "Layout spacing"
    },
    {
      "type": "range",
      "id": "max_width",
      "min": 400,
      "max": 1200,
      "step": 50,
      "unit": "px",
      "label": "Maximum width",
      "default": 800
    },
    {
      "type": "range",
      "id": "horizontal_padding",
      "min": 10,
      "max": 60,
      "step": 5,
      "unit": "px",
      "label": "Horizontal padding",
      "default": 20
    },
    {
      "type": "range",
      "id": "vertical_margin",
      "min": 0,
      "max": 80,
      "step": 5,
      "unit": "px",
      "label": "Vertical margin",
      "default": 20
    },
    {
      "type": "header",
      "content": "Main colors"
    },
    {
      "type": "color",
      "id": "background_color",
      "label": "Background",
      "default": "#f8f9fa"
    },
    {
      "type": "color",
      "id": "border_color",
      "label": "Border",
      "default": "#e9ecef"
    },
    {
      "type": "color",
      "id": "heading_color",
      "label": "Heading",
      "default": "#212529"
    },
    {
      "type": "color",
      "id": "text_color",
      "label": "Text",
      "default": "#6c757d"
    },
    {
      "type": "header",
      "content": "Countdown colors"
    },
    {
      "type": "color",
      "id": "countdown_bg_start",
      "label": "Countdown background start",
      "default": "#ff6b6b"
    },
    {
      "type": "color",
      "id": "countdown_bg_end",
      "label": "Countdown background end",
      "default": "#ee5a24"
    },
    {
      "type": "color",
      "id": "countdown_text_color",
      "label": "Countdown text",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "timer_unit_bg",
      "label": "Timer unit background",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "timer_unit_text",
      "label": "Timer unit text",
      "default": "#2d3436"
    },
    {
      "type": "header",
      "content": "Code colors"
    },
    {
      "type": "color",
      "id": "code_background",
      "label": "Code background",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "code_text_color",
      "label": "Code text",
      "default": "#dc3545"
    },
    {
      "type": "color",
      "id": "code_border_color",
      "label": "Code border",
      "default": "#dc3545"
    },
    {
      "type": "header",
      "content": "Button colors"
    },
    {
      "type": "color",
      "id": "button_background",
      "label": "Button background",
      "default": "#007bff"
    },
    {
      "type": "color",
      "id": "button_hover_background",
      "label": "Button hover background",
      "default": "#0056b3"
    },
    {
      "type": "color",
      "id": "button_text_color",
      "label": "Button text",
      "default": "#ffffff"
    },
    {
      "type": "color",
      "id": "success_color",
      "label": "Success color",
      "default": "#28a745"
    },
    {
      "type": "header",
      "content": "Sticky bar colors"
    },
    {
      "type": "color",
      "id": "sticky_bg_start",
      "label": "Sticky bar background start",
      "default": "#00b894"
    },
    {
      "type": "color",
      "id": "sticky_bg_end",
      "label": "Sticky bar background end",
      "default": "#00a085"
    },
    {
      "type": "color",
      "id": "sticky_text_color",
      "label": "Sticky bar text",
      "default": "#ffffff"
    },
    {
      "type": "header",
      "content": "Other colors"
    },
    {
      "type": "color",
      "id": "terms_color",
      "label": "Terms text",
      "default": "#6c757d"
    },
    {
      "type": "color",
      "id": "expiry_color",
      "label": "Expiry text",
      "default": "#dc3545"
    },
    {
      "type": "header",
      "content": "Typography"
    },
    {
      "type": "range",
      "id": "heading_size",
      "min": 16,
      "max": 48,
      "step": 2,
      "unit": "px",
      "label": "Heading size",
      "default": 28
    },
    {
      "type": "range",
      "id": "text_size",
      "min": 12,
      "max": 24,
      "step": 1,
      "unit": "px",
      "label": "Text size",
      "default": 16
    },
    {
      "type": "range",
      "id": "countdown_text_size",
      "min": 12,
      "max": 24,
      "step": 1,
      "unit": "px",
      "label": "Countdown text size",
      "default": 16
    },
    {
      "type": "range",
      "id": "timer_number_size",
      "min": 16,
      "max": 36,
      "step": 2,
      "unit": "px",
      "label": "Timer number size",
      "default": 24
    },
    {
      "type": "range",
      "id": "timer_label_size",
      "min": 10,
      "max": 16,
      "step": 1,
      "unit": "px",
      "label": "Timer label size",
      "default": 12
    },
    {
      "type": "range",
      "id": "code_font_size",
      "min": 14,
      "max": 32,
      "step": 2,
      "unit": "px",
      "label": "Code font size",
      "default": 18
    },
    {
      "type": "range",
      "id": "button_font_size",
      "min": 12,
      "max": 24,
      "step": 1,
      "unit": "px",
      "label": "Button font size",
      "default": 16
    },
    {
      "type": "range",
      "id": "sticky_font_size",
      "min": 12,
      "max": 20,
      "step": 1,
      "unit": "px",
      "label": "Sticky bar font size",
      "default": 14
    },
    {
      "type": "range",
      "id": "terms_font_size",
      "min": 10,
      "max": 18,
      "step": 1,
      "unit": "px",
      "label": "Terms font size",
      "default": 12
    },
    {
      "type": "range",
      "id": "expiry_font_size",
      "min": 10,
      "max": 18,
      "step": 1,
      "unit": "px",
      "label": "Expiry font size",
      "default": 14
    },
    {
      "type": "header",
      "content": "Element layout"
    },
    {
      "type": "range",
      "id": "padding",
      "min": 20,
      "max": 80,
      "step": 4,
      "unit": "px",
      "label": "Internal padding",
      "default": 40
    },
    {
      "type": "range",
      "id": "spacing",
      "min": 8,
      "max": 40,
      "step": 4,
      "unit": "px",
      "label": "Element spacing",
      "default": 16
    },
    {
      "type": "range",
      "id": "border_radius",
      "min": 0,
      "max": 24,
      "step": 2,
      "unit": "px",
      "label": "Border radius",
      "default": 12
    },
    {
      "type": "range",
      "id": "countdown_border_radius",
      "min": 0,
      "max": 20,
      "step": 2,
      "unit": "px",
      "label": "Countdown border radius",
      "default": 8
    },
    {
      "type": "range",
      "id": "timer_unit_radius",
      "min": 0,
      "max": 16,
      "step": 2,
      "unit": "px",
      "label": "Timer unit radius",
      "default": 6
    },
    {
      "type": "range",
      "id": "code_border_radius",
      "min": 0,
      "max": 16,
      "step": 2,
      "unit": "px",
      "label": "Code border radius",
      "default": 8
    },
    {
      "type": "range",
      "id": "button_border_radius",
      "min": 0,
      "max": 24,
      "step": 2,
      "unit": "px",
      "label": "Button border radius",
      "default": 8
    }
  ],
  "blocks": [],
  "presets": [
    {
      "name": "Discount code generator"
    }
  ]
}