Blame progit/templates/render_repo.html

Johan Cwiklinski 63918a
{% macro render_row(items) -%}
Johan Cwiklinski 63918a
    {% for repo in items %}
Johan Cwiklinski db8635
        {% if loop.index == 1 %}
Johan Cwiklinski 63918a
    
Johan Cwiklinski 63918a
        {% endif %}
Pierre-Yves Chibon b3813a
        {% if repo.is_fork %}
Pierre-Yves Chibon b3813a
        {% set url = url_for('view_repo', username=repo.user.username, repo=repo.name) %}
Pierre-Yves Chibon b3813a
        {% else %}
Pierre-Yves Chibon b3813a
        {% set url = url_for('view_repo', repo=repo.name) %}
Pierre-Yves Chibon b3813a
        {% endif %}
Johan Cwiklinski 7475e2
        
Pierre-Yves Chibon b3813a
            href="{{ url }}"
Johan Cwiklinski 7475e2
            style="background-image: url({{ url_for('static', filename='placebo.png') }})">
Johan Cwiklinski 63918a
            {# TODO: get project logo #}
Johan Cwiklinski 63918a
            {{ repo.name }}
Johan Cwiklinski 63918a
            {% if repo.description %}
Johan Cwiklinski 63918a
            {{ repo.description | wraps(20) }}
Johan Cwiklinski 63918a
            {% endif %}
Johan Cwiklinski 63918a
        
Johan Cwiklinski db8635
        {% if loop.last %}
Johan Cwiklinski 63918a
    
Johan Cwiklinski db8635
        {% elif loop.index is divisibleby(3) or loop.last %}
Johan Cwiklinski db8635
    
Johan Cwiklinski db8635
    
Johan Cwiklinski 63918a
        {% endif %}
Johan Cwiklinski 63918a
    {% else %}
Johan Cwiklinski 63918a
    

No project found

Johan Cwiklinski 63918a
    {% endfor %}
Johan Cwiklinski 63918a
{%- endmacro %}
Johan Cwiklinski 63918a
Johan Cwiklinski 63918a
Johan Cwiklinski 68fc44
{% macro render_repos(list, total, page, title, count, id, username=None) %}
Johan Cwiklinski 63918a
<section class="project_list" id="{{ id }}"></section>
Johan Cwiklinski 63918a
        <header></header>
Johan Cwiklinski 68fc44
            {% set title_lvl = 3 if username else 2 %}
Johan Cwiklinski 68fc44
            <h{{ title_lvl="" }}="">{{ title }} ({{ count }})</h{{>
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
        {% if total and total > 1 %}
Johan Cwiklinski 63918a
        <aside></aside>
Johan Cwiklinski 63918a
            
Johan Cwiklinski 63918a
                
Johan Cwiklinski 63918a
                    
Johan Cwiklinski 63918a
                    {% if page > 1%}
Johan Cwiklinski 63918a
                        
Johan Cwiklinski 63918a
                            < Previous
Johan Cwiklinski 63918a
                        
Johan Cwiklinski 63918a
                    {% else %}
Johan Cwiklinski 63918a
                        < Previous
Johan Cwiklinski 63918a
                    {% endif %}
Johan Cwiklinski 63918a
                    
Johan Cwiklinski 63918a
                    {{ page }} / {{ total }}
Johan Cwiklinski 63918a
                    
Johan Cwiklinski 63918a
                        {% if page < total %}
Johan Cwiklinski 63918a
                        
Johan Cwiklinski 63918a
                            Next >
Johan Cwiklinski 63918a
                        
Johan Cwiklinski 63918a
                        {% else %}
Johan Cwiklinski 63918a
                        Next >
Johan Cwiklinski 63918a
                        {% endif %}
Johan Cwiklinski 63918a
                    
Johan Cwiklinski 63918a
                
Johan Cwiklinski 63918a
            
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
        {% endif %}
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
            {{ render_row(list) }}
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
    
Johan Cwiklinski 63918a
{% endmacro %}
Johan Cwiklinski 63918a
Johan Cwiklinski 63918a
Johan Cwiklinski 63918a
{% macro repos_switch(all = True) %}
Johan Cwiklinski 63918a
    <aside class="show_parts"></aside>
Johan Cwiklinski 160732
        
Johan Cwiklinski 160732
            {% if all %}My repos:{% else %}Repos:{% endif %}
Johan Cwiklinski 160732
        
Johan Cwiklinski 63918a
        
Johan Cwiklinski 160732
            <input checked="checked" class="switch-input" id="myreposon" name="{% if all %}my{% endif %}repos" type="radio" value="on">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-off" for="myreposon">Show</label>
Johan Cwiklinski 160732
            <input class="switch-input" id="myreposoff" name="{% if all %}my{% endif %}repos" type="radio" value="off">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-on" for="myreposoff">Hide</label>
Johan Cwiklinski 63918a
            
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
        Forks:
Johan Cwiklinski 63918a
        
Johan Cwiklinski 160732
            <input checked="checked" class="switch-input" id="forkson" name="{% if all %}my{% endif %}forks" type="radio" value="on">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-off" for="forkson">Show</label>
Johan Cwiklinski 160732
            <input class="switch-input" id="forksoff" name="{% if all %}my{% endif %}forks" type="radio" value="off">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-on" for="forksoff">Hide</label>
Johan Cwiklinski 63918a
            
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
        {% if all %}
Johan Cwiklinski 63918a
        All repos:
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
            <input checked="checked" class="switch-input" id="reposon" name="repos" type="radio" value="on">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-off" for="reposon">Show</label>
Johan Cwiklinski 63918a
            <input class="switch-input" id="reposoff" name="repos" type="radio" value="off">
Johan Cwiklinski 63918a
            <label class="switch-label switch-label-on" for="reposoff">Hide</label>
Johan Cwiklinski 63918a
            
Johan Cwiklinski 63918a
        
Johan Cwiklinski 63918a
        {% endif %}
Johan Cwiklinski 63918a
    
Johan Cwiklinski 63918a
{% endmacro %}