Skip to content

Commit 7589d39

Browse files
authored
Merge pull request #371 from shanedewael/update-docs-styling-gtm
Update documentation styling
2 parents 882bc2e + b01a236 commit 7589d39

28 files changed

+1514
-21573
lines changed

docs-src/_themes/slack/layout.html

Lines changed: 97 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,104 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
3-
<head>
4-
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
5-
{{ metatags }}
6-
7-
{%- block htmltitle %}
8-
<title>{{ title|striptags|e + " &mdash; "|safe + project|e }}</title>
9-
{%- endblock %}
10-
11-
{%- macro css() %}
12-
<link rel="stylesheet" href="https://a.slack-edge.com/b143/style/plastic_helpers.css" type="text/css"/>
13-
<link rel="stylesheet" href="https://a.slack-edge.com/58b24/style/plastic_typography.css" type="text/css" />
14-
<link rel="stylesheet" href="https://a.slack-edge.com/b900/style/plastic_layout.css" type="text/css" />
15-
<link rel="stylesheet" href="https://a.slack-edge.com/2133/style/plastic_grid.css" type="text/css" />
16-
<link rel="stylesheet" href="https://a.slack-edge.com/be9e/style/plastic_buttons.css" type="text/css" />
17-
<link rel="stylesheet" href="https://a.slack-edge.com/1d9c/style/libs/lato-1-compressed.css" type="text/css" />
18-
<link rel="stylesheet" href="https://a.slack-edge.com/e8c1/style/slack_iconfont.css" type="text/css">
19-
<link rel="stylesheet" href="{{ pathto('./_static/' + 'default.css', 1) }}" type="text/css" />
20-
<link rel="stylesheet" href="{{ pathto('./_static/' + 'pygments.css', 1) }}" type="text/css" />
21-
{%- endmacro %}
22-
23-
{{ css() }}
24-
{%- block linktags %}
25-
<link id="favicon" rel="shortcut icon" href="https://a.slack-edge.com/66f9/img/icons/favicon-32.png" type="image/png" />
26-
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto(master_doc) }}" />
27-
{%- endblock %}
28-
29-
</head>
30-
<body class="api light_theme">
31-
32-
{%- block header %}
33-
<header>
34-
<a id="menu_toggle" class="no_transition show_on_mobile">
35-
<span class="menu_icon"></span>
36-
<span class="vert_divider"></span>
37-
</a>
38-
<a href="https://api.slack.com/" id="header_logo" class="api hide_on_mobile" style="float:left; display: inline-block;">
39-
<img alt="Slack API" src="https://a.slack-edge.com/3026cb/img/slack_api_logo_vogue.png" style="width: 225px; padding-right: 25px; border-right: 1px solid #DDD;"/>
40-
</a>
41-
<span style="display: inline-block; padding-left: 20px; margin-top: 20px; font-weight: bold;">
42-
<a style="color: #555459;" href="./index.html">{{ project }}</a>
43-
</span>
44-
<div class="header_nav">
45-
<a href="https://github.com/SlackAPI/python-slackclient" class="btn header_btn float_right" data-qa="go_to_slack">Go to GitHub</a>
3+
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
6+
{{ metatags }}
7+
8+
{%- block htmltitle %}
9+
<title>{{ title|striptags|e + " &mdash; "|safe + project|e }}</title>
10+
{%- endblock %}
11+
12+
{%- macro css() %}
13+
<link href="https://a.slack-edge.com/4f227/style/rollup-slack_kit_legacy_adapters.css" rel="stylesheet" type="text/css">
14+
<link href="https://a.slack-edge.com/3e02c0/style/rollup-api_site.css" rel="stylesheet" type="text/css">
15+
<link rel="stylesheet" href="{{ pathto('./_static/' + 'default.css', 1) }}" type="text/css" />
16+
<link rel="stylesheet" href="{{ pathto('./_static/' + 'pygments.css', 1) }}" type="text/css" />
17+
<link rel="stylesheet" href="{{ pathto('./_static/' + 'docs.css', 1) }}" type="text/css" />
18+
{%- endmacro %}
19+
20+
<!-- Google Tag Manager -->
21+
<script>(function (w, d, s, l, i) {
22+
w[l] = w[l] || []; w[l].push({
23+
'gtm.start':
24+
new Date().getTime(), event: 'gtm.js'
25+
}); var f = d.getElementsByTagName(s)[0],
26+
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
27+
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
28+
})(window, document, 'script', 'dataLayer', 'GTM-KFZ5MK7');</script>
29+
<!-- End Google Tag Manager -->
30+
{{ css() }}
31+
{%- block linktags %}
32+
<link id="favicon" rel="shortcut icon" href="https://a.slack-edge.com/4f28/img/icons/favicon-32.png" type="image/png" />
33+
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto(master_doc) }}" />
34+
{%- endblock %}
35+
36+
37+
38+
</head>
39+
40+
<body class="api light_theme">
41+
<!-- Google Tag Manager (noscript) -->
42+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KFZ5MK7" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
43+
<!-- End Google Tag Manager (noscript) -->
44+
45+
{%- block header %}
46+
<header>
47+
<a id="menu_toggle" class="no_transition show_on_mobile">
48+
<span class="menu_icon"></span>
49+
<span class="vert_divider"></span>
50+
</a>
51+
<a href="https://api.slack.com/" id="header_logo" class="api hide_on_mobile" style="float:left; display: inline-block;">
52+
<img alt="Slack API" src="https://a.slack-edge.com/3026cb/img/slack_api_logo_vogue.png" style="width: 225px; padding-right: 25px; border-right: 1px solid #DDD;" />
53+
</a>
54+
<span style="display: inline-block; padding-left: 20px; margin-top: 25px; font-weight: bold;">
55+
<a style="color: #555459;" href="./index.html">{{ project }}</a>
56+
</span>
57+
<div class="header_nav">
58+
<a href="https://github.com/SlackAPI/python-slackclient" class="btn header_btn float_right" data-qa="go_to_slack">Go
59+
to GitHub</a>
60+
</div>
61+
</header>
62+
{% endblock %}
63+
64+
<div id="page">
65+
<div id="page_contents" class="clearfix">
66+
<!-- Sidebar Content -->
67+
<nav id="api_nav" class="col span_1_of_4">
68+
<div id="api_sections">
69+
{% block sidebar %}
70+
{% include 'sidebar.html' %}
71+
{% endblock %}
4672
</div>
47-
</header>
48-
{% endblock %}
49-
50-
<div id="page">
51-
<div id="page_contents" class="clearfix">
52-
<!-- Sidebar Content -->
53-
<nav id="api_nav" class="col span_1_of_4">
54-
<div id="api_sections">
55-
{% block sidebar %}
56-
{% include 'sidebar.html' %}
57-
{% endblock %}
58-
</div>
59-
</nav>
60-
<!-- /Sidebar Content -->
61-
62-
<!-- Body Content -->
63-
<div class="col span_3_of_4">
64-
<div class="section-title">{{ title }}</div>
65-
<div class="card">
66-
{%- block body %}
67-
{{ body }}
68-
{% endblock %}
69-
<div class="clear_both large_bottom_margin"></div>
70-
</div>
71-
</div>
72-
<!-- /Body Content -->
73+
</nav>
74+
<!-- /Sidebar Content -->
7375

