Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved the dev doc warning after feedback from IRC. Refs #20518.

  • Loading branch information...
commit 50bfb57e9e4a97fd95fa1abab9a1ad8d0f89f178 1 parent 720b325
Jannis Leidel jezdez authored
35 docs/templates/docs/doc.html
View
@@ -4,6 +4,19 @@
{% block title %}{{ doc.title|striptags|safe }} | {% trans "Django documentation" %}{% endblock %}
+{% block extrabody %}
+{% if version == 'dev' %}
+ <div class="dev-warning">
+ {% trans "This document is for Django's development version, which can be significantly different from previous releases. Use the version selector in the bottom right corner for older releases." %}

I've never noticed this selector and it took me a while to find it. I kept scrolling up and down looking for it because I didn't notice it was floating.

Maybe the wording could be improved.

I suggest:

For older releases, use the version selector floating in the bottom right corner of this page.

Jannis Leidel Owner
jezdez added a note

Sure, don't hesitate to send a pull request..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ </div>
+ <style type="text/css" media="screen">
+ body {
+ margin-top: 2em;
+ }
+ </style>
+ {% endif %}
+{% endblock extrabody %}
+
{% block extrahead %}
{{ block.super }}
<link rel="stylesheet" href="{% static "css/docs/docs.css" %}" type="text/css" />
@@ -18,22 +31,6 @@
{% block body %}
{% load docs %}
- {% if version == 'dev' %}
- <style type="text/css" media="screen">
- #content-main {
- background-size: 50px 50px;
- background-color: #fff;
- background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .02) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .02) 50%, rgba(0, 0, 0, .02) 75%, transparent 75%, transparent);
- background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .02) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .02) 50%, rgba(0, 0, 0, .02) 75%, transparent 75%, transparent);
- background-image: linear-gradient(135deg, rgba(0, 0, 0, .02) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .02) 50%, rgba(0, 0, 0, .02) 75%, transparent 75%, transparent);
- }
- </style>
- <div class="admonition warning">
- <p>{% trans "This document is for Django's in-development version, which can be significantly different from previous releases." %}</p>
- <p>{% trans "Use the version selector in the bottom right corner to see older versions." %}</p>
- </div>
-
- {% endif %}
{% get_all_doc_versions docurl as versions %}
<ul id="doc-versions">
{% for v in versions %}
@@ -47,10 +44,12 @@
</li>
{% endif %}
{% endfor %}
- <li class="current"
+ <li class="current{% if version == 'dev' %} dev{% endif %}"
title="{% if version == 'dev' %}{% trans "This document is for Django's development version, which can be significantly different from previous releases." %}{% else %}{% blocktrans %}This document describes Django {{ version }}.{% endblocktrans %}{% endif %} {% trans "Click on the links on the left to see other versions." %}">
<span>{% trans "Documentation version:" %}
- <strong>{{ version }}</strong>
+ <strong>{% if version == 'dev' %}
+ development{% else %}{{ version }}
+ {% endif %}</strong>
</span>
</li>
</ul>
16 static/css/base.css
View
@@ -531,6 +531,22 @@ div.admonition.warning {
padding: 5px;
}
+.dev-warning {
+ position:fixed;
+ top: 0;
+ width: 100%;
+ padding: 5px 7px;
+ background-size: 50px 50px;
+ background-color: #ffe761;
+ color: #000;
+ border-bottom: 2px solid #ae9e49;
+ font-size: 12px;
+ background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
+}
+
+
#documentation h2,
#documentation h3,
#documentation h4 {
1  templates/base.html
View
@@ -49,6 +49,7 @@ <h1 id="logo"><a href="https://www.djangoproject.com/"><img src="{% static "img/
<!-- END #footer -->
</div>
<!-- END #container -->
+ {% block extrabody %}{% endblock extrabody %}
</body>
</html>
Trey Hunner

I've never noticed this selector and it took me a while to find it. I kept scrolling up and down looking for it because I didn't notice it was floating.

Maybe the wording could be improved.

I suggest:

For older releases, use the version selector floating in the bottom right corner of this page.

Jannis Leidel

Sure, don't hesitate to send a pull request..

Please sign in to comment.
Something went wrong with that request. Please try again.