% rebase('frame.tpl')
% import random
<div class="content-grid">
    <div class="title">
        <h1>species </h1>
    </div>
    <div class="ocs-nav">
        % for o in species:
            <a href="/species/{{o}}">
                <img src="/static/img/species/{{o}}/nav.png" alt="(link: {{o}})">
            </a>
        % end  
    </div>
    <div class="profile">
        <div class="name">
            <h2>{{!name}} </h2>
        </div>
        <div class="label">
            {{!profile[0]}}
        </div>
        <div class="basics">
            <h2>basics </h2>
            {{!profile[1]}}
        </div>    
        <div class="story">
            <h2>story </h2>
            {{!profile[2]}}
        </div>
        <div class="desc">
        <h2>description </h2>
            {{!profile[3]}}
        </div>
    </div>
    <div class="portrait">
        <div style="background-image: url(/static/img/species/{{name}}/portrait.png); height: 100%; background-repeat: no-repeat; background-position: bottom left;"></div>

    </div>
    <div class="gallery-div"><h2>gallery </h2><div class="gallery">
        % if len(gallery) >=2:
        % for g in gallery[2]:
        % i = g[0].index('.')
        % thumb = g[0][:i] + 'thumb' + g[0][i:]
        <div class="galitem">
            <a target="_blank" href="/static/img/species/{{gallery[0]}}/{{g[0]}}">
                <img src="/static/img/species/{{gallery[0]}}/{{thumb}}" alt="Image: {{g[1]}}">
                <div class="subtitle">{{g[1]}}</div>
            </a>
        </div>
        % end
        % end
    </div></div>
</div>