de-emphasize the footer of the generated docs (#12514)
This commit is contained in:
parent
4ffa801cb1
commit
00c4c7b023
@ -134,8 +134,17 @@
|
||||
}
|
||||
|
||||
/* Attempt to de-emphasise the source code section */
|
||||
section.summary.source-code { opacity: 0.3; }
|
||||
section.summary.source-code:hover { opacity: 0.8; }
|
||||
section.summary.source-code {
|
||||
opacity: 0.3;
|
||||
}
|
||||
section.summary.source-code:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
footer {
|
||||
font-size: 13px;
|
||||
padding: 12px 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- The following rules are from http://google.github.io/material-design-icons/ -->
|
||||
|
@ -139,14 +139,17 @@ dependencies:
|
||||
}
|
||||
|
||||
void createFooter(String footerPath) {
|
||||
const int kGitRevisionLength = 10;
|
||||
|
||||
final ProcessResult gitResult = Process.runSync('git', <String>['rev-parse', 'HEAD']);
|
||||
final String gitHead = (gitResult.exitCode == 0) ? gitResult.stdout.trim() : 'unknown';
|
||||
String gitRevision = (gitResult.exitCode == 0) ? gitResult.stdout.trim() : 'unknown';
|
||||
gitRevision = gitRevision.length > kGitRevisionLength ? gitRevision.substring(0, kGitRevisionLength) : gitRevision;
|
||||
|
||||
final String timestamp = new DateFormat('yyyy-MM-dd HH:mm').format(new DateTime.now());
|
||||
|
||||
new File(footerPath).writeAsStringSync(
|
||||
'• </span class="no-break">$timestamp<span> '
|
||||
'• </span class="no-break">$gitHead</span>'
|
||||
'• </span class="no-break">$gitRevision</span>'
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user