Skip to content

Commit fa06610

Browse files
committed
Docs
* Changed fontawesome icons to boostrap svg icons
1 parent d7d92b3 commit fa06610

File tree

7 files changed

+65
-30
lines changed

7 files changed

+65
-30
lines changed

rest_framework/static/rest_framework/docs/css/base.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,8 @@ pre.highlight code {
153153
color: white;
154154
}
155155

156-
.sidebar .menu-list li a i {
157-
padding-left: 10px;
158-
width: 20px;
159-
padding-right: 20px;
156+
.sidebar .menu-list li a svg {
157+
160158
}
161159

162160
.sidebar .menu-list li:hover {

rest_framework/templates/rest_framework/docs/auth/basic.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,34 @@
55
<div class="modal-dialog modal-md" role="document">
66
<div class="modal-content">
77
<div class="modal-header">
8-
<h3 class="modal-title"><i class="fa fa-key"></i> Basic Authentication</h3>
8+
<h3 class="modal-title">
9+
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-key mb-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
10+
<path fill-rule="evenodd" d="M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z"/>
11+
<path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
12+
</svg>
13+
Basic Authentication
14+
</h3>
915
</div>
1016

11-
<form class="form-horizontal authentication-basic-form">
17+
<form class="authentication-basic-form">
1218
<div class="modal-body">
13-
<div class="form-group">
14-
<label for="authorization" class="col-sm-2 control-label">Username:</label>
15-
19+
<div class="row mb-3">
20+
<label for="authorization" class="col-sm-2 col-form-label">Username:</label>
1621
<div class="col-sm-10">
1722
<input type="text" class="form-control" id="username" required>
1823
</div>
1924
</div>
2025

21-
<div class="form-group">
22-
<label for="authorization" class="col-sm-2 control-label">Password:</label>
23-
26+
<div class="row mb-3">
27+
<label for="authorization" class="col-sm-2 col-form-label">Password:</label>
2428
<div class="col-sm-10">
2529
<input type="password" class="form-control" id="password" required>
2630
</div>
2731
</div>
2832
</div>
2933

3034
<div class="modal-footer">
31-
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
35+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
3236
<button type="submit" class="btn btn-primary">Use Basic Authentication</button>
3337
</div>
3438
</form>

rest_framework/templates/rest_framework/docs/auth/session.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
<div class="modal-dialog modal-md" role="document">
66
<div class="modal-content">
77
<div class="modal-header">
8-
<h3 class="modal-title"><i class="fa fa-key"></i> Session Authentication</h3>
8+
<h3 class="modal-title">
9+
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-key mb-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
10+
<path fill-rule="evenodd" d="M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z"/>
11+
<path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
12+
</svg>
13+
Session Authentication</h3>
914
</div>
1015

1116
<form class="form-horizontal authentication-session-form">
@@ -23,7 +28,7 @@ <h4 class="text-center">You need to {% optional_docs_login request %} to enable
2328
</div>
2429

2530
<div class="modal-footer">
26-
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
31+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
2732
{% if user.is_authenticated %}
2833
<button type="submit" class="btn btn-primary">Use Session Authentication</button>
2934
{% endif %}

rest_framework/templates/rest_framework/docs/auth/token.html

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,33 @@
55
<div class="modal-dialog modal-md" role="document">
66
<div class="modal-content">
77
<div class="modal-header">
8-
<h3 class="modal-title"><i class="fa fa-key"></i> Token Authentication</h3>
8+
<h3 class="modal-title">
9+
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-key mb-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
10+
<path fill-rule="evenodd" d="M0 8a4 4 0 0 1 7.465-2H14a.5.5 0 0 1 .354.146l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0L13 9.207l-.646.647a.5.5 0 0 1-.708 0L11 9.207l-.646.647a.5.5 0 0 1-.708 0L9 9.207l-.646.647A.5.5 0 0 1 8 10h-.535A4 4 0 0 1 0 8zm4-3a3 3 0 1 0 2.712 4.285A.5.5 0 0 1 7.163 9h.63l.853-.854a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.793-.793-1-1h-6.63a.5.5 0 0 1-.451-.285A3 3 0 0 0 4 5z"/>
11+
<path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
12+
</svg>
13+
Token Authentication</h3>
914
</div>
1015

11-
<form class="form-horizontal authentication-token-form">
16+
<form class="authentication-token-form">
1217
<div class="modal-body">
13-
<div class="form-group">
14-
<label for="prefix" class="col-sm-2 control-label">Scheme:</label>
18+
<div class="row mb-3">
19+
<label for="prefix" class="col-sm-2 col-form-label">Scheme:</label>
1520
<div class="col-sm-10">
1621
<input type="text" class="form-control" id="scheme" placeholder="Bearer" aria-describedby="schemeHelpBlock" required>
17-
<span id="schemeHelpBlock" class="help-block">Either a registered authentication scheme such as <code>Bearer</code>, or a custom schema such as <code>Token</code> or <code>JWT</code>.</span>
22+
<span id="schemeHelpBlock" class="form-text">Either a registered authentication scheme such as <code>Bearer</code>, or a custom schema such as <code>Token</code> or <code>JWT</code>.</span>
1823
</div>
1924
</div>
20-
<div class="form-group">
21-
<label for="token" class="col-sm-2 control-label">Token:</label>
25+
<div class="row mb-3">
26+
<label for="token" class="col-sm-2 col-form-label">Token:</label>
2227
<div class="col-sm-10">
2328
<input type="text" class="form-control" id="token" placeholder="XXXX-XXXX-XXXX-XXXX" aria-describedby="helpBlock" required>
24-
<span id="tokenHelpBlock" class="help-block">A valid API token.</span>
29+
<span id="tokenHelpBlock" class="form-text">A valid API token.</span>
2530
</div>
2631
</div>
2732
</div>
2833
<div class="modal-footer">
29-
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
34+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
3035
<button type="submit" class="btn btn-primary">Use Token Authentication</button>
3136
</div>
3237
</form>

rest_framework/templates/rest_framework/docs/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<title>{{ document.title }}</title>
1010

1111
<link href="{% static 'rest_framework/css/bootstrap.min.css' %}" rel="stylesheet">
12-
<link href="{% static 'rest_framework/css/bootstrap-theme.min.css' %}" rel="stylesheet">
1312
<link href="{% static 'rest_framework/css/font-awesome-4.0.3.css' %}" rel="stylesheet">
1413
<link href="{% static 'rest_framework/docs/css/base.css' %}" rel="stylesheet">
1514
<link href="{% static 'rest_framework/docs/css/jquery.json-view.min.css' %}" rel="stylesheet">

rest_framework/templates/rest_framework/docs/link.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
style="float: right; margin-top: 20px"
88
data-toggle="modal"
99
data-target="#{{ section_key }}_{{ link_key|slugify }}_modal">
10-
<i class="fa fa-exchange"></i> Interact
10+
<svg width="1em" height="1em" viewBox="0 0 16 16" class="mb-1 bi bi-arrow-left-right" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
11+
<path fill-rule="evenodd" d="M10.146 7.646a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L12.793 11l-2.647-2.646a.5.5 0 0 1 0-.708z"/>
12+
<path fill-rule="evenodd" d="M2 11a.5.5 0 0 1 .5-.5H13a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 11zm3.854-9.354a.5.5 0 0 1 0 .708L3.207 5l2.647 2.646a.5.5 0 1 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 0 1 .708 0z"/>
13+
<path fill-rule="evenodd" d="M2.5 5a.5.5 0 0 1 .5-.5h10.5a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
14+
</svg>
15+
Interact
1116
</button>
1217

1318
<h3 id="{{ section_key }}-{{ link_key|slugify }}" class="coredocs-link-title">{{ link.title|default:link_key }} <a href="#{{ section_key }}-{{ link_key|slugify }}"><i class="fa fa-link" aria-hidden="true"></i>
1419
</a></h3>
1520

1621
<div class="meta">
17-
<span class="label label-primary">{{ link.action|upper }}</span>
22+
<span class="badge bg-secondary">{{ link.action|upper }}</span>
1823
<code>{{ link.url }}</code>
1924
</div>
2025

rest_framework/templates/rest_framework/docs/sidebar.html

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ <h3 class="brand"><a href="#">{{ document.title }}</a></h3>
88
{% if document|data %}
99
{% for section_key, section in document|data|items %}
1010
<li data-toggle="collapse" data-target="#{{ section_key }}-dropdown" class="collapsed">
11-
<a><i class="fa fa-dot-circle-o fa-lg"></i> {% if section_key %}{{ section_key }}{% else %}API Endpoints{% endif %} <span class="arrow"></span></a>
11+
<a>
12+
<svg width="1.5em" height="1.5em" viewBox="0 0 16 16" class="mb-1 mr-2 ml-2 bi bi-bullseye" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
13+
<path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
14+
<path fill-rule="evenodd" d="M8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10zm0 1A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"/>
15+
<path fill-rule="evenodd" d="M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"/>
16+
<path d="M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
17+
</svg>
18+
{% if section_key %}{{ section_key }}{% else %}API Endpoints{% endif %} <span class="arrow"></span></a>
1219
<ul class="sub-menu {% if section_key %}collapse{% endif %}" id="{{ section_key }}-dropdown">
1320
{% for link_key, link in section|schema_links|items %}
1421
<li><a href="#{{ section_key }}-{{ link_key|slugify }}">{{ link.title|default:link_key }}</a></li>
@@ -21,7 +28,13 @@ <h3 class="brand"><a href="#">{{ document.title }}</a></h3>
2128

2229
<ul class="menu-list menu-list-bottom">
2330
<li data-toggle="collapse" data-target="#auth-control" class="collapsed">
24-
<a><i class="fa fa-user fa-lg"></i> Authentication</a> <span id="selected-authentication">{% if user.is_authenticated %}session{% else %}none{% endif %}</span>
31+
<a>
32+
<svg width="1.5em" height="1.5em" viewBox="0 0 16 16" class="mb-1 mr-2 ml-3 bi bi-person-fill" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
33+
<path fill-rule="evenodd" d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
34+
</svg>
35+
Authentication
36+
</a>
37+
<span id="selected-authentication">{% if user.is_authenticated %}session{% else %}none{% endif %}</span>
2538
</li>
2639
<ul class="sub-menu collapse out" id="auth-control">
2740
<li {% if not user.is_authenticated %}class="active"{% endif %}><a data-auth="none" href="#">none</a></li>
@@ -31,7 +44,13 @@ <h3 class="brand"><a href="#">{{ document.title }}</a></h3>
3144
</ul>
3245

3346
<li data-toggle="collapse" data-target="#language-control" class="collapsed">
34-
<a><i class="fa fa-code fa-lg"></i> Source Code</a> <span id="selected-language">{{ langs | first }}</span>
47+
<a>
48+
<svg width="1.5em" height="1.5em" viewBox="0 0 16 16" class="mb-1 ml-3 mr-2 bi bi-code-slash" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
49+
<path fill-rule="evenodd" d="M4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0zm-.999-3.124a.5.5 0 0 1 .33.625l-4 13a.5.5 0 0 1-.955-.294l4-13a.5.5 0 0 1 .625-.33z"/>
50+
</svg>
51+
Source Code
52+
</a>
53+
<span id="selected-language">{{ langs | first }}</span>
3554
</li>
3655
<ul class="sub-menu collapse out" id="language-control">
3756
{% for lang in langs %}

0 commit comments

Comments
 (0)