From 6779198b69b3a8b938768b55514c93fd88105133 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Sun, 5 Feb 2017 20:17:02 +0000 Subject: [PATCH] Fix collapsing menu --- .../static/rest_framework/docs/css/base.css | 19 +++++++++++++++---- .../rest_framework/docs/document.html | 2 +- .../templates/rest_framework/docs/link.html | 4 ++-- .../rest_framework/docs/sidebar.html | 4 ++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/rest_framework/static/rest_framework/docs/css/base.css b/rest_framework/static/rest_framework/docs/css/base.css index d79e78e2c..50ab9a494 100644 --- a/rest_framework/static/rest_framework/docs/css/base.css +++ b/rest_framework/static/rest_framework/docs/css/base.css @@ -181,13 +181,12 @@ body { } .coredocs-section { - border-top: 2px solid lightgrey; margin-top: 20px; - padding-top: 20px + padding-bottom: 10px; + border-bottom: 1px solid lightgrey; } -.coredocs-section:first-child { - border-top: 0; +.coredocs-section:last-child { margin-top: 0; } @@ -205,3 +204,15 @@ body { .sidebar .language-switcher .btn { padding: 3px 7px; } + + +/* @group Docs Content */ + +.docs-content .btn { + font-size: inherit; +} + +.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 0b1f8c2ed..2cc29f095 100644 --- a/rest_framework/templates/rest_framework/docs/document.html +++ b/rest_framework/templates/rest_framework/docs/document.html @@ -1,7 +1,7 @@ {% 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/link.html b/rest_framework/templates/rest_framework/docs/link.html index 4e6fac231..6de23dcaf 100644 --- a/rest_framework/templates/rest_framework/docs/link.html +++ b/rest_framework/templates/rest_framework/docs/link.html @@ -2,9 +2,9 @@