Fossil

Check-in [62b682bded]
Login

Check-in [62b682bded]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | line-number-selection
Files: files | file ages | folders
SHA3-256: 62b682bded84ebd86edae24693baab6a464911b4c69ac140af19685595dc9dec
User & Date: stephan 2020-08-16 04:08:53.156
Context
2020-08-16
05:10
Several padding tweaks to ensure proper line/code alignment in all of the skins. ... (check-in: e0e5449aa4 user: stephan tags: line-number-selection)
04:08
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. ... (check-in: 62b682bded user: stephan tags: line-number-selection)
03:53
Added 'important' to 'hidden' CSS rules to ensure that its visibility-hindering attributes trump other classes' attributes. This fixes the .hidden-yet-visible toast message popup and makes .hidden more future-proof. ... (check-in: 22c592fc32 user: stephan tags: line-number-selection)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/default.css.
1264
1265
1266
1267
1268
1269
1270





  border-radius: 0.25em;
  font-size: 1em;
  opacity: 0.8;
  border-size: 1px;
  border-style: dotted;
  border-color: rgb( 127, 127, 127, 0.5 );
}












>
>
>
>
>
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
  border-radius: 0.25em;
  font-size: 1em;
  opacity: 0.8;
  border-size: 1px;
  border-style: dotted;
  border-color: rgb( 127, 127, 127, 0.5 );
}

blockquote.file-content {
  /* file content block in the /file page */
  margin: 1em 2em;
}
Changes to src/info.c.
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
    }else{
      style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
      if( zLn==0 || atoi(zLn)==0 ){
        style_submenu_checkbox("ln", "Line Numbers", 0, 0);
      }
      blob_to_utf8_no_bom(&content, 0);
      zMime = mimetype_from_content(&content);
      @ <blockquote>
      if( zMime==0 ){
        const char *z, *zFileName, *zExt;
        z = blob_str(&content);
        zFileName = db_text(0,
         "SELECT name FROM mlink, filename"
         " WHERE filename.fnid=mlink.fnid"
         "   AND mlink.fid=%d",
         rid);
        zExt = file_extension(zFileName);
        if( zLn ){
          output_text_with_line_numbers(z, blob_size(&content),
                                        zFileName, zLn);
        }else if( zExt && zExt[1] ){
          @ <pre>
          @ <code class="language-%s(zExt+1)">%h(z)</code>
          @ </pre>
        }else{
          @ <pre>
          @ %h(z)
          @ </pre>
        }
      }else if( strncmp(zMime, "image/", 6)==0 ){







|














|







2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
    }else{
      style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
      if( zLn==0 || atoi(zLn)==0 ){
        style_submenu_checkbox("ln", "Line Numbers", 0, 0);
      }
      blob_to_utf8_no_bom(&content, 0);
      zMime = mimetype_from_content(&content);
      @ <blockquote class="file-content">
      if( zMime==0 ){
        const char *z, *zFileName, *zExt;
        z = blob_str(&content);
        zFileName = db_text(0,
         "SELECT name FROM mlink, filename"
         " WHERE filename.fnid=mlink.fnid"
         "   AND mlink.fid=%d",
         rid);
        zExt = file_extension(zFileName);
        if( zLn ){
          output_text_with_line_numbers(z, blob_size(&content),
                                        zFileName, zLn);
        }else if( zExt && zExt[1] ){
          @ <pre>
          @ <code class="language-%s(zExt)">%h(z)</code>
          @ </pre>
        }else{
          @ <pre>
          @ %h(z)
          @ </pre>
        }
      }else if( strncmp(zMime, "image/", 6)==0 ){