diff options
| author | Dougal Matthews | 2014-11-25 13:14:51 +0000 | 
|---|---|---|
| committer | Dougal Matthews | 2014-11-25 13:14:51 +0000 | 
| commit | 66fc51de5c4622073e7e6cfd12cc7c4a1a8ba60c (patch) | |
| tree | 75ef8fdb7084a6f48efc8f3d3344825e6816cd55 | |
| parent | 673f48242f34ee6b7ba91ab4cf8a67f1bb26a272 (diff) | |
| download | django-rest-framework-66fc51de5c4622073e7e6cfd12cc7c4a1a8ba60c.tar.bz2 | |
Use the is_homepage property.
| -rw-r--r-- | docs_theme/base.html | 8 | ||||
| -rw-r--r-- | docs_theme/nav.html | 2 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/docs_theme/base.html b/docs_theme/base.html index cefaef48..6bfccab2 100644 --- a/docs_theme/base.html +++ b/docs_theme/base.html @@ -54,7 +54,7 @@      }    </style>  </head> -<body onload="prettyPrint()" class="{% if current_page.title == 'Home' %}index{% endif %}-page"> +<body onload="prettyPrint()" class="{% if current_page.is_homepage %}index{% endif %}-page">    <div class="wrapper"> @@ -104,7 +104,7 @@              <div id="table-of-contents">                <ul class="nav nav-list side-nav well sidebar-nav-fixed"> -                {% if current_page.title == 'Home' %} +                {% if current_page.is_homepage %}                      <li class="main">                          <a href="#">Django REST framework</a>                      </li> @@ -112,7 +112,7 @@                  {% for toc_item in toc %} -                  <li class="{% if current_page.title != 'Home' %}main{% endif %}"> +                  <li class="{% if not current_page.is_homepage %}main{% endif %}">                      <a href="{{ toc_item.url }}">{{ toc_item.title }}</a>                    </li> @@ -124,7 +124,7 @@                  {% endfor %} -                {% if current_page.title == 'Home' %} +                {% if current_page.is_homepage %}                  <div class="promo">                    <hr/>                    <script type="text/javascript" src="//cdn.fusionads.net/fusion.js?zoneid=1332&serve=C6SDP2Y&placement=djangorestframework" id="_fusionads_js"></script> diff --git a/docs_theme/nav.html b/docs_theme/nav.html index 24304b8a..ca1afc0e 100644 --- a/docs_theme/nav.html +++ b/docs_theme/nav.html @@ -19,7 +19,7 @@              {% if include_nav %}              <!-- Main navigation -->              <ul class="nav navbar-nav"> -              <li {% if current_page.title == 'Home' %}class="active"{% endif %}><a href="/">Home</a></li> +              <li {% if current_page.is_homepage %}class="active"{% endif %}><a href="/">Home</a></li>                {% for nav_item in nav %} {% if nav_item.children %}                <li class="dropdown{% if nav_item.active %} active{% endif %}">                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ nav_item.title }} <b class="caret"></b></a> | 
