Skip to the content
Konstruktor UI

Website pieces

First screen of a site

The first screen of a business’s site: a label, the heading, one line that names the work, the number to call set large, a note, the actions, and a picture or a drawing with its caption. .kui-hero.kui-hero--site with a .kui-split of a ratio inside; or the picture full width above (--above) or behind (--behind).

CSS only

Examples

Words and a drawing, three parts to two

The heading is .kui-h1 .kui-h1--hero: 34 pixels on a phone, 64 on a wide screen. The number is a tel: link set as .kui-figure. On a phone the large number gives way to a full-width call button (.kui-wide-only and .kui-phone-only), and the drawing comes after the words. On a real page the heading is the page’s <h1>.

Pekara u Žablju

Hleb iz peći na drva, svako jutro

Hleb, kifle i torte po porudžbini. Dostavljamo kafićima i prodavnicama u opštini.

Pozovite 021 123 4567
Pozovite 021 123 4567

Otvoreno svaki dan od 6 do 14 časova.

Crtež. Fotografije pekare stižu uskoro.
HTML
<section class="kui-hero kui-hero--site" lang="sr-Latn" aria-labelledby="site-hero-1">
  <div class="kui-container kui-split kui-split--3-2 kui-split--from-lg">
    <div class="kui-hero__text">
      <p class="kui-eyebrow kui-eyebrow--brand">Pekara u Žablju</p>
      <h2 class="kui-h1 kui-h1--hero" id="site-hero-1">Hleb iz peći na drva, svako jutro</h2>
      <p class="kui-hero__lead">Hleb, kifle i torte po porudžbini. Dostavljamo kafićima i prodavnicama u opštini.</p>
      <div class="kui-hero__figure kui-wide-only">
        <span class="kui-eyebrow kui-eyebrow--brand">Pozovite</span>
        <a class="kui-figure" href="tel:+381211234567">021 123 4567</a>
      </div>
      <a class="kui-button kui-button--primary kui-button--xl kui-button--block kui-phone-only" href="tel:+381211234567"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#phone"></use></svg><span>Pozovite 021 123 4567</span></a>
      <p class="kui-hero__note"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#clock"></use></svg><span>Otvoreno svaki dan od 6 do 14 časova.</span></p>
      <div class="kui-hero__actions">
        <a class="kui-button kui-button--primary kui-button--lg kui-wide-only" href="#site-hero-order">Naručite tortu</a>
        <a class="kui-button kui-button--outline kui-button--lg" href="#site-hero-way"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#map-pin"></use></svg><span>Kako do nas</span></a>
      </div>
    </div>
    <figure class="kui-hero__picture">
      <svg class="kui-drawing" viewBox="0 0 120 90" aria-hidden="true" focusable="false"><path class="kui-drawing__quiet" stroke-width="2" d="M8 80h104"/><path class="kui-drawing__fill" stroke-width="3" d="M20 74c-6-22 8-44 40-44s46 22 40 44z"/><path stroke-width="3" d="M42 40c-4 8-5 16-4 24M60 36c-3 9-3 19-1 28M78 40c-1 9 0 17 3 24"/></svg>
      <figcaption>Crtež. Fotografije pekare stižu uskoro.</figcaption>
    </figure>
  </div>
</section>

The picture behind, the words on a panel

.kui-hero--behind lays the picture behind and the words on a panel of the page colour, so their contrast never depends on the picture. The caption stays readable in a corner.

Crtež dostavnog vozila

Dostava

Pre sedam ujutru, na vratima

Kafići i prodavnice dobijaju hleb pre otvaranja.

HTML
<section class="kui-hero kui-hero--site kui-hero--behind" lang="sr-Latn" aria-labelledby="site-hero-2">
  <figure class="kui-hero__picture">
    <svg class="kui-drawing" viewBox="0 0 120 90" aria-hidden="true" focusable="false"><path class="kui-drawing__quiet" stroke-width="2" d="M8 80h104"/><path class="kui-drawing__fill" stroke-width="3" d="M14 34h56v38H14zM70 46h20l14 14v12H70z"/><circle class="kui-drawing__fill" cx="34" cy="74" r="7" stroke-width="3"/><circle class="kui-drawing__fill" cx="88" cy="74" r="7" stroke-width="3"/><path stroke-width="3" d="M26 50h30M26 58h20"/></svg>
    <figcaption>Crtež dostavnog vozila</figcaption>
  </figure>
  <div class="kui-container">
    <div class="kui-hero__panel kui-hero__text">
      <p class="kui-eyebrow kui-eyebrow--brand">Dostava</p>
      <h2 class="kui-h1 kui-h1--hero" id="site-hero-2">Pre sedam ujutru, na vratima</h2>
      <p class="kui-hero__lead">Kafići i prodavnice dobijaju hleb pre otvaranja.</p>
      <div class="kui-hero__actions"><a class="kui-button kui-button--primary kui-button--lg" href="#site-hero-deliver">Dogovorite dostavu</a></div>
    </div>
  </div>
</section>

Classes and attributes

.kui-hero--site
The first screen of a public site: its own vertical space, the parts below.
.kui-hero__text
The column of label, heading, lead, figure, note and actions.
.kui-hero__lead
One line that names the work, in the text colour, a step larger than body text.
.kui-hero__figure
A large figure (.kui-figure) with its small label above it.
.kui-hero__note
A short line under the figure: the hours, or that hours are not published yet, with an icon.
.kui-hero__actions
The row of actions; full width on a phone.
.kui-hero__picture, --bare
A figure with a picture or a drawing and its caption, on the band surface; --bare drops the surface.
.kui-hero--above
The picture full width above the words, cut to 21 by 9.
.kui-hero--behind, .kui-hero__panel
The picture behind; the words on a panel of the page colour.

Accessibility

  • The heading is the page’s only h1; the label above it is a paragraph, never a heading.
  • The number is a tel: link, so a phone calls it; its text is the number, which a screen reader reads.
  • Text never lies on the picture: behind a picture, the words sit on a panel of the page colour.
  • A drawing that only decorates is aria-hidden; a picture that says something has alt text.

Do and do not

Do

  • Put the number to call and the hours in the first screen.
  • Use the business’s own pictures, or drawings until there are some.

Do not

  • Do not show a stock photograph as if it were the business, its people or its customers.
  • Do not float badges or counters over the picture.