{% extends "regulations/base.html" %}
{% load static from staticfiles %}

{% comment %}
    Replaces application's loaded scripts and styles with just styles.
{% endcomment %}
{% block app_js %}
        {% if EREGS_GLOBALS.ENV == 'built' %}
        <link rel="stylesheet" href="{%static "regulations/css/regulations.min.css" %}"/>
        {% else %}
        <link rel="stylesheet" href="{%static "regulations/css/style.css" %}"/>
        {% endif %}
        {% block headscripts %}
        {% endblock %}
{% endblock %}

{% comment %}
    Universal application landing page
{% endcomment %}

{% block title %}eRegulations{% endblock %}

{% block body %}
<header id="site-header" class="reg-header">
    {% include "regulations/main-header.html" %}
</header>

<div class="landing-content">

{% block hero %}
<div class="hero">
    <div class="inner-wrap group">
      <div class="primary">
        <h2 class="hero-header">A platform to read regulations.</h2>
        <p class="hero-text">eRegulations makes regulations easier to find, read, and understand.</p>

        <p class="read-more-link"><a href="{% url 'about' %}" class="go">About eRegulations</a></p>
      </div>
    </div> <!-- /.inner-wrap -->
</div> <!-- /.hero -->
{% endblock %}

<div class="landing-main" role="main">
  <div class="inner-wrap">

    <div class="group">
      <div class="content-primary column-l bump">
        {% block regulations-title %}
        <h2 class="small-header light-header">
            {% block cfr_title %}Title {{cfr_title_number|upper}} {{cfr_title_text}}{% endblock %}
        </h2>
        {% endblock %}

        {% block reg-list %}
        <ul class="reg-list">
            {% for regulation in regulations %}
                <li>
                    <a href="{% url 'regulation_landing_view' regulation.part %}">
                        <span class="title-num">{{regulation.part}}</span>
                        <div class="reg-sub-title">
                            {% if regulation.meta.reg_letter %}
                                <span class="reg-major-text">Regulation {{regulation.meta.reg_letter}}</span>
                                <span class="reg-title">{{regulation.meta.statutory_name|title}}</span>
                            {% else %}
                                <span class="reg-major-text">{{regulation.meta.statutory_name|title}}</span>
                            {% endif %}
                        </div>
                        <span class="cf-icon cf-icon-right-round"></span>
                    </a>

                    {% for amendment in regulation.amendments %}
                        <div class="mini-alert important">
                            New amendment effective {{amendment.by_date|date:'n/j/Y'}}
                            <a href="{% url 'chrome_section_view' regulation.reg_first_section amendment.version %}" class="go">View new amendment</a>
                        </div>
                    {% endfor %}
                </li>
            {% endfor %}
        </ul>
        {% endblock %}

        {% block moreregulations %}
        {% endblock %}
      </div> <!-- /.primary -->

        {% block secondcolumn_notices %}
        {% endblock %}
    </div> <!-- /.group -->

      {% block about-eregs %}
      <section class="about bump group">
        <h2 class="light-header">About eRegulations</h2>
        <div class="content-primary column-l">

          <p>eRegulations is a web-based tool that makes regulations easier
          to find, read and understand with features such as inline
          official interpretations, highlighted defined terms, and a
          revision comparison view.</p>

          <p><a href="{% url 'about' %}" class="go">Learn more about eRegulations&#8217; features</a></p>
        </div> <!-- /.primart -->

        {% block orgcontact %}
        {% endblock %}

        {% block legal %}
        {% endblock %}
      </section> <!-- /.about -->
      {% endblock %}
  </div> <!-- /.inner-wrap -->
</div> <!-- /.landing-main -->

</div> <!-- /.landing-content -->

{% include "regulations/full_footer.html" %}

{% block endscripts %}
{% endblock %}

{% endblock %}
