{% extends 'layout.twig' %} {% set title %}Piwik UI demo{% endset %} {% block head %} {{ parent() }} {% endblock %} {% block root %}

{{ title }}

This page is intended to show all the UI components and styles available to use in Piwik.

Containers

All HTML should be in a container:

Read more about Bootstrap's containers.

Grid system

Bootstrap's grid system allows to organize the content in columns, all the while staying responsive for smaller screens.

.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-1
.col-md-8
.col-md-4
.col-md-4
.col-md-4
.col-md-4
.col-md-6
.col-md-6

Read more about Bootstrap's grid system.

Typography

h1. heading

h2. heading

h3. heading

h4. heading

h5. heading
h6. heading

This is a paragraph, and this is a link.

Another paragraph, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Alignment classes

Left aligned text.

Center aligned text.

Right aligned text.

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>

Lists

<ul>
  <li>...</li>
</ul>

Buttons

Link
<a class="btn" href="#">Link</a>
<input type="button" class="btn" value="Input">
<input type="submit" value="Submit">
<button type="submit">Button</button>
Large button
<button class="btn btn-lg">Large button</button>
<a class="btn btn-lg" href="#">Large button</a>
<a class="btn btn-block" href="#">Block button</a>
<a class="btn btn-lg btn-block" href="#">Large block button</a>

Link buttons

Link button
<a class="btn btn-link" href="#">Flat button</a>

Flat buttons

Flat button Flat button
<a class="btn btn-flat" href="#">Flat button</a>
<a class="btn btn-flat" href="#"><span class="icon-add"></span></a>
<a class="btn btn-flat btn-lg" href="#">Flat button</a>
<a class="btn btn-flat btn-lg" href="#"><span class="icon-add"></span></a>

Alerts

Info! This alert needs your attention, but it's not super important.
Success! You successfully read this important alert message.
Warning! Better check yourself, you're not looking too good.
Error! Change a few things up and try submitting again.
<div class="alert alert-info">...</div>
<div class="alert alert-success">...</div>
<div class="alert alert-warning">...</div>
<div class="alert alert-danger">...</div>

Read more about Bootstrap's alerts.

Forms

Simple form

Here is more information.
This is a help text that can be used to describe the field. This help text may extend over several lines.
<form action="#">
    <div class="form-group">
        <label for="username">
            Username
        </label>
        <input type="text" id="username" placeholder="Some text here..."/>
    </div>

    <div class="form-group">
        <label for="email">
            Email
        </label>
        <div class="form-help">
            Here is more information.
        </div>
        <input type="email" id="email" placeholder="Some email here..."/>
    </div>

    <div class="form-group">
        <label>
            Report to load by default
        </label>
        <div class="form-help">
            This is a help text that can be used to describe the field.
            This help text may extend over several lines.
        </div>
        <label class="radio">
            <input type="radio" name="defaultReport" value="today">
            Today
        </label>
        <label class="radio">
            <input type="radio" name="defaultReport" value="yesterday">
            Yesterday
        </label>
        <label class="radio">
            <input type="radio" name="defaultReport" value="week">
            Previous 30 days (not including today)
        </label>
    </div>

    <div class="form-group">
        <label for="language">
            Language
        </label>
        <select id="language">
            <option>English</option>
        </select>
    </div>

    <div class="form-group">
        <label for="description">
            Description
        </label>
        <textarea id="description" rows="5"></textarea>
    </div>

    <input type="submit" value="Submit">
</form>

Input group

days
<div class="form-group">
    <label for="foo">
        Input with a text addon
    </label>
    <div class="input-group">
        <input type="text" id="foo" value="180"/>
        <span class="input-group-addon">days</span>
    </div>
</div>

Code

Inline

You can put code in a text using the code tag.

You can put code in a text using the <code>code</code> tag.

Block

Or you can display a code block:

<!-- Piwik -->
<script type="text/javascript">
</script>
<!-- End Piwik Code -->
<pre>...</pre>

Tables

First Name Last Name Username
Mark Otto @mdo
Jacob Thornton @fat
Larry the Bird @twitter
<table>...</table>

Icons

<span class="icon-ok"></span>
{% endblock %}