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.
Commit
62b682bded84ebd86edae24693baab6a464911b4c69ac140af19685595dc9dec
Parent
22c592fc3251e11…
2 files changed
+5
+2
-2
+5
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1266,5 +1266,10 @@ | ||
| 1266 | 1266 | opacity: 0.8; |
| 1267 | 1267 | border-size: 1px; |
| 1268 | 1268 | border-style: dotted; |
| 1269 | 1269 | border-color: rgb( 127, 127, 127, 0.5 ); |
| 1270 | 1270 | } |
| 1271 | + | |
| 1272 | +blockquote.file-content { | |
| 1273 | + /* file content block in the /file page */ | |
| 1274 | + margin: 1em 2em; | |
| 1275 | +} | |
| 1271 | 1276 |
| --- 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 @@ | ||
| 2442 | 2442 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2443 | 2443 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2444 | 2444 | } |
| 2445 | 2445 | blob_to_utf8_no_bom(&content, 0); |
| 2446 | 2446 | zMime = mimetype_from_content(&content); |
| 2447 | - @ <blockquote> | |
| 2447 | + @ <blockquote class="file-content"> | |
| 2448 | 2448 | if( zMime==0 ){ |
| 2449 | 2449 | const char *z, *zFileName, *zExt; |
| 2450 | 2450 | z = blob_str(&content); |
| 2451 | 2451 | zFileName = db_text(0, |
| 2452 | 2452 | "SELECT name FROM mlink, filename" |
| @@ -2457,11 +2457,11 @@ | ||
| 2457 | 2457 | if( zLn ){ |
| 2458 | 2458 | output_text_with_line_numbers(z, blob_size(&content), |
| 2459 | 2459 | zFileName, zLn); |
| 2460 | 2460 | }else if( zExt && zExt[1] ){ |
| 2461 | 2461 | @ <pre> |
| 2462 | - @ <code class="language-%s(zExt+1)">%h(z)</code> | |
| 2462 | + @ <code class="language-%s(zExt)">%h(z)</code> | |
| 2463 | 2463 | @ </pre> |
| 2464 | 2464 | }else{ |
| 2465 | 2465 | @ <pre> |
| 2466 | 2466 | @ %h(z) |
| 2467 | 2467 | @ </pre> |
| 2468 | 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> |
| 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 |