diff --git a/rest_framework/static/rest_framework/docs/css/base.css b/rest_framework/static/rest_framework/docs/css/base.css index 33ba15d612..ad19b1daf4 100644 --- a/rest_framework/static/rest_framework/docs/css/base.css +++ b/rest_framework/static/rest_framework/docs/css/base.css @@ -1,3 +1,8 @@ +.main-container { + padding-left: 30px; + padding-right: 30px; +} + .sidebar { overflow: auto; font-family: verdana; @@ -125,6 +130,11 @@ } @media (max-width: 767px) { + .main-container { + padding-left: 15px; + padding-right: 15px; + } + .sidebar { position: relative; width: 100%; @@ -176,13 +186,29 @@ body { padding: 0px; } -.coredocs-section { +.coredocs-section-title { margin-top: 20px; padding-bottom: 10px; border-bottom: 1px solid lightgrey; } -.coredocs-section:last-child { +.coredocs-link-title a, +.coredocs-section-title a { + display: none; +} + +.coredocs-link-title a, +.coredocs-section-title a { + text-decoration: none; +} + +.coredocs-link-title:hover a, +.coredocs-section-title:hover a { + display: inline; + font-size: 20px; +} + +.coredocs-section-title:last-child { margin-top: 0; } @@ -232,6 +258,18 @@ body { /* @group Docs Content */ +.docs-content .meta .label { + vertical-align: middle; + font-size: 14px; + font-weight: normal; +} + +.docs-content .meta code { + vertical-align: middle; + padding: .2em .6em .3em; + font-size: 14px; +} + .docs-content .btn { font-size: inherit; } @@ -239,4 +277,5 @@ body { .code-samples pre { margin-top: 20px; } + /* @end Docs Content */ diff --git a/rest_framework/templates/rest_framework/docs/document.html b/rest_framework/templates/rest_framework/docs/document.html index 1824e5bfab..22af83338b 100644 --- a/rest_framework/templates/rest_framework/docs/document.html +++ b/rest_framework/templates/rest_framework/docs/document.html @@ -1,7 +1,9 @@ {% load rest_framework %} {% for section_key, section in document.data.items %} -

{{ section_key }}

+

{{ section_key }} +

+ {% for link_key, link in section.links.items %} {% include "rest_framework/docs/link.html" %} {% endfor %} diff --git a/rest_framework/templates/rest_framework/docs/index.html b/rest_framework/templates/rest_framework/docs/index.html index b709b0617a..31c340543e 100644 --- a/rest_framework/templates/rest_framework/docs/index.html +++ b/rest_framework/templates/rest_framework/docs/index.html @@ -31,7 +31,7 @@
-
+
{% include "rest_framework/docs/document.html" %}
diff --git a/rest_framework/templates/rest_framework/docs/link.html b/rest_framework/templates/rest_framework/docs/link.html index 6de23dcaf0..0476e3f8ee 100644 --- a/rest_framework/templates/rest_framework/docs/link.html +++ b/rest_framework/templates/rest_framework/docs/link.html @@ -2,12 +2,21 @@