mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Upgrade dartdoc to 0.12.0 (#10296)
* update the docs css style so the generated dartdoc matches the new flutter.io * Change to 0.12.0 dartdoc * Review comment
This commit is contained in:
parent
7566f73d0d
commit
7fb798f5f1
@ -8,7 +8,7 @@ set -e
|
|||||||
bin/flutter --version
|
bin/flutter --version
|
||||||
|
|
||||||
# Install dartdoc.
|
# Install dartdoc.
|
||||||
bin/cache/dart-sdk/bin/pub global activate dartdoc 0.11.1
|
bin/cache/dart-sdk/bin/pub global activate dartdoc 0.12.0
|
||||||
|
|
||||||
# This script generates a unified doc set, and creates
|
# This script generates a unified doc set, and creates
|
||||||
# a custom index.html, placing everything into dev/docs/doc.
|
# a custom index.html, placing everything into dev/docs/doc.
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<!-- style overrides for dartdoc -->
|
<!-- style overrides for dartdoc -->
|
||||||
<style>
|
<style>
|
||||||
@import 'https://fonts.googleapis.com/css?family=Roboto:100i';
|
@import 'https://fonts.googleapis.com/css?family=Roboto:500,400italic,300,400,100i';
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
font-family: Roboto, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #111;
|
color: #111;
|
||||||
background-color: #fdfdfd;
|
background-color: #fdfdfd;
|
||||||
@ -14,7 +15,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
background-color: #01579b;
|
background-color: white;
|
||||||
|
color: #424242;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.navbar {
|
||||||
|
min-height: 57px;
|
||||||
|
padding: 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header.header-fixed nav.navbar-fixed-top {
|
||||||
|
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2 {
|
h1, h2 {
|
||||||
@ -36,7 +47,7 @@
|
|||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
color: #111;
|
color: #111;
|
||||||
font-size: 26px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown h2 {
|
.markdown h2 {
|
||||||
@ -44,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
section.summary h2 {
|
section.summary h2 {
|
||||||
font-size: 32px;
|
font-size: 24px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
@ -54,10 +65,6 @@
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-offcanvas-left {
|
|
||||||
background-color: #fdfdfd;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.sidebar-offcanvas-left.active {
|
.sidebar-offcanvas-left.active {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -68,31 +75,23 @@
|
|||||||
padding: 0 16px 16px 0;
|
padding: 0 16px 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar h5 {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-offcanvas-left h5 {
|
.sidebar-offcanvas-left h5 {
|
||||||
border-bottom: none;
|
display: none;
|
||||||
padding: 0 0 16px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-offcanvas-left h5:last-of-type {
|
|
||||||
padding: 0 0 16px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
pre.prettyprint,
|
pre.prettyprint,
|
||||||
pre > code {
|
pre > code {
|
||||||
font-size: 15px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
pre.prettyprint {
|
pre.prettyprint {
|
||||||
background: inherit;
|
background: #f5f2f0;
|
||||||
border: none;
|
|
||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px 0;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
@ -103,21 +102,21 @@
|
|||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#search-box {
|
||||||
|
color: #555;
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-family: inherit;
|
||||||
|
padding: 4px 6px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
dl.dl-horizontal dt {
|
dl.dl-horizontal dt {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
|
||||||
border-top: 1px solid #e8e8e8;
|
|
||||||
height: inherit;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
text-transform: lowercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer p {
|
|
||||||
color: #828282;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Line the material icons up with their labels */
|
/* Line the material icons up with their labels */
|
||||||
i.material-icons.md-36,
|
i.material-icons.md-36,
|
||||||
i.material-icons.md-48 {
|
i.material-icons.md-48 {
|
||||||
|
@ -84,7 +84,7 @@ dependencies:
|
|||||||
'global', 'run', 'dartdoc',
|
'global', 'run', 'dartdoc',
|
||||||
'--header', 'styles.html',
|
'--header', 'styles.html',
|
||||||
'--header', 'analytics.html',
|
'--header', 'analytics.html',
|
||||||
'--footer', 'lib/footer.html',
|
'--footer-text', 'lib/footer.html',
|
||||||
'--exclude', 'temp_doc',
|
'--exclude', 'temp_doc',
|
||||||
'--favicon=favicon.ico',
|
'--favicon=favicon.ico',
|
||||||
'--use-categories',
|
'--use-categories',
|
||||||
@ -120,8 +120,8 @@ void createFooter(String footerPath) {
|
|||||||
final String timestamp = new DateFormat('yyyy-MM-dd HH:mm').format(new DateTime.now());
|
final String timestamp = new DateFormat('yyyy-MM-dd HH:mm').format(new DateTime.now());
|
||||||
|
|
||||||
new File(footerPath).writeAsStringSync(
|
new File(footerPath).writeAsStringSync(
|
||||||
'<p class="text-center" style="font-size: 10px">'
|
'• </span class="no-break">$timestamp<span> '
|
||||||
'Generated on $timestamp - Version $gitHead</p>'
|
'• </span class="no-break">$gitHead</span>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user