Fossil

Check-in [4dbfba2b]
Login

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

Overview
Comment:reduce html-validator errors on leaves page
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wolfgangFormat2CSS
Files: files | file ages | folders
SHA1: 4dbfba2bd8a63a0b0e03f753481f4d8da6cc24c1
User & Date: wolfgang 2010-09-09 21:32:12
Context
2010-09-09
21:41
section css extended with 'white-space: nowrap;' to avoid validator errors. PLEASE update your local styles for the section class check-in: 6436092e user: wolfgang tags: wolfgangFormat2CSS
21:32
reduce html-validator errors on leaves page check-in: 4dbfba2b user: wolfgang tags: wolfgangFormat2CSS
20:27
tag.c css skinned check-in: 6cf335ab user: wolfgang tags: wolfgangFormat2CSS
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/style.c.

459
460
461
462
463
464
465








466
467
468
469
470
471
472
...
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496



497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512

513
514


515
516
517
518
519
520
521
522
523
524
525
526
527
...
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
;
const char zSpanTimelineHistDsp[] =
@ /* the format for the timeline version display(no history permission!) */
@ span.timelineHistDsp {
@   font-weight: bold;
@ }
@








;
const char zATagLink[] =
@ /* the format for the tag links */
@ a.tagLink {
@ }
@
;
................................................................................
const char zSpanTagDsp[] =
@ /* the format for the tag display(no history permission!) */
@ span.tagDsp {
@   font-weight: bold;
@ }
@
;
typedef enum cssDefaultItems {
  cssOthers = 0,
  tableLabelValue,
  divSidebox,
  divSideboxTitle,
  divSideboxDescribed,
  spanDisabled,
  spanTimelineSuppressed,
  tableTimelineTable,
  tdTimelineTableCell,
  spanTimelineLeaf,
  aTimelineHistLink,
  spanTimelineHistDsp,
  aTagLink,
  spanTagDsp,
  cssDefaultCount
};



const struct strctCssDefaults {
  char const * const name;
  char const * const value;
} cssDefaultList[cssDefaultCount] = {
  { "",                      zDefaultCSS             },
  { "table.label-value",     zTableLabelValueCSS     },
  { "div.sidebox",           zDivSidebox             },
  { "div.sideboxTitle",      zDivSideboxTitle        },
  { "div.sideboxDescribed",  zDivSideboxDescribed    },
  { "span.disabled",         zSpanDisabled           },
  { "span.timelineDisabled", zSpanTimelineSuppressed },
  { "table.timelineTable",   zTableTimelineTable     },
  { "td.timelineTableCell",  zTdTimelineTableCell    },
  { "span.timelineLeaf",     zSpanTimelineLeaf       },
  { "a.timelineHistLink",    zATimelineHistLink      },
  { "span.timelineHistDsp",  zSpanTimelineHistDsp    },

  { "a.tagLink",             zATagLink               },
  { "span.tagDsp",           zSpanTagDsp             }


};

void cgi_append_default_css(void) {
  enum cssDefaultItems i;

  for (i=cssOthers;i<cssDefaultCount;i++)
    cgi_printf(cssDefaultList[i].value);
}

/*
** WEBPAGE: style.css
*/
void page_style_css(void){
................................................................................
  enum cssDefaultItems i;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  /* append user defined css */
  cgi_append_content(zCSS, -1);
  /* add special missing definitions */
  for (i=cssOthers+1;i<cssDefaultCount;i++)
    if (!strstr(zCSS,cssDefaultList[i].name))
      cgi_append_content(cssDefaultList[i].value, -1);
  g.isConst = 1;
}

/*
** WEBPAGE: test_env







>
>
>
>
>
>
>
>







 







|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>



|












>

|
>
>





|







 







|







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
...
481
482
483
484
485
486
487
488
489
490
491
492












493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
...
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
;
const char zSpanTimelineHistDsp[] =
@ /* the format for the timeline version display(no history permission!) */
@ span.timelineHistDsp {
@   font-weight: bold;
@ }
@
;
const char zTdTimelineTime[] =
@ /* the format for the timeline time display */
@ td.timelineTime {
@   vertical-align: top;
@   text-align: right;
@ }
@
;
const char zATagLink[] =
@ /* the format for the tag links */
@ a.tagLink {
@ }
@
;
................................................................................
const char zSpanTagDsp[] =
@ /* the format for the tag display(no history permission!) */
@ span.tagDsp {
@   font-weight: bold;
@ }
@
;
const char zSpanWikiError[] =
@ /* the format for wiki errors */
@ span.wikiError {
@   font-weight: bold;
@   color: red;












@ }
@
;
const struct strctCssDefaults {
  char const * const name;
  char const * const value;
} cssDefaultList[] = {
  { "",                      zDefaultCSS             },
  { "table.label-value",     zTableLabelValueCSS     },
  { "div.sidebox",           zDivSidebox             },
  { "div.sideboxTitle",      zDivSideboxTitle        },
  { "div.sideboxDescribed",  zDivSideboxDescribed    },
  { "span.disabled",         zSpanDisabled           },
  { "span.timelineDisabled", zSpanTimelineSuppressed },
  { "table.timelineTable",   zTableTimelineTable     },
  { "td.timelineTableCell",  zTdTimelineTableCell    },
  { "span.timelineLeaf",     zSpanTimelineLeaf       },
  { "a.timelineHistLink",    zATimelineHistLink      },
  { "span.timelineHistDsp",  zSpanTimelineHistDsp    },
  { "td.timelineTime",       zTdTimelineTime         },
  { "a.tagLink",             zATagLink               },
  { "span.tagDsp",           zSpanTagDsp             },
  { "span.wikiError",        zSpanWikiError          },
  { 0,                       0                       }
};

