{%- from 'pipeline.html' import pipeline -%}
<!DOCTYPE html>
<html>
<head>
    <title>GoCD Dashboard</title>
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='materialize/css/materialize.css') }}" />
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}" />
    <link rel="shortcut icon" href="{{ url_for('static', filename='gocd.ico') }}"/>
</head>
<body>
    <nav class="deep-purple lighten-1">
        <div class="nav-wrapper">
            <a href="/" class="brand-logo center">GoCD Dashboard</a>
        </div>
    </nav>

    {%- for group_batch in groups|batch(4) %}
        <div class="row">
            {%- for group in group_batch %}
                <div class="col s12 m6 l3">
                    <div class="section">
                        <h3 class="header center">{{ group.name }}</h3>
                        {%- for p in group.pipelines %}
                            {{ pipeline(p, group.passed()) }}
                        {%- endfor %}
                    </div>
                </div>
            {%- endfor %}
        </div>
    {%- endfor %}
</body>
</html>
