Design System · Activity

Activity Cards

All card types and a live grid for selecting layouts on the homepage

Layout and content page: the same classes and scripts are used here as in the section on the homepage. Change the font and theme in the panel on the right; narrow the window, and the grid will recalculate. The text in the card headers is just placeholder text; you can remove it when previewing.

How to Use

First, select a type (stack, horizontal, compact, decor), then data-mp-cells (1–4) and the order li in the list. Cards with data-mp-extra do not affect the height of the list until the “Show All” button is clicked. For more details, see docs/mini-projects-cards.md.

Card Types

On the left is an example of a text card; on the right is the type name and an explanation of the classes.

Stack with a link. Full-width preview, text at the bottom. For an external link: mp-card--link and mp-card__ext in the title (as in the "Experience" block).

mp-card--stack without a link

Stack without a link

  • note

A collection of databases and a rollup for a weekly overview, for personal use only.

Stack without a link. Same view. Wrapper div or article, without mp-card--link.

Horizontal with a link. Thumbnail on the left, text on the right. On a narrow screen, the card stacks vertically.

mp-card--horizontal No link

Horizontal without a link

  • Template

Static website with a schedule and an application form on a separate service.

Horizontal without a link. Same layout; the card does not link to an external URL.

Compact with a link. Text only, no mp-card__media. In the grid, often with data-mp-cells="1".

mp-card--compact no link

Compact without a link

  • document

Markdown checklist before releasing minor UI changes.

Compact without a link. A short note or checklist without an external link.

mp-card--decor

Decorative cell. A placeholder in the grid, with no project or link. Inside span.mp-card__decor-pattern.

Width in Cells

Attribute data-mp-cells sets li.mini-projects-grid__item specifies the desired width from 1 to 4 cells. The script will not allow the card to be wider than the current row.

For responsive width, use data-mp-cells-sm (for 4 cells per row, ≥ 880 px) and data-mp-cells-xs (for 2 cells, ≥ 520 px). The script selects the value based on the current number of cells in a row.

The When to use Example
data-mp-cells Wide screen (6 cells, ≥ 1180 px) data-mp-cells="3"
data-mp-cells-sm Medium screen (4 cells, ≥ 880 px) data-mp-cells-sm="2"
data-mp-cells-xs Narrow screen (2 cells, ≥ 520 px) data-mp-cells-xs="1"

Example: data-mp-cells="3" data-mp-cells-sm="2" — A card takes up 3 cells on a wide screen, 2 on a medium screen, and 1 on a narrow screen.

≥ 1180 px — 6 cells

3
3
2
2
2
1
2
3
4
2

≥ 880 px — 4 cells

3
1
2
2
1
2
2
4

≥ 520 px — 2 cells

1
1
2
2
1
1
The number in the block = the value data-mp-cells. The card occupies that many cells in a row. On a narrow screen, there are fewer cells—cards with a width greater than the number of cells are carried over to the next row. As data-mp-cells-sm / data-mp-cells-xs the card changes its width when the view is narrowed.
List width Cells per row
≥ 1180px 6
≥ 880px 4
≥ 520px 2
already 1 (entire row)

A pair on six cells 3 + 3 or a trio 2 + 2 + 2 usually looks neater than a random set. Decor (mp-card--decor) fills in the gaps in the grid.

Live masonry grid

A demo of the “Activity” block from the homepage: here, all card types are in a single live grid. Each card’s caption shows the type of layout and data-mp-cells. Change the window width and font in the theme panel, watch how the grid rearranges itself, and apply the best layout to the homepage.

  1. [2] stack · link

    • website

    A base pair in a row of six cells.

  2. [2] stack

    • note

    Stack without an external link.

  3. [2] horizontal

    • utility

    Horizontal, two cells wide, without a link.

  4. [2] compact

    • template

    A two-cell text card.

  5. [1] compact · link

    • cli

    A narrow column with a link.

  6. [1] compact

    • document

    Compact, one cell wide.

  7. [3] stack · link

    • Appendix

    Half of a six-cell row. A longer description to check for line breaks and height after changing the font.

  8. [3] horizontal · link

    • plugin

    Wide horizontal: preview and text in a single column.

  9. [3] horizontal

    • widget

    Three-cell Horizontal, without a link.