Fossil SCM

Gave the BLOCKQUOTE which surrounds file content the file-content CSS class and trimmed its margins a bit. Fixed the truncated-by-one file extension uses in the language-XYZ tag in non-line-numbered file content, caused by refactoring from this branch.

stephan 2020-08-16 04:08 line-number-selection
Commit 62b682bded84ebd86edae24693baab6a464911b4c69ac140af19685595dc9dec
2 files changed +5 +2 -2
--- src/default.css
+++ src/default.css
@@ -1266,5 +1266,10 @@
12661266
opacity: 0.8;
12671267
border-size: 1px;
12681268
border-style: dotted;
12691269
border-color: rgb( 127, 127, 127, 0.5 );
12701270
}
1271
+
1272
+blockquote.file-content {
1273
+ /* file content block in the /file page */
1274
+ margin: 1em 2em;
1275
+}
12711276
--- src/default.css
+++ src/default.css
@@ -1266,5 +1266,10 @@
1266 opacity: 0.8;
1267 border-size: 1px;
1268 border-style: dotted;
1269 border-color: rgb( 127, 127, 127, 0.5 );
1270 }
 
 
 
 
 
1271
--- src/default.css
+++ src/default.css
@@ -1266,5 +1266,10 @@
1266 opacity: 0.8;
1267 border-size: 1px;
1268 border-style: dotted;
1269 border-color: rgb( 127, 127, 127, 0.5 );
1270 }
1271
1272 blockquote.file-content {
1273 /* file content block in the /file page */
1274 margin: 1em 2em;
1275 }
1276
+2 -2
--- src/info.c
+++ src/info.c
@@ -2442,11 +2442,11 @@
24422442
if( zLn==0 || atoi(zLn)==0 ){
24432443
style_submenu_checkbox("ln", "Line Numbers", 0, 0);
24442444
}
24452445
blob_to_utf8_no_bom(&content, 0);
24462446
zMime = mimetype_from_content(&content);
2447
- @ <blockquote>
2447
+ @ <blockquote class="file-content">
24482448
if( zMime==0 ){
24492449
const char *z, *zFileName, *zExt;
24502450
z = blob_str(&content);
24512451
zFileName = db_text(0,
24522452
"SELECT name FROM mlink, filename"
@@ -2457,11 +2457,11 @@
24572457
if( zLn ){
24582458
output_text_with_line_numbers(z, blob_size(&content),
24592459
zFileName, zLn);
24602460
}else if( zExt && zExt[1] ){
24612461
@ <pre>
2462
- @ <code class="language-%s(zExt+1)">%h(z)</code>
2462
+ @ <code class="language-%s(zExt)">%h(z)</code>
24632463
@ </pre>
24642464
}else{
24652465
@ <pre>
24662466
@ %h(z)
24672467
@ </pre>
24682468
--- src/info.c
+++ src/info.c
@@ -2442,11 +2442,11 @@
2442 if( zLn==0 || atoi(zLn)==0 ){
2443 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2444 }
2445 blob_to_utf8_no_bom(&content, 0);
2446 zMime = mimetype_from_content(&content);
2447 @ <blockquote>
2448 if( zMime==0 ){
2449 const char *z, *zFileName, *zExt;
2450 z = blob_str(&content);
2451 zFileName = db_text(0,
2452 "SELECT name FROM mlink, filename"
@@ -2457,11 +2457,11 @@
2457 if( zLn ){
2458 output_text_with_line_numbers(z, blob_size(&content),
2459 zFileName, zLn);
2460 }else if( zExt && zExt[1] ){
2461 @ <pre>
2462 @ <code class="language-%s(zExt+1)">%h(z)</code>
2463 @ </pre>
2464 }else{
2465 @ <pre>
2466 @ %h(z)
2467 @ </pre>
2468
--- src/info.c
+++ src/info.c
@@ -2442,11 +2442,11 @@
2442 if( zLn==0 || atoi(zLn)==0 ){
2443 style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2444 }
2445 blob_to_utf8_no_bom(&content, 0);
2446 zMime = mimetype_from_content(&content);
2447 @ <blockquote class="file-content">
2448 if( zMime==0 ){
2449 const char *z, *zFileName, *zExt;
2450 z = blob_str(&content);
2451 zFileName = db_text(0,
2452 "SELECT name FROM mlink, filename"
@@ -2457,11 +2457,11 @@
2457 if( zLn ){
2458 output_text_with_line_numbers(z, blob_size(&content),
2459 zFileName, zLn);
2460 }else if( zExt && zExt[1] ){
2461 @ <pre>
2462 @ <code class="language-%s(zExt)">%h(z)</code>
2463 @ </pre>
2464 }else{
2465 @ <pre>
2466 @ %h(z)
2467 @ </pre>
2468

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button