{% extends "base.html" %}

{% load humanize %}

{% block sub-header %}{% endblock %}
{% block keyboard-shortcuts %}{% endblock %}
{% block inline-js %}{% endblock %}
{% block snipt-templates %}{% endblock %}
{% block preload %}{% endblock %}
{% block main-edit %}{% endblock %}
{% block body-class %}homepage{% endblock %}
{% block html-class %}homepage{% endblock %}
{% block css %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap-responsive.min.css" />
{% endblock %}

{% block header %}
    <header class="main">
        <div class="container">
            <div class="row">
                <h1 class="main-logo span2">
                    <a href="/">snip<span>t</span></a>
                </h1> 
                <nav class="span6 offset4">
                    <ul>
                        {% if request.user.is_authenticated %}
                            <li>
                                <a href="/{{ request.user.username }}/">My snipts</a>
                            </li>
                        {% endif %}
                        <li>
                            <a href="/public/">Public snipts</a>
                        </li>
                        <li>
                            <a href="/search/">Search</a>
                        </li>
                        {% if not request.user.is_authenticated %}
                            <li>
                                <a class="button" href="/login/">Log in</a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>
            <div class="row">
                <div class="sub span12">
                    <h2>Code snippets for teams.</h2>
                    <h3>Store, share, blog, learn.</h3>
                </div>
            </div>
        </div>
    </header>
{% endblock %}
{% block main %}
    <section class="coders">
        <div class="container">
            <div class="row">
                <div class="span12">
                    <h4>{{ users_count|intcomma }} coders in over 120 countries have stored {{ snipts_count|intcomma }} snipts, in 145 languages.</h4>
                </div>
            </div>
        </div>
        {% if request.user.is_authenticated %}
            <a href="/{{ request.user.username }}/" class="button">My snipts</a>
        {% else %}
            <a href="/signup/" class="button">Sign up</a>
        {% endif %}
        <div class="faces group">
            <div class="inner">
                {% for coder in coders %}
                    <a href="/{{ coder.username }}/" title="{{ coder.username }}">
                        <img alt="{{ coder.username }}" title="{{ coder.username }}" src="https://secure.gravatar.com/avatar/{{ coder.email_md5 }}?s=50" />
                    </a>
                {% endfor %}
            </div>
        </div>
    </section>
    <section class="features">
        <div class="container">
            <div class="row">
                <header class="span4 offset4">
                    <h1>For teams or individuals</h1>
                </header>
            </div>
            <div class="feature row share">
                <div class="inner">
                    <h2>Team accounts</h2>
                    <p>
                      Sign up for a <a href="/for-teams/">Team</a> account and allow your team members to create and
                      edit private and public code snippets. Search through all your team's snippets, and
                      view detailed diffs of changes to each snippet.
                    </p>
                </div>
            </div>
            <div class="feature row blog">
                <div class="inner">
                    <h2>Personal accounts</h2>
                    <p>
                      Individuals can post public snippets for free. <a href="/pro/">Go Pro</a> for only $5/mo and mark snippets as
                      <code>private</code>, making them perfect for storing and organizing code you never want to
                      forget. All <a href="/for-teams/">team</a> members are automatically granted
                        <span class="pro">Pro</span> accounts.
                    </p>
                </div>
            </div>
            <div class="feature row store">
                <div class="inner">
                    <h2>Code-focused blogs</h2>
                    <p>
                      <a href="/blogging/">A full blog in seconds</a>: mark a snipt as "Blog Post", and it'll
                      appear on <code>{your-username}.snipt.net</code>. Markdown support built-in. Your domain, or ours.
                    </p>
                </div>
            </div>
        </div>
    </section>
    <section class="features">
      <div class="container">
        <div class="row">
          <header class="span4 offset4">
            <h1>See it in action</h1>
          </header>
        </div>
        <div class="video-container">
          <video controls loop autoplay src="{{ STATIC_URL }}/video/demo.mp4">
            <source src="{{ STATIC_URL }}/video/demo.mp4" type="video/mp4">
            {# <source src="movie.ogg" type="video/ogg"> #}
            Your browser does not support the video tag.
          </video>
        </div>
      </div>
    </div>
  </section>
{% endblock %}
