mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-26 06:49:19 +00:00
Make links less distracting in HTML output
Having underlined blue text everywhere was too noisy. This changes the CSS style for internal links to be plain black text that gets blue and underliney when you hover the mouse over it. Also, added the current date and time to the set of template substitutions.
This commit is contained in:
parent
488df3e68e
commit
0877857e7e
@ -386,7 +386,8 @@ namespace SourceGen {
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform some quick substitutions.
|
||||
// Perform some quick substitutions. This could be done more efficiently,
|
||||
// but we're only doing this on the template file, which should be small.
|
||||
tmplStr = tmplStr.Replace("$ProjectName$", mProject.DataFileName);
|
||||
tmplStr = tmplStr.Replace("$AppVersion$", App.ProgramVersion.ToString());
|
||||
string expModeStr = ((Formatter.FormatConfig.ExpressionMode)
|
||||
@ -394,6 +395,10 @@ namespace SourceGen {
|
||||
typeof(Formatter.FormatConfig.ExpressionMode),
|
||||
(int)Formatter.FormatConfig.ExpressionMode.Unknown)).ToString();
|
||||
tmplStr = tmplStr.Replace("$ExpressionStyle$", expModeStr);
|
||||
string dateStr = DateTime.Now.ToString("yyyy/MM/dd");
|
||||
string timeStr = DateTime.Now.ToString("HH:mm:ss zzz");
|
||||
tmplStr = tmplStr.Replace("$CurrentDate$", dateStr);
|
||||
tmplStr = tmplStr.Replace("$CurrentTime$", timeStr);
|
||||
|
||||
// Generate and substitute the symbol table. This should be small enough that
|
||||
// we won't break the world by doing it with string.Replace().
|
||||
@ -411,7 +416,6 @@ namespace SourceGen {
|
||||
string template1 = tmplStr.Substring(0, splitPoint);
|
||||
string template2 = tmplStr.Substring(splitPoint + CodeLinesStr.Length);
|
||||
|
||||
|
||||
// Generate UTF-8 text, without a byte-order mark.
|
||||
using (StreamWriter sw = new StreamWriter(pathName, false, new UTF8Encoding(false))) {
|
||||
sw.Write(template1);
|
||||
|
@ -28,7 +28,8 @@ $SymbolTable$
|
||||
|
||||
<div id="footer">
|
||||
<hr/>
|
||||
<p>HTML generated by <a href="https://6502bench.com/">6502bench SourceGen</a> v$AppVersion$</p>
|
||||
<p>HTML generated by <a href="https://6502bench.com/">6502bench SourceGen</a> v$AppVersion$
|
||||
on $CurrentDate$ <!--$CurrentTime$--></p>
|
||||
<p>Expression style: $ExpressionStyle$</p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -11,3 +11,16 @@ table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/*
|
||||
* Blue underlined text is distracting. Change internal links to be
|
||||
* plain black text until they're hovered over.
|
||||
*/
|
||||
a[href^="#"]:link, a[href^="#"]:visited {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
a[href^="#"]:hover {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
Loading…
Reference in New Issue
Block a user