{% load static %}<!DOCTYPE html>
{#{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}#}
{#<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>#}
<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">


  <title>{% block title %}{% endblock %}</title>

  <link href="{% static "inspinia/css/bootstrap.min.css" %}" rel="stylesheet">
  <link href="{% static "inspinia/font-awesome/css/font-awesome.css" %}" rel="stylesheet">

  <link href="{% static "inspinia/css/animate.css" %}" rel="stylesheet">
  <link href="{% static "inspinia/css/style.css" %}" rel="stylesheet">


    {#  <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}"/>#}
{#  <link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}">#}
{#  <link rel="stylesheet" type="text/css" href="{% static "admin/css/hxt.css" %}">#}
  <!-- Mainly scripts -->
  <script src="{% static "inspinia/js/jquery-3.1.1.min.js" %}"></script>
  <script>
    var django = django || {};
    django.jQuery = jQuery;
  </script>
  

  {% block extrastyle %}{% endblock %}

  {% block extrahead %}{% endblock %}
  {% if not is_popup %}
  <style>
    #evt {
      font-size: 90%;
      position: fixed;
      border: 1px solid #888;
      border-radius: 4px;
      bottom: 5px;
      right: 25px;
      text-align: center;
      z-index: 99;
    }

    #evt_text {
      color: #888;
      line-height: 28px;
      margin: 0 18px;
    }

    @media screen and (max-width: 480px) {
      #evt {
        font-size: 82%;
        position: fixed;
        border: 1px solid #888;
        border-radius: 4px;
        bottom: 5px;
        right: 10px;
        text-align: center;
        z-index: 99;
      }
      #evt_text {
        color: #888;
        line-height: 23px;
        margin: 0 12px;
      }
    }
  </style>
  {% endif %}

  {% block blockbots %}
    <meta name="robots" content="NONE,NOARCHIVE"/>{% endblock %}
</head>
{% load i18n %}

<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %} md-skin fixed-sidebar"
      data-admin-utc-offset="{% now "Z" %}">
      {% if not is_popup %}
      <!-- 环境变量 -->
        <div id="evt">
{#          <p id="evt_text">{% db_name %}</p>#}
        </div>
        <script>
          (function ($) {
            $(document).ready(function () {
              var html = $('#evt_text').html();
              switch (html) {
                case 'TST':
                  $('#evt_text').css({ 'color': '#3c763d' });
                  $('#evt').css({ 'border-color': '#d0e9c6', 'background': 'rgba(223, 240, 216, 0.5)' });
                  break;
                case 'PRD':
                  $('#evt_text').css({ 'color': '#a94442' });
                  $('#evt').css({ 'border-color': '#ebcccc', 'background': 'rgba(243, 201, 201, 0.5)' });
                  break;
                case 'QA':
                  $('#evt_text').css({ 'color': '#8a6d3b' });
                  $('#evt').css({ 'border-color': '#f1e5ad', 'background': 'rgba(241, 231, 184, 0.5)' });
                  break;
                default:
                  break;
              }
            })
          })(django.jQuery)
        </script>
      {% endif %}

<!-- Container -->
<div id="wrapper">
  {% if not is_popup %}
    {#    左侧菜单#}
    <nav class="navbar-default navbar-static-side" role="navigation">
      <div class="sidebar-collapse">
        <ul class="nav metismenu" id="side-menu">
          <li class="nav-header">
            <div class="dropdown profile-element">
              <span>
{#                 <img alt="image" class="img-circle" src="{% static "inspinia/img/p103.ico" %}">#}
              </span>
              <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="clear"> <span class="block m-t-xs"> <strong
                              class="font-bold">{{ user.get_full_name }} </strong>
                             </span> <span class="text-muted text-xs block">{{ user.get_username }} <b
                              class="caret"></b></span> </span> </a>
              <ul class="dropdown-menu animated fadeInRight m-t-xs">
                <li><a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a></li>
                {% if user.has_usable_password %}
                  <li><a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a></li>
                {% endif %}
              </ul>
            </div>
            <div class="logo-element">
              {% block branding %}{% endblock %}
            </div>
          </li>
{#          {% side_nav_bar user %}#}
        </ul>

      </div>
    </nav>
  {% endif %}


  <div id="page-wrapper" class="gray-bg" {% if is_popup %} style="margin: 0 0 0 0"{% endif %}>
    {% if not is_popup %}
      <div class="row border-bottom">
        <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
          <div class="navbar-header">
            <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
          </div>
          {% block usertools %}
            {% if has_permission %}
              <ul class="nav navbar-top-links navbar-right">
                <li> {% block welcome-msg %}
                  <span class="light-golden">{% trans 'Welcome,' %}
                  <strong>{% firstof user.get_short_name user.get_username %}</strong></span>
                {% endblock %}</li>
                {% block userlinks %}

                  {% if site_url %}
                    <li>
                      <a href="{{ site_url }}">{% trans 'View site' %}</a>
                    </li>
                  {% endif %}

                  {% if user.is_active and user.is_staff %}
                    {% url 'django-admindocs-docroot' as docsroot %}
                    {% if docsroot %}
                      <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /</li>
                    {% endif %}
                  {% endif %}
                  {% if user.has_usable_password %}
                    <li><a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a></li>
                  {% endif %}

                  <li><a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a></li>
                {% endblock %}
              </ul>
            {% endif %}
          {% endblock %}
          {% block nav-global %}{% endblock %}
        </nav>
      </div>
    {% endif %}

    <div class="row wrapper border-bottom white-bg page-heading">
      <div class="col-sm-6">
        <h2>
          {% block content_title %}{% if title %}{{ title }}{% endif %}{% endblock %}
          <small>{% block pretitle %}{% endblock %}</small>
        </h2>
        {% if not is_popup %}
          {% block breadcrumbs %}
            <ol class="breadcrumb">
              <li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
              <li class="active">{% if title %} &rsaquo; {{ title }}{% endif %}</li>
            </ol>
          {% endblock %}
        {% endif %}
      </div>
      <div class="{% block object-size %}col-sm-6{% endblock %}">
        {% block object-tools %}
        {% endblock %}
      </div>
    </div>

    <div class="wrapper wrapper-content animated fadeInRight">
      {% block extrarow %}
      <div class="row">
          {% block messages %}
            {% if messages %}
              <ul class="messagelist">{% for message in messages %}
                <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
              {% endfor %}</ul>
            {% endif %}
          {% endblock messages %}

          <!-- Content -->
          <div id="content" class=" {% block coltype %}colM{% endblock %}">

            {% block content %}
              {{ content }}
            {% endblock %}
            {% block sidebar %}{% endblock %}

          </div>
          <!-- END Content -->
        <!-- END Container -->

      </div>
      {% endblock %}
    </div>
    {% if not is_popup %}
      {% block footer %}
        <div id="footer" class="footer">
          <div>
            <strong>Copyright</strong> 慧信通（北京）网络技术有限公司 &copy; 2016-2017
          </div>
        </div>
      {% endblock %}
    {% endif %}

    </div>
    <div class="col-md-6">
        <div class="ibox-content">
            <div>
                <div>
                    <span>Memory</span>
                    <small class="pull-right">10/200 GB</small>
                </div>
                <div class="progress progress-small">
                    <div style="width: 60%;" class="progress-bar"></div>
                </div>

                <div>
                    <span>Bandwidth</span>
                    <small class="pull-right">20 GB</small>
                </div>
                <div class="progress progress-small">
                    <div style="width: 50%;" class="progress-bar"></div>
                </div>

                <div>
                    <span>Activity</span>
                    <small class="pull-right">73%</small>
                </div>
                <div class="progress progress-small">
                    <div style="width: 40%;" class="progress-bar"></div>
                </div>

                <div>
                    <span>FTP</span>
                    <small class="pull-right">400 GB</small>
                </div>
                <div class="progress progress-small">
                    <div style="width: 20%;" class="progress-bar progress-bar-danger"></div>
                </div>
            </div>
        </div>
    </div>

</div>
<script src="{% static "inspinia/js/bootstrap.min.js" %}"></script>
{% if not is_popup %}
<script src="{% static "inspinia/js/plugins/metisMenu/jquery.metisMenu.js" %}"></script>
{% endif %}
<script src="{% static "inspinia/js/plugins/slimscroll/jquery.slimscroll.min.js" %}"></script>

<!-- Custom and plugin javascript -->
<script src="{% static "inspinia/js/inspinia.js" %}"></script>
<script src="{% static "inspinia/js/plugins/pace/pace.min.js" %}"></script>

</body>
</html>
