claim-badge

Renders the four-badge claim-type row with the page's claim_type highlighted. Single macro.

Updated 2026-08-23

On this page

macros/claim-badge.html renders the four-badge claim-type row that appears next to page titles. The macro is the single entry point for the claim badge UI — every template that wants to surface claim type calls this macro.

Source: themes/bifrost/templates/macros/claim-badge.html

Public API#

{%/* import "macros/claim-badge.html" as claim_badge */%}

{{ claim_badge::render(claim_type=page.extra.claim_type | default(value="")) }}

Parameters#

ParamTypeRequiredDefaultWhat
claim_typestringyes""One of direct / framework / inferred / speculative. Empty renders the row with no active badge.
legendboolnofalseIf true, renders the four-row “what each type means” legend used on the landing page (§6) instead of the badge row.
langstringno"en"Language code for the tooltip descriptions.

Why one macro for both modes#

The badge tooltip body (shown on individual entry pages) and the landing-page legend share the same descriptions — keeping them in one macro means the two surfaces can never drift apart. Both source their text from the same four trans() keys (claimBadgeDirectDesc, …FrameworkDesc, …InferredDesc, …SpeculativeDesc).

Edit this page on GitHub