Table Of Contents

Introduction

Quick Start

  1. Download the latest release on getheinz.com.
  2. Open the included index.html file.
  3. Fill it with your content.
  4. And that’s about it — you’re about to come down the stretch and have your very own multimedia story. If you’re unsure about the general structure, keep reading.

Freshness

Heinz is developed for modern browsers only – because the future is awesome.

Although, always be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Still we recommend you to use an autoprefixer. ;)

Documentation

Notice: the switch in the navbar toggles Code Visibility, turn it off to get an idea of what a story example could look like.

Layout

Grid

If you don't like the gray background and boxed look of the design, you can simply remove the boxed CSS class from the body tag and achieve a flat white look.

Heinz is created using a 12-column grid. You can define a separate grid outside of our prepared layout, just make sure to add a class of grid to your parent.

The Children of the grid can vary in width. The class item-span-suffix-columnNumbers defines the behavior of the item. There are different classes to help you manage the breakpoints. The -lg suffix describes the item-span up until the breakpoint for medium screen size, -md up until the small breakpoint -sm up until extra small. To create a fully responsive layout, it is recommended to combine the classes. As an example to create a grid that has 4 items in a row on large screens, 3 items on medium, 2 on small and 1 on extra small, you'd apply 3 clases to your grid item.

<div class="item-span-lg-3 item-span-md-4 item-span-sm-6"></div>

Take a look at the following examples to visualize, try resizing the window to see the behavior.

Grid inside Section

.item-span-8
.item-span-7
.item-span-6
.item-span-5
.item-span-4
.item-span-3
.item-span-2
.item-span-1

Static Grid

item-span-12
item-span-11
item-span-10
item-span-9
item-span-8
item-span-7
item-span-6
item-span-5
item-span-4
item-span-3
item-span-2
item-span-1

Large Grid

item-span-12
item-span-11
item-span-10
item-span-9
item-span-8
item-span-7
item-span-6
item-span-5
item-span-4
item-span-3
item-span-2
item-span-1

Medium Grid

item-span-12
item-span-11
item-span-10
item-span-9
item-span-8
item-span-7
item-span-6
item-span-5
item-span-4
item-span-3
item-span-2
item-span-1

Small Grid

item-span-12
item-span-11
item-span-10
item-span-9
item-span-8
item-span-7
item-span-6
item-span-5
item-span-4
item-span-3
item-span-2
item-span-1

Combined

item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6
item-span-lg-3 item-span-md-4 item-span-sm-6

Sections

While we're at it, let's talk about sections. All of your content is to be placed within a section tag.

If you are working with the boxed layout (as you can see on the Sass Documentation Page) you want to add a class of box to your section to ensure it has a white background and looks right.

There are generally two different types of sections, the default section which spans across 8 of the predefined 12 columns and full-width sections, generally you'll find yourself using the default section for most of your content, however some of our components require to be placed within a full-width section, the Documentation will mention it.

Important to note is that a full-width section cannot be placed inside a default-width section.

We recommend using sections to divide your content into chapters, so don't be afraid to create new sections, when you feel like it makes sense for the content.

<section class="box">
    <h1>A Section talking about one thing</h1>
    <!-- content and components -->
</section>
<section class="box">
    <h1>A Section talking about another thing</h1>
    <!-- content and components -->
</section>
<section class="full-width">
    <h1>A Section that spans across the full width.</h1>
    <!-- content and components -->
</section>

Components

Table Of Contents

This feature requires JavaScript.

Heinz includes an automatic Table of Contents, that'll read all headings up until h3 and list them. All you need to do is include a div-container for it.

If you want a header not to show up in the Table Of Contents (like the Table of Contents Title) all you do is add a no-toc class to the heading.

<div class="toc">
    <h1 class="no-toc">Table Of Contents</h1>
</div>

This feature requires JavaScript.

The Navbar in our example consists of the Navigation as well a visual representation of the sections and a progressbar.

We recommend placing this Code in the <header>

You can see and example of what the navbar looks like at the top of this page. It is fixed and responsive, and will collapse into an off-canvas menu on small screens.

<nav class="menu boxed">
    <div class="bar">
        <a href="/" class="branding">
            <!-- Brand -->
        </a>
        <span class="nav-toggle">
            <div class="hamburger">toggle menu</div>
        </span>

        <!-- Navigation Code Here -->
    </div>

    <!-- Progressbar Code Here -->
</nav>

On the left, you'll include all brandings. We planned for it to consist of a small logo as well as a short title.

<a href="/" class="branding">
    <img src="icon.svg">
    <span>Story Title</span>
</a>

On the right, you have the option to include a list of links. The Menu comes with a dropdown option.

Don't forget to include the nav-toggle and include the js-file to make sure the menu will work responsively and that the dropdowns will open up.

<ul>
    <li><span class="nav-toggle"><div class="ex">close</div></span></li>
    <li><a href="#">Item</a></li> <!-- normal Item -->
    <li class="dropdown"> <!-- dropdown Item -->
        <span>parent</span>
        <ul>
            <li><a href="#">Child</a></li>
            <li><a href="#">Child</a></li>
            <li><a href="#">Child</a></li>
        </ul>
    </li>
    <li><a href="#">Item</a></li>
