mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
Fix collapsing menu
This commit is contained in:
parent
18d1088694
commit
6779198b69
|
@ -181,13 +181,12 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.coredocs-section {
|
.coredocs-section {
|
||||||
border-top: 2px solid lightgrey;
|
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding-top: 20px
|
padding-bottom: 10px;
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coredocs-section:first-child {
|
.coredocs-section:last-child {
|
||||||
border-top: 0;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,3 +204,15 @@ body {
|
||||||
.sidebar .language-switcher .btn {
|
.sidebar .language-switcher .btn {
|
||||||
padding: 3px 7px;
|
padding: 3px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* @group Docs Content */
|
||||||
|
|
||||||
|
.docs-content .btn {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-samples pre {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
/* @end Docs Content */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
{% for section_key, section in document.data.items %}
|
{% for section_key, section in document.data.items %}
|
||||||
<h1 id="{{ section_key }}" class="coredocs-section">{{ section_key }}</h1>
|
<h2 id="{{ section_key }}" class="coredocs-section"><i class="fa fa-angle-right"></i> {{ section_key }}</h2>
|
||||||
{% for link_key, link in section.links.items %}
|
{% for link_key, link in section.links.items %}
|
||||||
{% include "rest_framework/docs/link.html" %}
|
{% include "rest_framework/docs/link.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<div class="row coredocs-link">
|
<div class="row coredocs-link">
|
||||||
|
|
||||||
<div class="col-md-6 docs-content">
|
<div class="col-md-6 docs-content">
|
||||||
<button class="btn btn-success" style="float: right; margin-top: 20px" data-toggle="modal" data-target="#{{ section_key }}_{{ link_key }}_modal">Interact</button>
|
<button class="btn btn-sm btn-success" style="float: right; margin-top: 20px" data-toggle="modal" data-target="#{{ section_key }}_{{ link_key }}_modal">Interact</button>
|
||||||
|
|
||||||
<h2 id="{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</h2>
|
<h3 id="{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</h3>
|
||||||
<p>
|
<p>
|
||||||
<span class="label label-primary">{{ link.action|upper }}</span> <code>{{ link.url }}</code>
|
<span class="label label-primary">{{ link.action|upper }}</span> <code>{{ link.url }}</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<div class="menu-list">
|
<div class="menu-list">
|
||||||
<ul id="menu-content" class="menu-content collapse out">
|
<ul id="menu-content" class="menu-content collapse out">
|
||||||
{% for section_key, section in document.data.items %}
|
{% for section_key, section in document.data.items %}
|
||||||
<li data-toggle="collapse" data-target="#{{ section_key }}-{{ link_key }}" class="collapsed">
|
<li data-toggle="collapse" data-target="#{{ section_key }}-dropdown" class="collapsed">
|
||||||
<a href="#{{ section_key }}"><i class="fa fa-dot-circle-o fa-lg"></i> {{ section_key }} <span class="arrow"></span></a>
|
<a href="#{{ section_key }}"><i class="fa fa-dot-circle-o fa-lg"></i> {{ section_key }} <span class="arrow"></span></a>
|
||||||
</li>
|
</li>
|
||||||
<ul class="sub-menu collapse in" id="{{ section_key }}-{{ link_key }}">
|
<ul class="sub-menu collapse in" id="{{ section_key }}-dropdown">
|
||||||
{% for link_key, link in section.links.items %}
|
{% for link_key, link in section.links.items %}
|
||||||
<li><a href="#{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</a></li>
|
<li><a href="#{{ section_key }}-{{ link_key }}">{{ link.title|default:link_key }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user