Omnira Docs v1.0.0

Section reference › Demo-specific

BMI calculator "type": "gym-bmi"

A working body-mass-index calculator (metric or imperial) with a colour scale, next to a heading, checklist and buttons. Made for the gym demo; fits any fitness or health site.

Example of the gym-bmi section
The example below, rendered with placeholder images.

Example#

Paste this into the sections list of a page file:

JSON
{
  "type": "gym-bmi",
  "tone": "alt",
  "eyebrow": "Free tool",
  "title": "Check your BMI in 10 seconds",
  "text": "A quick starting point before your first session with a coach.",
  "list": [
    "Metric or imperial units",
    "Instant result, nothing stored",
    "Talk it through at your free assessment"
  ],
  "buttons": [
    {
      "label": "Book a free assessment",
      "href": "free-trial.html",
      "style": "primary",
      "icon": "arrow-right"
    }
  ]
}

Options#

OptionTypeDefaultDescription
eyebrowstring—Small label shown above the title.
titlestring—Section heading. Simple inline HTML such as <em> or <br> is allowed.
textstring—Short intro paragraph under the title.
listarray—Checklist (strings) under the heading.
imagestring—Optional photo under the checklist.
buttonsarray—Buttons shown under the heading. See the button fields below.
notestringBMI is a rough screening measure. It does not account for muscle mass, age or build, so talk to a doctor before making health decisions.Small disclaimer under the result.
heightnumber178Starting height in cm.
weightnumber80Starting weight in kg.
reversebooleanfalsePuts the calculator on the left.

Also accepts the options every section accepts: id, tone, padding, fluid, class, hidden.

Fields of each entry in buttons#

OptionTypeDefaultDescription
labelstring—Button text. A button without a label is not shown.
hrefstring—Link target, e.g. "contact.html" or "#pricing". Defaults to "#".
stylestringprimaryButton look.
Values: primary | outline | light | dark | accent | link
iconstring—Bootstrap Icons name shown after the label (e.g. "arrow-right"). "link" buttons get an arrow automatically.
videostring—YouTube embed URL (https://www.youtube.com/embed/VIDEO_ID). When set, the button opens the video in a pop-up instead of following href.

Tips#

  • The heading is always left-aligned in this section; headAlign is ignored.

Where it's used#

Open these pages in template/ to see it working:

  • Gym & Fitness: template/gym/home-2.html (source src/demos/gym/pages/home-2.json)