# HG changeset patch # User Brendan Cully # Date 2008-11-21 02:15:50 # Node ID 03b60f2f90bf14594ffd733cace1102c5c10499b # Parent 92c952c4470c41647a30184b21466554021d580e hgweb (coal/paper): make file, diff and annotate easier to render This patch removes tables altogether for file and diff, and removes one column from annotate, making firefox's incremental renderer much faster for large files. diff --git a/templates/coal/changeset.tmpl b/templates/coal/changeset.tmpl --- a/templates/coal/changeset.tmpl +++ b/templates/coal/changeset.tmpl @@ -60,12 +60,8 @@ files, or words in the commit message
- - - - - -
linediff
+
line diff
+ {diff}
diff --git a/templates/coal/fileannotate.tmpl b/templates/coal/fileannotate.tmpl --- a/templates/coal/fileannotate.tmpl +++ b/templates/coal/fileannotate.tmpl @@ -67,8 +67,7 @@ files, or words in the commit message rev - line - source +   line source {annotate%annotateline} diff --git a/templates/coal/filediff.tmpl b/templates/coal/filediff.tmpl --- a/templates/coal/filediff.tmpl +++ b/templates/coal/filediff.tmpl @@ -61,12 +61,7 @@ files, or words in the commit message
- - - - - -
linediff
+
line diff
{diff}
diff --git a/templates/coal/filerevision.tmpl b/templates/coal/filerevision.tmpl --- a/templates/coal/filerevision.tmpl +++ b/templates/coal/filerevision.tmpl @@ -61,13 +61,9 @@ files, or words in the commit message
- - - - - +
line source
{text%fileline} -
linesource
+
diff --git a/templates/coal/map b/templates/coal/map --- a/templates/coal/map +++ b/templates/coal/map @@ -30,16 +30,16 @@ filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl filediff = filediff.tmpl filelog = filelog.tmpl -fileline = '{linenumber}{line|escape}' +fileline = '
{linenumber} {line|escape}
' filelogentry = filelogentry.tmpl -annotateline = '{author|user}@{rev}{linenumber}{line|escape}' +annotateline = '{author|user}@{rev}{linenumber} {line|escape}' -diffblock = '{lines}
' -difflineplus = '{linenumber}{line|escape}' -difflineminus = '{linenumber}{line|escape}' -difflineat = '{linenumber}{line|escape}' -diffline = '{linenumber}{line|escape}' +diffblock = '
{lines}
' +difflineplus = '{linenumber} {line|escape}' +difflineminus = '{linenumber} {line|escape}' +difflineat = '{linenumber} {line|escape}' +diffline = '{linenumber} {line|escape}' changelogparent = 'parent {rev}:{node|short}' diff --git a/templates/paper/map b/templates/paper/map --- a/templates/paper/map +++ b/templates/paper/map @@ -30,16 +30,16 @@ filerevision = ../coal/filerevision.tmpl fileannotate = ../coal/fileannotate.tmpl filediff = ../coal/filediff.tmpl filelog = ../coal/filelog.tmpl -fileline = '{linenumber}{line|escape}' +fileline = '
{linenumber} {line|escape}
' filelogentry = ../coal/filelogentry.tmpl -annotateline = '{author|user}@{rev}{linenumber}{line|escape}' +annotateline = '{author|user}@{rev}{linenumber} {line|escape}' -diffblock = '{lines}
' -difflineplus = '{linenumber}{line|escape}' -difflineminus = '{linenumber}{line|escape}' -difflineat = '{linenumber}{line|escape}' -diffline = '{linenumber}{line|escape}' +diffblock = '
{lines}
' +difflineplus = '{linenumber} {line|escape}' +difflineminus = '{linenumber} {line|escape}' +difflineat = '{linenumber} {line|escape}' +diffline = '{linenumber} {line|escape}' changelogparent = 'parent {rev}:{node|short}' diff --git a/templates/static/style-coal.css b/templates/static/style-coal.css --- a/templates/static/style-coal.css +++ b/templates/static/style-coal.css @@ -148,11 +148,21 @@ h3 { .bigtable .node { width: 5em; font-family: monospace;} .bigtable .lineno { width: 2em; text-align: right;} .bigtable .lineno a { color: #999; font-size: smaller; font-family: monospace;} -.bigtable td.source { font-family: monospace; white-space: pre; } .bigtable .permissions { width: 8em; text-align: left;} .bigtable .size { width: 5em; text-align: right; } .bigtable .annotate { text-align: right; } .bigtable td.annotate { font-size: smaller; } +.bigtable td.source { font-size: inherit; } + +.source, .sourcefirst, .sourcelast { + font-family: monospace; + white-space: pre; + font-size: 90%; +} +.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; font-size: smaller; } +.sourcelast { border-top: 1px solid #999; } +.source a { color: #999; font-size: smaller; font-family: monospace;} +.bottomline { border-bottom: 1px solid #999; } .fileline { font-family: monospace; } .fileline img { border: 0; } diff --git a/templates/static/style-paper.css b/templates/static/style-paper.css --- a/templates/static/style-paper.css +++ b/templates/static/style-paper.css @@ -137,13 +137,21 @@ h3 { .bigtable .author { width: 12em; } .bigtable .description { } .bigtable .node { width: 5em; font-family: monospace;} -.bigtable .lineno { width: 2em; text-align: right;} -.bigtable .lineno a { color: #999; font-size: smaller; font-family: monospace;} -.bigtable td.source { font-family: monospace; white-space: pre; } .bigtable .permissions { width: 8em; text-align: left;} .bigtable .size { width: 5em; text-align: right; } .bigtable .annotate { text-align: right; } .bigtable td.annotate { font-size: smaller; } +.bigtable td.source { font-size: inherit; } + +.source, .sourcefirst, .sourcelast { + font-family: monospace; + white-space: pre; + font-size: 90%; +} +.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; font-size: smaller; } +.sourcelast { border-top: 1px solid #999; } +.source a { color: #999; font-size: smaller; font-family: monospace;} +.bottomline { border-bottom: 1px solid #999; } .fileline { font-family: monospace; } .fileline img { border: 0; }