void cgi_append_default_css(void) {
  enum cssDefaultItems i;

  for (i=0;cssDefaultList[i].name;i++)
    cgi_printf(cssDefaultList[i].value);
}

/*
** WEBPAGE: style.css
*/
void page_style_css(void){
................................................................................
  enum cssDefaultItems i;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  /* append user defined css */
  cgi_append_content(zCSS, -1);
  /* add special missing definitions */
  for (i=1;cssDefaultList[i].name;i++)
    if (!strstr(zCSS,cssDefaultList[i].name))
      cgi_append_content(cssDefaultList[i].value, -1);
  g.isConst = 1;
}

/*
** WEBPAGE: test_env

Changes to src/timeline.c.

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
268
269
270
271
272
273
274

275
276
277
278
279
280
281
282
283
      @ <tr><td>
      @   <div class="divider"><nobr>%s(zPrevDate)</nobr></div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td valign="top" align="right">%s(zTime)</td>
    @ <td width="20" align="left" valign="top">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
      static Stmt qbranch;
................................................................................
      }else{
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }

    if( zBgClr && zBgClr[0] ){
      @ <td class="timelineTableCell" bgcolor="%h(zBgClr)">
    }else{
      @ <td class="timelineTableCell">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"







|
|







 







>

|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
      @ <tr><td>
      @   <div class="divider"><nobr>%s(zPrevDate)</nobr></div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td class="timelineTime">%s(zTime)</td>
    @ <td style="width: 20; text-align: left; vertical-align: top;">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
      static Stmt qbranch;
................................................................................
      }else{
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }
    @</td>
    if( zBgClr && zBgClr[0] ){
      @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
    }else{
      @ <td class="timelineTableCell">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"

Changes to src/wiki.c.

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
/*
** Check a wiki name.  If it is not well-formed, then issue an error
** and return true.  If it is well-formed, return false.
*/
static int check_name(const char *z){
  if( !wiki_name_is_wellformed((const unsigned char *)z) ){
    style_header("Wiki Page Name Error");
    @ The wiki name "<b>%h(z)</b>" is not well-formed.  Rules for
    @ wiki page names:
    well_formed_wiki_name_rules();
    style_footer();
    return 1;
  }
  return 0;
}

................................................................................
  @ </p>
  @ <form method="POST" action="%s(g.zBaseURL)/wikinew">
  @ <p>Name of new wiki page:
  @ <input type="text" width="35" name="name" value="%h(zName)">
  @ <input type="submit" value="Create">
  @ </p></form>
  if( zName[0] ){
    @ <p><b><font color="red">
    @ "%h(zName)" is not a valid wiki page name!</font></b></p>
  }
  style_footer();
}


/*
** Append the wiki text for an remark to the end of the given BLOB.







|
|







 







|
|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
/*
** Check a wiki name.  If it is not well-formed, then issue an error
** and return true.  If it is well-formed, return false.
*/
static int check_name(const char *z){
  if( !wiki_name_is_wellformed((const unsigned char *)z) ){
    style_header("Wiki Page Name Error");
    @ The wiki name "<span class="wikiError">%h(z)</span>" is not well-formed.
    @ Rules for wiki page names:
    well_formed_wiki_name_rules();
    style_footer();
    return 1;
  }
  return 0;
}

................................................................................
  @ </p>
  @ <form method="POST" action="%s(g.zBaseURL)/wikinew">
  @ <p>Name of new wiki page:
  @ <input type="text" width="35" name="name" value="%h(zName)">
  @ <input type="submit" value="Create">
  @ </p></form>
  if( zName[0] ){
    @ <p><span class="wikiError">
    @ "%h(zName)" is not a valid wiki page name!</span></p>
  }
  style_footer();
}


/*
** Append the wiki text for an remark to the end of the given BLOB.