</ul>

Progressbar

The progressbar is a visual representation of all sections within a document. It is created using JavaScript.

<div class="scrollspy-wrapper display-titles">
    <div class="scrollbar"></div>
</div>

There are two different versions of the progressbar, a minimal one, without titles and one with titles displayed (Refer to the Sass Docs to see those in action).

To toggle the title display all you have to do is to add or remove display-titles from the wrapper classes.

The title that is displayed can be defined using a data-attribute within the section tag, or represents the first heading within the section.

<section data-section-title="Progressbar Title">
    <!-- Content -->
</section>

Text Classes

We've baked some text styling for you.

Headings

Headings are automatically styled and can be automatically numbered. To enable numbered headings all you do is add the numbered class to the parent. If you only want the headings within a specific section, add the class to the section, if you want the whole document to have numbered headings, add the class to the body tag.

<section class="numbered">
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6</h6>
    <h1>Heading 1</h1>
</section>

Heading 1

Heading 2

Heading 3

Heading 3

Heading 4

Heading 5
Heading 6

Heading 1

Paragraph Styles

For your running text:

<p class="text-lead">This is very useful for a  lead text , that follows a heading and begins an article</p>
<p class="text-left">This paragraph has left text alignment.</p>
<p class="text-right">This paragraph has  right text alignment</p>
<p class="text-center">This paragraph has centered text</p>
<p class="text-justify">The text in here is justified, so if it spans across multiple lines it won't have jagged edges.</p>
<p class="text-hyphen">This paragraph has hyphenated text, which is enabled by default within paragraphs, but if you want to enable it on other containers, use it.</p>
<p class="text-no-hyphen">This paragraph does not hyphenate.</p>
<p class="text-small">This text is smaller than the others.</p>
<p class="text-muted">This paragraph is muted and not as opaque as the others.</p>
<p>In here, we have a <span class="text-highlighted">part of text that is highlighted</span>.</p>

This is very useful for a lead text, that follows a heading and begins an article

This paragraph has left text alignment.

This paragraph has right text alignment

This paragraph has centered text

The text in here is justified , so if it spans across multiple lines it won't have jagged edges.

This paragraph has hyphenated text, which is enabled by default within paragraphs, but if you want to enable it on other containers, use it.

This paragraph does not hyphenate.

This text is smaller than the others.

This paragraph is muted and not as opaque as the others.

In here, we have a part of text that is highlighted.

Lists

Heinz supports lists as well

<ul>
    <li>An Unordered List</li>
    <li>With just a few</li>
    <li>Bulletpoints</li>
</ul>
<ol>
    <li>And an ordered List</li>
    <li>Where all Items</li>
    <li>Are Numbered.</li>
</ol>
  1. And an ordered List
  2. Where all Items
  3. Are Numbered.

Blockquote

For using a blockquote, enter the following code. Fill in your text between <blockquote> and <span>. The source you can add into <span></span>

<blockquote>
    <p>"Have no fear of perfection,
    you'll never reach it"</p>
   <span>Salvador Dali</span>
</blockquote>

"Have no fear of perfection, you'll never reach it"

Salvador Dali

Image

There are four image formats defined.

Copy the code and paste it within a <section>. Add the source of your picture into <img src="">.

Image content-width

<figure class="content-wide">
    <img src="media/image.jpg" alt="image">
    <figcaption>
        Image Caption
    </figcaption>
</figure>
Image width of content
Image with content-width, source

Oversized image

<figure class="oversized">
    <img src="media/image.jpg" alt="image">
    <figcaption>
        Image Caption
    </figcaption>
</figure>
Oversized
Image with content-width, source

Oversized image with textoverlay

<div class="oversized textoverlay">
    <img src="media/image.jpg" alt="image">
    <div class="overlay-content">This is overlay text</div>
</div>
image oversized
This is overlay text

Full width image

Copy the code and paste this into the <main>.

Be careful, for adding a full-width image you need to create a new section. Close the preceding section, add the code for the full width image and start a new section for the following code. Add the source of your picture into <img src="">.

<section class="full-width">
    <figure>
        <img src="media/image.jpg" alt="image full width">
        <figcaption>
                full width image caption
        </figcaption>
    </figure>
</section>
image full width
full width image source

Slider

This feature requires JavaScript.

We offer you fully prepared responsive sliders in two sizes. Content width and oversized. The Slider has images as background-image and also navigators in spans. Those are enabled automatically in js. Just copy the snippet into a section and enter the URL in url(media/) and src="media/" of your images.

Slider content-width

<div class="slider-wrap">
  <div class="slider">
      <div style="background-image: url(media/img1.jpg)"><img src="media/img1.jpg" alt="slide 1"></div>
      <div style="background-image: url(media/img2.jpg)"><img src="media/img2.jpg" alt="slide 2"></div>
      <div style="background-image: url(media/img3.jpg)"><img src="media/img3.jpg" alt="slide 3"></div>
  </div>
  <span class="navigator toggle-next">next</span>
  <span class="navigator toggle-prev">prev</span>
