Перейти к основному содержимому
← 🎨 CSS as a design system·Модуль B3 · Урок 12
ЗаданиеBuild the dashboard. .dashboard: display: grid, grid-template-columns: 200px 1fr, grid-template-rows: 60px 1fr 40px, grid-template-areas: 'top top' 'sidebar main' 'footer footer', min-height: 320px, gap: 8px. .top { grid-area: top; background: #18181B; color: white; }. .sidebar { grid-area: sidebar; background: #f5f5f5; }. .main { grid-area: main; }. .footer { grid-area: footer; background: #18181B; color: white; }. Inside .main, .cards has display: grid, grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)), gap: 12px. Four .card divs in .cards, each padding 16px, background #eef, border-radius 8px.

Завершающий модуль модуля: дашборд в 20 строк

200 XP14 min
Теория

Putting B3 together

A typical SaaS dashboard layout — built with grid-template-areas + auto-fit cards inside main. Same layout in Bootstrap 3 was ~200 lines of nested rows/cols. Here it's ~20.

The structure:

  • Topbar (full width)
  • Sidebar (left, fixed 200px)
  • Main (fluid; contains a responsive card grid)
  • Footer (full width)

Plus the inner card grid uses auto-fit + minmax so cards reflow at any screen width.

This capstone combines B3 lessons 4 (repeat), 5 (placement via grid-area), 6 (template-areas), 8 (auto-fit + minmax), 9 (place-items).

🔒

Зарегистрируйся чтобы кодить

Теория открыта всем. Интерактивный редактор, живой превью и проверка открываются с 7-дневным бесплатным trial — нужна карта, отмена в любое время.

Регистрация — бесплатный trial →

Первые 10 уроков в каждом треке — бесплатные. Карта не нужна.

← НазадСледующий урок →

Получай один совет по Python или веб-разработке — каждый день в почте

Коротко, без воды, без спама. Отписаться — в один клик.