{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "b-blocks/article-card",
  "title": "Article Card",
  "category": "bBlocks",
  "description": "A single static article, resource, or featured-page preview card — image, category badge, heading, excerpt, optional meta line, and CTA link — in horizontal or vertical layout. No JavaScript required.",
  "keywords": [
    "article",
    "card",
    "resource",
    "read also",
    "featured",
    "preview",
    "link"
  ],
  "textdomain": "b-blocks",
  "attributes": {
    "align": {
      "type": "string",
      "default": ""
    },
    "layout": {
      "type": "object",
      "default": {
        "type": {
          "desktop": "horizontal",
          "tablet": "",
          "mobile": "vertical"
        },
        "alignment": {
          "desktop": "left",
          "tablet": "",
          "mobile": ""
        }
      }
    },
    "image": {
      "type": "object",
      "default": {
        "id": {
          "desktop": 0,
          "tablet": 0,
          "mobile": 0
        },
        "url": {
          "desktop": "",
          "tablet": "",
          "mobile": ""
        },
        "alt": "",
        "objectFit": {
          "desktop": "cover",
          "tablet": "",
          "mobile": ""
        },
        "objectPosition": {
          "desktop": "center",
          "tablet": "",
          "mobile": ""
        },
        "filter": {
          "desktop": {},
          "tablet": {},
          "mobile": {}
        },
        "position": {
          "desktop": "left",
          "tablet": "",
          "mobile": ""
        },
        "splitRatio": {
          "desktop": "40",
          "tablet": "",
          "mobile": ""
        },
        "splitLeft": {
          "desktop": "40%",
          "tablet": "",
          "mobile": ""
        },
        "splitRight": {
          "desktop": "60%",
          "tablet": "",
          "mobile": ""
        }
      }
    },
    "content": {
      "type": "object",
      "default": {
        "badge": "Read Also",
        "heading": "Article title goes here",
        "headingTag": "h3",
        "excerpt": "",
        "meta": "",
        "metaIcon": ""
      }
    },
    "link": {
      "type": "object",
      "default": {
        "url": "",
        "target": false,
        "ctaLabel": "Read More",
        "ctaStyle": "button",
        "cardLinkMode": false
      }
    },
    "badge": {
      "type": "object",
      "default": {
        "align": "left",
        "bg": {
          "type": "solid",
          "color": "#2563eb"
        },
        "color": "#ffffff",
        "padding": {
          "desktop": {
            "top": "3px",
            "right": "10px",
            "bottom": "3px",
            "left": "10px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "margin": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "border": {
          "width": "",
          "style": "solid",
          "color": ""
        },
        "borderRadius": {
          "desktop": {
            "top": "999px",
            "right": "999px",
            "bottom": "999px",
            "left": "999px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        }
      }
    },
    "colors": {
      "type": "object",
      "default": {
        "heading": "#111827",
        "text": "#374151",
        "meta": "#6b7280"
      }
    },
    "heading": {
      "type": "object",
      "default": {
        "background": {
          "type": "solid",
          "color": ""
        },
        "padding": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "margin": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "border": {
          "width": "",
          "style": "solid",
          "color": ""
        },
        "borderRadius": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        }
      }
    },
    "excerpt": {
      "type": "object",
      "default": {
        "background": {
          "type": "solid",
          "color": ""
        },
        "padding": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "margin": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "border": {
          "width": "",
          "style": "solid",
          "color": ""
        },
        "borderRadius": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "default": {
        "color": "#6b7280",
        "iconColor": "#6b7280",
        "bg": {
          "type": "solid",
          "color": ""
        },
        "padding": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "margin": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "border": {
          "width": "",
          "style": "solid",
          "color": ""
        },
        "borderRadius": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        }
      }
    },
    "card": {
      "type": "object",
      "default": {
        "background": {
          "type": "solid",
          "color": ""
        },
        "padding": {
          "desktop": {
            "top": "20px",
            "right": "20px",
            "bottom": "20px",
            "left": "20px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "border": {
          "width": "1px",
          "style": "solid",
          "color": "#e5e7eb"
        },
        "borderRadius": {
          "desktop": {
            "top": "8px",
            "right": "8px",
            "bottom": "8px",
            "left": "8px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "shadow": [
          {
            "hOffset": "0px",
            "vOffset": "1px",
            "blur": "3px",
            "spreed": "0px",
            "color": "rgba(0,0,0,0.12)",
            "isInset": false
          }
        ]
      }
    },
    "cta": {
      "type": "object",
      "default": {
        "normal": {
          "bg": {
            "type": "solid",
            "color": "#2563eb"
          },
          "color": "#ffffff",
          "border": {
            "width": "",
            "style": "solid",
            "color": ""
          },
          "shadow": []
        },
        "hover": {
          "bg": {
            "type": "solid",
            "color": "#1d4ed8"
          },
          "color": "#ffffff",
          "border": {
            "width": "",
            "style": "solid",
            "color": ""
          },
          "shadow": []
        },
        "padding": {
          "desktop": {
            "top": "8px",
            "right": "18px",
            "bottom": "8px",
            "left": "18px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "margin": {
          "desktop": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "borderRadius": {
          "desktop": {
            "top": "6px",
            "right": "6px",
            "bottom": "6px",
            "left": "6px"
          },
          "tablet": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          },
          "mobile": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": ""
          }
        },
        "transition": 0.2
      }
    },
    "typography": {
      "type": "object",
      "default": {
        "heading": {
          "fontSize": {
            "desktop": "18px",
            "tablet": "",
            "mobile": ""
          },
          "fontWeight": "600"
        },
        "excerpt": {
          "fontSize": {
            "desktop": "14px",
            "tablet": "",
            "mobile": ""
          },
          "fontWeight": "400"
        },
        "cta": {
          "fontSize": {
            "desktop": "14px",
            "tablet": "",
            "mobile": ""
          },
          "fontWeight": "600"
        },
        "badge": {
          "fontSize": {
            "desktop": "12px",
            "tablet": "",
            "mobile": ""
          },
          "fontWeight": "600"
        },
        "meta": {
          "fontSize": {
            "desktop": "13px",
            "tablet": "",
            "mobile": ""
          },
          "fontWeight": "400"
        }
      }
    },
    "advanced": {
      "type": "object",
      "default": {
        "dimension": {
          "padding": {
            "desktop": {
              "top": "",
              "right": "",
              "bottom": "",
              "left": ""
            },
            "tablet": {
              "top": "",
              "right": "",
              "bottom": "",
              "left": ""
            },
            "mobile": {
              "top": "",
              "right": "",
              "bottom": "",
              "left": ""
            }
          }
        },
        "borderShadow": {
          "normal": {
            "radius": {
              "top": "",
              "right": "",
              "bottom": "",
              "left": ""
            },
            "shadow": [
              {
                "hOffset": "",
                "vOffset": "",
                "blur": "",
                "spreed": "",
                "color": "#7090b000",
                "isInset": false
              }
            ]
          }
        },
        "background": {
          "normal": {
            "type": "color",
            "color": "rgba(255, 255, 255, 0)",
            "gradient": {
              "type": "radial",
              "radialType": "ellipse",
              "colors": [
                {
                  "color": "rgba(58, 66, 222, 1)",
                  "position": "0"
                },
                {
                  "color": "rgba(176, 195, 235, 1)",
                  "position": "80"
                }
              ],
              "centerPositions": {
                "x": 50,
                "y": 50
              },
              "angel": 90
            },
            "img": {
              "url": "",
              "desktop": {
                "position": "center-center",
                "xPosition": 0,
                "yPosition": 0,
                "attachment": "",
                "repeat": "no-repeat",
                "size": "",
                "customSize": "0px"
              },
              "tablet": {
                "position": "center-center",
                "xPosition": 0,
                "yPosition": 0,
                "attachment": "",
                "repeat": "no-repeat",
                "size": "",
                "customSize": "0px"
              },
              "mobile": {
                "position": "center-center",
                "xPosition": 0,
                "yPosition": 0,
                "attachment": "",
                "repeat": "no-repeat",
                "size": "",
                "customSize": "0px"
              }
            },
            "transition": 0.3
          }
        },
        "transform": {
          "normal": {
            "rotate": {
              "desktop": {
                "z": "",
                "y": "",
                "x": ""
              },
              "tablet": {
                "z": "",
                "y": "",
                "x": ""
              },
              "mobile": {
                "z": "",
                "y": "",
                "x": ""
              },
              "threeDRotate": false
            },
            "offset": {
              "desktop": {
                "x": "",
                "y": ""
              },
              "tablet": {
                "x": "",
                "y": ""
              },
              "mobile": {
                "x": "",
                "y": ""
              }
            },
            "scale": {
              "isProportion": true,
              "desktop": {
                "x": "",
                "y": "",
                "scale": ""
              },
              "tablet": {
                "x": "",
                "y": "",
                "scale": ""
              },
              "mobile": {
                "x": "",
                "y": "",
                "scale": ""
              }
            },
            "skew": {
              "desktop": {
                "x": "",
                "y": ""
              },
              "tablet": {
                "x": "",
                "y": ""
              },
              "mobile": {
                "x": "",
                "y": ""
              }
            },
            "flipX": false,
            "flipY": false
          },
          "hover": {
            "rotate": {
              "desktop": {
                "z": "",
                "y": "",
                "x": ""
              },
              "tablet": {
                "z": "",
                "y": "",
                "x": ""
              },
              "mobile": {
                "z": "",
                "y": "",
                "x": ""
              },
              "threeDRotate": false
            },
            "offset": {
              "desktop": {
                "x": "",
                "y": ""
              },
              "tablet": {
                "x": "",
                "y": ""
              },
              "mobile": {
                "x": "",
                "y": ""
              }
            },
            "scale": {
              "isProportion": true,
              "desktop": {
                "x": "",
                "y": "",
                "scale": ""
              },
              "tablet": {
                "x": "",
                "y": "",
                "scale": ""
              },
              "mobile": {
                "x": "",
                "y": "",
                "scale": ""
              }
            },
            "skew": {
              "desktop": {
                "x": "",
                "y": ""
              },
              "tablet": {
                "x": "",
                "y": ""
              },
              "mobile": {
                "x": "",
                "y": ""
              }
            },
            "flipX": false,
            "flipY": false
          },
          "transition": 200
        }
      }
    }
  },
  "supports": {
    "align": [
      "wide",
      "full"
    ],
    "html": false
  },
  "example": {
    "attributes": {
      "preview": true
    }
  },
  "editorScript": [
    "file:../index.js"
  ],
  "style": "file:./view.css",
  "render": "file:./render.php",
  "viewScript": "file:./view.js"
}