Blob Blame Raw
{% extends "master.html" %}

{% block title %}Home{% endblock %}
{%block tag %}home{% endblock %}


{% block header %}
    <link rel="stylesheet" type="text/css" media="screen"
        href="{{ url_for('static', filename='toggle.css') }}"/>
{% endblock %}

{% from "render_repo.html" import render_repos %}
{% from "render_repo.html" import repos_switch %}

{% block content %}
    {% if username %}
        <h2>
            {{ username | avatar(36) | safe }} {{ username }}
            {% if g.fas_user and g.fas_user.username == username %}
                <a class="user_settings" href="{{ url_for('user_settings') }}"
                   title="Update your settings">
                  Settings
                </a>
            {% endif %}
        </h2>
        {{ repos_switch() }}
        {{ render_repos(
            user_repos, total_page_repos, repopage,
            'My Projects', user_repos_length, 'myrepos', username) }}
        {{ render_repos(
            user_forks, total_page_forks, forkpage,
            'My Forks', user_forks_length, 'myforks', username) }}
    {% endif %}
    {{ render_repos(
        repos, total_page, page,
        'All Projects', repos_length, 'repos', username) }}
{% endblock %}

{% block jscripts %}
    {{ super() }}
    {% if username %}
    <script type="text/javascript">
        $(function(){
            $('.show_parts input[type="checkbox"]').change(function(){
                $('#' + $(this).attr('name')).toggle();
            });
        });
    </script>
    {% endif %}
{% endblock %}