Skip to content

Commit 2bb1179

Browse files
committed
REF: HTML: Minor template changes
1 parent 9533631 commit 2bb1179

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

pdoc/templates/css.mako

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
2121
#sidebar {
22-
padding: 30px;
22+
padding: 1.5em;
2323
overflow: hidden;
2424
}
2525
#sidebar > *:last-child {
@@ -63,11 +63,11 @@
6363
}
6464
h2 {
6565
font-size: 1.75em;
66-
margin: 1em 0 .50em 0;
66+
margin: 2em 0 .50em 0;
6767
}
6868
h3 {
6969
font-size: 1.4em;
70-
margin: 25px 0 10px 0;
70+
margin: 1.6em 0 .7em 0;
7171
}
7272
h4 {
7373
margin: 0;
@@ -86,11 +86,10 @@
8686
a {
8787
color: #058;
8888
text-decoration: none;
89-
transition: color .3s ease-in-out;
90-
}
91-
a:hover {
92-
color: #e82;
89+
transition: color .2s ease-in-out;
9390
}
91+
a:visited {color: #503}
92+
a:hover {color: #b62}
9493
9594
.title code {
9695
font-weight: bold;
@@ -100,27 +99,27 @@
10099
}
101100
.ident {
102101
color: #900;
102+
font-weight: bold;
103103
}
104104
105105
pre code {
106-
background: #f8f8f8;
107106
font-size: .8em;
108107
line-height: 1.4em;
108+
padding: 1em;
109+
display: block;
109110
}
110111
code {
111-
background: #f2f2f1;
112+
background: #f3f3f3;
113+
font-family: "DejaVu Sans Mono", monospace;
112114
padding: 1px 4px;
113115
overflow-wrap: break-word;
114116
}
115117
h1 code { background: transparent }
116118
117119
pre {
118-
background: #f8f8f8;
119-
border: 0;
120120
border-top: 1px solid #ccc;
121121
border-bottom: 1px solid #ccc;
122122
margin: 1em 0;
123-
padding: 1ex;
124123
}
125124
126125
#http-server-module-list {
@@ -181,7 +180,6 @@
181180
}
182181
.name {
183182
background: #eee;
184-
font-weight: bold;
185183
font-size: .85em;
186184
padding: 5px 10px;
187185
display: inline-block;
@@ -271,7 +269,7 @@
271269
}
272270
273271
.admonition {
274-
padding: .1em .5em;
272+
padding: .1em 1em;
275273
margin-bottom: 1em;
276274
}
277275
.admonition-title {
@@ -318,7 +316,7 @@
318316
pre code {
319317
font-size: 1em;
320318
}
321-
.item .name {
319+
.name {
322320
font-size: 1em;
323321
}
324322
main {
@@ -327,8 +325,8 @@
327325
justify-content: flex-end;
328326
}
329327
.toc ul ul,
330-
#index ul {
331-
padding-left: 1.5em;
328+
#index ul ul {
329+
padding-left: 1em;
332330
}
333331
.toc > ul > li {
334332
margin-top: .5em;

pdoc/templates/html.mako

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@
301301
<%include file="_lunr_search.inc.mako"/>
302302
% endif
303303
304-
<h1>Index</h1>
305304
${extract_toc(module.docstring) if extract_module_toc_into_sidebar else ''}
306305
<ul id="index">
307306
% if supermodule:
@@ -367,19 +366,19 @@
367366
<html lang="${html_lang}">
368367
<head>
369368
<meta charset="utf-8">
370-
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
371-
<meta name="generator" content="pdoc ${pdoc.__version__}" />
369+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
370+
<meta name="generator" content="pdoc3 ${pdoc.__version__}">
372371

373372
<%
374373
module_list = 'modules' in context.keys() # Whether we're showing module list in server mode
375374
%>
376375

377376
% if module_list:
378377
<title>Python module list</title>
379-
<meta name="description" content="A list of documented Python modules." />
378+
<meta name="description" content="A list of documented Python modules.">
380379
% else:
381380
<title>${module.name} API documentation</title>
382-
<meta name="description" content="${module.docstring | glimpse, trim, h}" />
381+
<meta name="description" content="${module.docstring | glimpse, trim, h}">
383382
% endif
384383

385384
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>

0 commit comments

Comments
 (0)