76+
<!-- Body Content -->
77+
<div class="col span_3_of_4">
78+
<div class="section-title">{{ title }}</div>
79+
<div class="card">
80+
{%- block body %}
81+
{{ body }}
82+
{% endblock %}
83+
<div class="clear_both large_bottom_margin"></div>
84+
</div>
7485
</div>
86+
<!-- /Body Content -->
87+
7588
</div>
89+
</div>
90+
91+
<footer>
92+
<p class="light tiny align_center">© 2019 Slack Technologies, Inc. and contributors</p>
93+
</footer>
94+
95+
<script>
96+
window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date;
97+
ga('create', 'UA-56978219-13', 'auto');
98+
ga('send', 'pageview');
99+
</script>
100+
<script async src='https://www.google-analytics.com/analytics.js'></script>
101+
102+
</body>
76103

77-
<footer>
78-
<p class="light tiny align_center">Copyright © 2015–2016 Slack Technologies, Inc. and contributors</p>
79-
</footer>
80-
81-
<script type="text/javascript" src="https://a.slack-edge.com/1504/js/rollup-core_required_libs.js" crossorigin="anonymous"></script>
82-
<script type="text/javascript" src="https://a.slack-edge.com/125e0/js/rollup-core_web.js" crossorigin="anonymous"></script>
83-
<script>
84-
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
85-
ga('create', 'UA-56978219-13', 'auto');
86-
ga('send', 'pageview');
87-
</script>
88-
<script async src='https://www.google-analytics.com/analytics.js'></script>
89-
90-
</body>
91-
</html>
104+
</html>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<h5>Table of Contents?</h5>
2-
<ul class="localtoc"
3-
{{ toc }}
4-
</ul>
2+
<ul class="localtoc">
3+
{{ toc }}
4+
</ul>

