mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Update docgen style (#6723)
Switch to Lato font for better readability Make text darker Make spacing between paragraph and pre block consistent Fix search input box to prevent overlapping with text
This commit is contained in:
committed by
Andreas Rumpf
parent
c343303efe
commit
5fdc69dfbd
@@ -109,11 +109,11 @@ doc.body_toc_group = """
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div id="searchInput">
|
||||
Search: <input type="text" id="searchInput"
|
||||
onkeyup="search()" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="search-groupby">
|
||||
Group by:
|
||||
<select onchange="groupBy(this.value)">
|
||||
<option value="section">Section</option>
|
||||
@@ -139,7 +139,7 @@ doc.body_toc_group = """
|
||||
<ul class="simple">
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div id="searchInput">
|
||||
Search: <input type="text" id="searchInput"
|
||||
onkeyup="search()" />
|
||||
</div>
|
||||
@@ -184,7 +184,7 @@ doc.file = """<?xml version="1.0" encoding="utf-8" ?>
|
||||
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
|
||||
|
||||
<!-- Google fonts -->
|
||||
<link href='https://fonts.googleapis.com/css?family=Raleway:400,600,900' rel='stylesheet' type='text/css'/>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
|
||||
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
|
||||
|
||||
<!-- CSS -->
|
||||
@@ -217,18 +217,19 @@ html {
|
||||
|
||||
/* Where we want fancier font if available */
|
||||
h1, h2, h3, h4, h5, h6, p.module-desc, table.docinfo + blockquote p, table.docinfo blockquote p, h1 + blockquote p {
|
||||
font-family: "Raleway", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important; }
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important; }
|
||||
|
||||
h1.title {
|
||||
font-weight: 900; }
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
color: #666;
|
||||
background-color: rgba(252, 248, 244, 0.75); }
|
||||
color: #444;
|
||||
letter-spacing: 0.15px;
|
||||
background-color: rgba(252, 248, 244, 0.45); }
|
||||
|
||||
/* Skeleton grid */
|
||||
.container {
|
||||
@@ -344,8 +345,8 @@ cite {
|
||||
font-style: italic !important; }
|
||||
|
||||
dt > pre {
|
||||
border-color: rgba(0, 0, 0, 0.15);
|
||||
background-color: transparent;
|
||||
border-color: rgba(0, 0, 0, 0.1);
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
margin: 15px 0px 5px; }
|
||||
|
||||
dd > pre {
|
||||
@@ -362,6 +363,17 @@ dd > pre {
|
||||
width: 100%;
|
||||
table-layout: fixed; }
|
||||
|
||||
/* Nim search input */
|
||||
div#searchInput {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
div#searchInput input#searchInput {
|
||||
width: 10em;
|
||||
}
|
||||
div.search-groupby {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
table.line-nums-table {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #cccccc;
|
||||
@@ -505,7 +517,7 @@ img {
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
|
||||
|
||||
p {
|
||||
margin: 0 0 12px; }
|
||||
margin: 0 0 8px; }
|
||||
|
||||
small {
|
||||
font-size: 85%; }
|
||||
@@ -525,7 +537,7 @@ h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
color: inherit;
|
||||
@@ -533,6 +545,7 @@ h6 {
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
padding-bottom: .15em;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
margin-top: 1.0em;
|
||||
@@ -663,13 +676,13 @@ pre {
|
||||
box-sizing: border-box;
|
||||
min-width: calc(100% - 19.5px);
|
||||
padding: 9.5px;
|
||||
margin: 0.25em 10px 0.25em 10px;
|
||||
font-size: 14px;
|
||||
margin: 0.25em 10px 10px 10px;
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
white-space: pre !important;
|
||||
overflow-y: hidden;
|
||||
overflow-x: visible;
|
||||
background-color: whitesmoke;
|
||||
background-color: rgba(0, 0, 0, 0.01);
|
||||
border: 1px solid #cccccc;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
@@ -948,14 +961,14 @@ div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif; }
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: #b30000;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif; }
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
@@ -1002,7 +1015,7 @@ div.sidebar {
|
||||
clear: right; }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-size: medium; }
|
||||
|
||||
div.system-messages {
|
||||
@@ -1109,12 +1122,12 @@ p.rubric {
|
||||
text-align: center; }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: larger; }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-weight: bold; }
|
||||
|
||||
p.topic-title {
|
||||
@@ -1156,15 +1169,15 @@ pre.code .inserted, code .inserted {
|
||||
background-color: #A3D289; }
|
||||
|
||||
span.classifier {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-style: oblique; }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
|
||||
font-weight: bold; }
|
||||
|
||||
span.interpreted {
|
||||
font-family: "Helvetica Neue", "HelveticaNeue", "Raleway", Helvetica, Arial, sans-serif; }
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap; }
|
||||
@@ -1187,7 +1200,7 @@ table.docinfo {
|
||||
margin: 0em;
|
||||
margin-top: 2em;
|
||||
margin-bottom: 2em;
|
||||
font-family: "Raleway", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important;
|
||||
font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important;
|
||||
color: #444444; }
|
||||
|
||||
table.docutils {
|
||||
|
||||
Reference in New Issue
Block a user