Skip to content

Block editorial

Sébastien Moulène edited this page May 15, 2023 · 5 revisions

Displays a block with content (title, text, button) on the left and image on the right (possible to reverse the direction). In mobile the image is first.

HTML

https://github.com/hugolify/hugolify-theme/blob/main/layouts/partials/blocks/templates/editorial.html

SASS

https://github.com/hugolify/hugolify-theme/blob/main/assets/sass/components/blocks/_editorial.sass

Frontmatter

blocks:
  - type: editorial
    direction: ""
    title: ""
    text: ""
    cta:
      text: ""
      url:  ""
      blank: false
    image:
      src: ""
      alt: ""

Netlify CMS

  • editorial object
    • direction select
      • ltr
      • rtl
    • title string
    • text markdown
    • button object
      • text string
      • url string
      • blank boolean
    • image object
      • src image
      • alt string

Params

Image size

params:
  blocks:
    editorial:
      desktop: "624x"
      mobile: "336x"