docs-src/_themes/slack/static/default.css_t

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,68 @@ a.headerlink {
77
line-height: 2.5rem;
88
letter-spacing: -1px;
99
font-weight: 700;
10-
font-family: Slack-Lato, appleLogo, sans-serif;
1110
margin: 0 0 1rem;
1211
}
1312

1413
nav#api_nav .toctree-l1 {
1514
margin-bottom: 1.5rem;
1615
}
1716

17+
nav#api_nav #api_sections ul {
18+
list-style: none;
19+
margin: 0;
20+
padding: 0;
21+
}
22+
1823
nav#api_nav #api_sections ul li.toctree-l1>a {
19-
color: #3aa3e3;
24+
color: #1264a3;
2025
letter-spacing: 0;
21-
font-size: .75rem;
22-
font-weight: 700;
23-
font-family: Slack-Lato, appleLogo, sans-serif;
26+
font-size: .8rem;
27+
font-weight: 800;
2428
text-transform: uppercase;
2529
border: none;
2630
padding: 0;
2731
}
2832

33+
nav#api_nav #api_sections ul li.toctree-l2 {
34+
margin: 0;
35+
padding: 0;
36+
}
37+
2938
nav#api_nav #api_sections ul li.toctree-l2 a {
30-
color: #555459;
39+
color: #1d1c1d;
3140
text-transform: none;
3241
font-weight: inherit;
3342
padding: 0;
34-
color: #555459;
3543
display: block;
3644
text-overflow: ellipsis;
3745
overflow: hidden;
3846
white-space: nowrap;
39-
font-size: .9375rem!important;
47+
font-size: 15px!important;
48+
line-height:15px;
49+
padding: 4px 8px;
50+
border: 1px solid transparent;
51+
border-radius: 4px;
4052
}
4153

4254
nav#api_nav #api_sections ul li.toctree-l2 a:hover {
43-
background-color: #edf7fd;
44-
border-color: #dcf0fb
55+
cursor: pointer;
56+
text-decoration: none;
57+
background-color:#e8f5fa;
58+
border-color:#dcf0fb;
59+
}
60+
61+
nav#api_nav #footer #footer_nav {
62+
font-size: .9375rem;
4563
}
4664

4765
nav#api_nav #footer #footer_nav a {
4866
border: none;
4967
padding: 0;
68+
color: #616061;
69+
}
70+
71+
nav#api_nav #footer #footer_nav a:hover {
72+
text-decoration: none;
73+
color: #1c1c1c;
5074
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* Updates body font */
2+
body {
3+
font-family: Slack-Lato,appleLogo,sans-serif;
4+
}
5+
6+
/* Replaces old sidebar styled links */
7+
.sidebar_menu h5 {
8+
font-size: 0.8rem;
9+
font-weight: 800;
10+
margin-bottom: 3px;
11+
}
12+
13+
/* Aligns footer navigation to the left of the sidebar */
14+
.footer_nav {
15+
margin: 0 !important;
16+
}
17+
18+
/* Styles the signature all nice and pretty <3 */
19+
#footer_signature {
20+
color:#e01e5a;
21+
font-size:.9rem;
22+
margin-top: 10px;
23+
}
24+
25+
/* Fixes link hover state */
26+
a:hover {
27+
text-decoration: underline;
28+
}
29+
30+
/* Makes footer consistent */
31+
footer {
32+
background-color: transparent;
33+
border: 0;
34+
}

docs-src/_themes/slack/test.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: cb6db95cfbbc8b1d17ec073199ab6265
3+
config: 6abbc33d255b00e789666fcb765fbf2d
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_static/basic.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ div.sphinxsidebar input {
8181
font-size: 1em;
8282
}
8383

84+
div.sphinxsidebar #searchbox form.search {
85+
overflow: hidden;
86+
}
87+
8488
div.sphinxsidebar #searchbox input[type="text"] {
8589
float: left;
8690
width: 80%;
@@ -427,6 +431,13 @@ table.field-list td, table.field-list th {
427431
hyphens: manual;
428432
}
429433

434+
/* -- hlist styles ---------------------------------------------------------- */
435+
436+
table.hlist td {
437+
vertical-align: top;
438+
}
439+
440+
430441
/* -- other body styles ----------------------------------------------------- */
431442

432443
ol.arabic {

0 commit comments

Comments
 (0)