de-emphasize the footer of the generated docs (#12514)

This commit is contained in:
Devon Carew 2017-10-13 13:31:32 -07:00 committed by GitHub
parent 4ffa801cb1
commit 00c4c7b023
2 changed files with 16 additions and 4 deletions

View File

@ -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/ -->

View File

@ -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>'
);
}