{% extends 'rest_framework_swagger/base.html' %}
{% load staticfiles %}
{% load mezzanine_api %}


{% block title %}
{% get_mezzanine_api_doc_title %}
{% endblock %}

{% block style %}
    <link href="//fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet" type="text/css"/>
    <link href="{% static 'rest_framework_swagger/css/highlight.default.css' %}" media="screen" rel="stylesheet" type="text/css"/>
    <link href="{% static 'rest_framework_swagger/css/atelier-dune.light.css' %}" media="screen" rel="stylesheet" type="text/css"/>
    <link href="{% static 'rest_framework_swagger/css/rest_framework_swagger.css' %}" media="screen" rel="stylesheet" type="text/css"/>
    <link href="{% static 'rest_framework_swagger/css/screen.css' %}" media="screen" rel="stylesheet" type="text/css"/>
    <style media="screen" type="text/css">
        #header {
            background-color: #F44336;
        }
        .swagger-ui-wrap a {
        }
        #header a#logo {
            background: transparent url({% static "mezzanine_api/img/mezzanine_api_logo.png" %}) no-repeat left center;
            background-size: 40px;
        }
        #django-rest-swagger  {
            background: #FF685C;
        }
        #header form#api_selector .input a#explore {
            background: #FF685C;
        }
        .swagger-ui-wrap {
            text-align: left;
        }
        #django-rest-swagger .swagger-ui-wrap {
            padding: 0 20px 0 20px
        }
        #django-rest-swagger .swagger-ui-wrap a {
            border-bottom: 1px dashed #FFFFFF;
        }

        #input_baseUrl {
            /** Hide API URL form field **/
            display: none
        }
    </style>
{% endblock %}

{% block branding %}
    <a id="logo" href="http://gcushen.github.io/mezzanine-api" target="_blank">
        Mezzanine API
    </a>
{% endblock %}

{% block api_selector %}
    <form id="api_selector">
        <input id="input_baseUrl" name="baseUrl" type="text"/>
        <div class="input"><input placeholder="my oauth access token" id="input_apiKey" name="apiKey" type="text"/></div>
        <div class="input"><a id="explore" href="#">Authenticate</a></div>
    </form>
{% endblock %}

{% block django_rest_swagger %}
    <div id="django-rest-swagger">
        <div class="swagger-ui-wrap">
            You have version <b>{% get_mezzanine_api_version %}</b>.
            <a href="https://pypi.python.org/pypi/mezzanine-api" target="_blank">Check for updates?</a>
        </div>
    </div>
{% endblock %}
