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>
Pierre-Yves Chibon dcf26d
        
Johan Cwiklinski 160732
        
Johan Cwiklinski 160732
            {% if all %}My repos:{% else %}Repos:{% endif %}
Johan Cwiklinski 160732
        
Pierre-Yves Chibon dcf26d
Pierre-Yves Chibon dcf26d
            <label class="switch"></label>
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon 0c2f42
                    name="{% if all %}my{% endif %}repos" checked>
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
            
Johan Cwiklinski 63918a
        Forks:
Pierre-Yves Chibon dcf26d
            <label class="switch"></label>
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon 0c2f42
                    name="{% if all %}my{% endif %}forks" checked>
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
            
Johan Cwiklinski 63918a
        {% if all %}
Johan Cwiklinski 63918a
        All repos:
Pierre-Yves Chibon dcf26d
            <label class="switch"></label>
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
                    name="repos" id="allrepos" checked />
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
                
Pierre-Yves Chibon dcf26d
            
Johan Cwiklinski 63918a
        {% endif %}
Pierre-Yves Chibon dcf26d
        
Johan Cwiklinski 63918a
    
Johan Cwiklinski 63918a
{% endmacro %}