Skip to content

Commit

Permalink
Use the is_homepage property.
Browse files Browse the repository at this point in the history
  • Loading branch information
d0ugal committed Nov 25, 2014
1 parent 673f482 commit 66fc51d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs_theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">

Expand Down Expand Up @@ -104,15 +104,15 @@ <h3 id="myModalLabel">Documentation search</h3>
<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>
{% endif %}

{% 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>

Expand All @@ -124,7 +124,7 @@ <h3 id="myModalLabel">Documentation search</h3>

{% 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>
Expand Down
2 changes: 1 addition & 1 deletion docs_theme/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 66fc51d

Please sign in to comment.