</div>
slide 1
slide 2
slide 3
next prev

Slider oversized

Adding class large to the wrapper makes the slider bigger.

<div class="slider-wrap large">
  <div class="slider">
      <div style="background-image: url(media/img1.jpg)"><img src="media/img1.jpg" alt="slide 1"></div>
      <div style="background-image: url(media/img2.jpg)"><img src="media/img2.jpg" alt="slide 2"></div>
      <div style="background-image: url(media/img3.jpg)"><img src="media/img3.jpg" alt="slide 3"></div>
  </div>
  <span class="navigator toggle-next">next</span>
  <span class="navigator toggle-prev">prev</span>
</div>
slide 1
slide 2
slide 3
next prev

Video

There are three kinds of video players. Two are normal players, one with content width and the other one oversized. The third one is a full-width option.

In our examples we work with YouTube Videos since they are the most common embedded videos. If you want to use an HTML5 video, just replace the iframe with the video tag.

Videos need to be wrapped in 2 containers to ensure they scale responsively.

player content-width

<div class="video-wrap">
    <div class="video">
        <iframe src="https://www.youtube.com/embed/YOUTUBEVIDEOID" frameborder="0" gesture="media" allowfullscreen></iframe>
    </div>
</div>

player oversized

Adding class large to the wrapper makes the player bigger.

<div class="video-wrap large">
    <div class="video">
        <iframe src="https://www.youtube.com/embed/YOUTUBEVIDEOID" frameborder="0" gesture="media" allowfullscreen></iframe>
    </div>
</div>

background-video

The third option is a display filling background-video. Autoplay, loop and muted are inclued via URL attributes from the YouTube API. There's an over-video container that darkens the video and adds a grid where you can put a textoverlay.

Be careful, for adding a background-video you need to create a new section. Close the preceding section, add the code for the full width video and start a new section for the following code.

<section class="full-width">
    <div class="video-wrap">
        <div class="video">
            <iframe src="https://www.youtube.com/embed/YOUTUBEVIDEOID?ecver=1&autoplay=1&mute=1&controls=0&loop=1&playlist=6gCd3VUOYWs&modestbranding=1"></iframe>
        </div>
    </div>
    <div class="over-video grid">
        <div class="item-span-8 item-offset-2">
            <h1 class="text-white">Text on top of the video</h1>
        </div>
    </div>
</section>

Text on top of the video

Audio

For inserting audio files, copy the following html. Enter your audio source according to the file type into <source src=""> and the type of your audio file into type="". Unfortunately you can't customize the look of your audio via CSS, because it's not supported by browsers.

<audio controls>
    <source src="audio.mp3" type="audio/mpeg">
    Your browser does not support the audio element.
</audio>

this Sidestory is on the left side and does not open an overlay.

Sidestory

This feature requires JavaScript.

You can add additional sidestories to your website. These are small boxes on the side of your container. We prepared one for the left side and one for the right side. By placing an overlay toggle in the box, an overlay opens where you can add your additional story. The background will be blurred then.

Sidestories require a separate section, the content needs to be placed within a content container and the sidestories either before or after the content. The placement of the sidestory box matters in the responsive view when the content will either be before or after the story.

The overlay can be placed anywhere in the code, we recommend at the end of the document though.

To open an overlay, you need to use the class toggle and a data-attribute referencing the ID of the overlay.

Side

This Story is on the right, and it does open an overlay.


Toggle Overlay

<section class="has-sidestory">
    <div class="sidestory sidestory-left box">
        <p>this Sidestory is on the left side and does not open an overlay.</p>
    </div>
    <div class="content box">
        <p>Sidestory Content</p>
    </div>
    <div class="sidestory sidestory-right box">
        <h2>Sidestory</h2>
        <p>This Story is on the right, and it does open an overlay.</p>
        <br>
        <p class="text-center">
            <span class="toggle" data-toggle-overlay="overlay-1">Toggle Overlay</span>
        </p>
    </div>
</section>

For creating the content of the overlay you need the following code. Again, we like to place it at the end of our code. The overlay can contain any of the components discussed.

<div class="overlay grid" id="overlay-1">
    <section>
        <span class="toggle close">x</span>
        <h1>Overlay Title</h1>
        <p>In this example we just added an image with content-wide. How you can add this picture you learn in chapter "Images"</p>
        <p>You can close this overlay by clicking the x, clicking outside of the content or hitting "Esc" on your keyboard.</p>

        <figure class="content-wide">
            <img src="media/mountains.jpg" alt="Image width of content">
            <figcaption>
                Image with content-width, <a href="https://unsplash.com/photos/gdE-5Oui1Y0"> source</a>
            </figcaption>
        </figure>
    </section>
</div>

Creators

Myriam Frisano
Sebastian Hubacher
Nadia Etter
Pascal Lüthi
Kyle Smith
Kim Schläpfer

Copyright and License

Heinz is released under MIT.

x

Overlay Title

In this example we just added an image with content-wide. How you can add this picture you learn in chapter "Images"

You can close this overlay by clicking the x, clicking outside of the content or hitting "Esc" on your keyboard.

Image width of content
Image with content-width, source