Skip to main content
brickwork
GitHub Log in Get started
Display
Theme
Density
Direction
Brand

Documentation

Bio

A compact author or practitioner strip for an article footer or short about band.

All components Marketing Brickwork 4.3.1

Try it

Article author

Open full-page preview

A concise author block.

Use for a small person attribution. Use portrait for a full marketing person section and testimonial for a quote.

Use it

Working invocation

This code creates the configuration shown above. Copy the template and the required Python context together.

templates/your_app/component.html

Django template

{% include "brickwork_marketing/components/_bio.html" %}

your_app/views.py

Python

context = {'name': 'Avery Morgan', 'role': 'Design systems lead', 'body': 'Builds accessible interfaces.', 'profile': {'label': 'View profile', 'url': '/people/avery/'}}

Guide

Add it to your project

  1. Use the public include path "brickwork_marketing/components/_bio.html" from the installed django-brickwork package.
  2. Include the template where the article footer or small about strip belongs.
  3. Provide one or more content fields; an entirely empty bio emits no markup.
  4. Pass image as already-safe portrait HTML and give its image an accessible name.
  5. Use either profile object or flat profile fields; the object takes precedence.

View this component's source for the installed release

Options

Public API

Option Type Default Required Description
image safe HTML Not set No Small square portrait markup. Constraint: Caller owns escaping and must give any image an accessible name.
name string Not set No Displayed person or plan name. Constraint: No additional template constraint beyond the documented type.
role string Not set No Short attribution or position line below the name. Constraint: No additional template constraint beyond the documented type.
body string Not set No Supporting plain-text paragraph. Constraint: No additional template constraint beyond the documented type.
profile object {label, url} Not set No Profile link; takes precedence over flat fields. Constraint: Use either this object or `profile_label` plus `profile_href`. If both are supplied, this object wins.
profile_label string Not set No Visible label for the flat profile link. Constraint: Supply `profile_href` too; ignored when `profile` is present.
profile_href string Not set No Destination for the flat profile link. Constraint: Supply `profile_label` too; ignored when `profile` is present.

Named blocks

Fill these only when you extend the component template. They are not values passed to an include or tag.

Block What it replaces
image Replaces the conditional image slot with authored markup.
name Replaces the displayed name.
role Replaces the role or attribution line.
body Replaces the supporting body content.
profile Replaces the profile-link region.

Behaviour

Accessibility and responsive behaviour

Accessibility
Name is deliberately not a heading; image markup must supply its own accessible name.
Responsive
Horizontal flex row wraps without a breakpoint switch.
Without JavaScript
Static HTML; no JavaScript required.

Need help?

Troubleshooting

The profile link is missing.

Provide both `profile_label` and `profile_href`, or a `profile` object with both `label` and `url`; the object wins when both shapes are passed.

Explore next

Used in examples

Documentation