Changeset 400 for trunk


Ignore:
Timestamp:
Jun 28, 2007, 2:19:31 AM (16 years ago)
Author:
Peter Johansson
Message:

fixes #225 and fixes other issues to conform into XHTML 1.0 Strict. Still using tag <font> though (see #226)

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r380 r400  
    163163                   local_path()+"/index.html");
    164164    path_anchor(os);
    165     os << "<p align=center>\n<img src='";
     165    os << "<p class=\"plot\">\n<img src='";
    166166    for (size_t i=0; i<level_; ++i)
    167167      os << "../";
     
    171171    else
    172172      os << imagedir << "/index.png";
    173     os << "' alt='[plot]' border=0><br>\n";
     173    os << "' alt='[plot]' /></p>\n";
    174174    os << "<h3>File Summary";
    175175    if (user!="all")
     
    238238    os << "</table>\n";
    239239    print_author_summary(os, line_type, log);
    240     os << "</p>\n";
     240    os << "\n";
    241241    print_footer(os);
    242242    os.close();
  • trunk/lib/File.cc

    r399 r400  
    8484  void File::print_blame(std::ofstream& os) const
    8585  {
    86     os << "<br><h3>Blame Information</h3>";
     86    os << "<br /><h3>Blame Information</h3>";
    8787    os << "<table class=\"blame\">\n";
    8888    os << "<thead>\n";
     
    115115      std::string color;
    116116      if (using_dates)
    117         color=hex(static_cast<int>(k*Date(blame.date()).seconds()+m),2);
     117        color = hex(static_cast<int>(k*Date(blame.date()).seconds()+m),2);
    118118      else
    119         color=hex(static_cast<int>(k*blame.revision()+m),2);
     119        color = hex(static_cast<int>(k*blame.revision()+m),2);
    120120      os << "<tr>\n<td class=\"number\"><font color=\"#" << color
    121121         << color << color << "\">" << blame.revision()
    122          << "</td>\n<td class=\"date\"><font color=\"#" << color
    123          << color << color << "\">" << Date(blame.date())("%e %b %y")
    124          << "</td>\n<td class=\"author\">";
     122         << "</font></td>\n<td class=\"date\"><font color=\"#" << color
     123         << color << color << "\">"
     124         << Date(blame.date())("%e %b %y")
     125         << "</font></td>\n<td class=\"author\">";
    125126      hs << blame.author();
    126127      os << "</td>\n<td class=\"number\">" << blame.line_no()+1
     
    261262    path_anchor(os);
    262263
    263     os << "<p align=center>\n<img src='";
     264    os << "<p class=\"plot\">\n<img src='";
    264265    for (size_t i=0; i<level_; ++i)
    265266      os << "../";
     
    269270    else
    270271      os << imagefile;
    271     os << "' alt='[plot]' border=0>\n</p>";
     272    os << "' alt='[plot]' />\n</p>";
    272273
    273274    print_author_summary(os, line_type, log);
    274     os << "</p>\n";
     275    os << "\n";
    275276
    276277    print_blame(os);
  • trunk/lib/Trac.cc

    r317 r400  
    205205    if (node.empty())
    206206      href = std::string(Configuration::instance().trac_root()+
    207                          "changeset?new="+new_rev+"&old="+old_rev);
     207                         "changeset?new="+new_rev+"&amp;old="+old_rev);
    208208    else
    209209      href = std::string(Configuration::instance().trac_root()+
    210                          "changeset?new="+new_rev+"&new_path="+node+"&old="+
    211                          old_rev+"&old_path="+node);
     210                         "changeset?new="+new_rev+"&amp;new_path="+node+
     211                         "&amp;old="+old_rev+"&amp;old_path="+node);
    212212    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    213213    return true;
     
    240240    }
    241241    std::string href(Configuration::instance().trac_root()+
    242                      "changeset?new_path="+new_path+"&old_path="+old_path);
     242                     "changeset?new_path="+new_path+"&amp;old_path="+old_path);
    243243    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    244244    return true;
     
    282282   
    283283    std::string href(Configuration::instance().trac_root()+
    284                      "changeset?new="+new_rev+"&new_path="+new_path+
    285                      "&old="+old_rev+"&old_path="+old_path);
     284                     "changeset?new="+new_rev+"&amp;new_path="+new_path+
     285                     "&amp;old="+old_rev+"&amp;old_path="+old_path);
    286286    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    287287    return true;
     
    327327    }
    328328    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    329                      rev+"&stop_rev="+stop_rev);
     329                     rev+"&amp;stop_rev="+stop_rev);
    330330    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    331331    return true;
     
    358358    ++first; // eating ']'
    359359    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    360                      rev+"&stop_rev="+stop_rev);
     360                     rev+"&amp;stop_rev="+stop_rev);
    361361    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    362362    return true;
     
    395395    if (!node.empty() && node[0]=='/')
    396396      href = std::string(Configuration::instance().trac_root()+"log"+node+
    397                          "?rev="+rev+"&stop_rev="+stop_rev);
     397                         "?rev="+rev+"&amp;stop_rev="+stop_rev);
    398398    else
    399399      href = std::string(Configuration::instance().trac_root()+"log/"+node+
    400                          "?rev="+rev+"&stop_rev="+stop_rev);
     400                         "?rev="+rev+"&amp;stop_rev="+stop_rev);
    401401     
    402402    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
  • trunk/lib/css.cc

    r380 r400  
    149149    s << "}\n\n";
    150150
     151
     152    s << "p.plot { text-align: center; }\n";
     153    s << "p.plot img { border: 0; }\n";
     154
     155    s << "p.footer {\n";
     156    s << "text-align: center;\n";
     157    s << "font-size: 70%;\n";
     158    s << "}\n\n";
     159
    151160    s << "table.blame {\n";
    152161    s << " clear: both;\n";
  • trunk/lib/first_page.cc

    r378 r400  
    2424#include "first_page.h"
    2525
    26 #include "html_utility.h"
    27 
    2826#include "Commitment.h"
    2927#include "Configuration.h"
    3028#include "Date.h"
    3129#include "HtmlStream.h"
     30#include "html_utility.h"
    3231#include "Stats.h"
    3332#include "SVNlog.h"
     
    201200      }
    202201
    203       os << "</td></tr>";
     202      os << "</td></tr>\n";
    204203      ++a;
    205204      ++d;
     
    216215    stats.plot_summary(name);
    217216    os << "<div class=\"main\">\n";
    218     os << "<img src='" << name << "' alt='[plot]'>";
     217    os << "<img src='" << name << "' alt='[plot]'/>";
    219218    os << "</div>";
    220219  }
  • trunk/lib/html_utility.cc

    r376 r400  
    5757  {
    5858    Date date;
    59     os << "<p align=center><font size=-2>\nGenerated on "
     59    os << "<p class=\"footer\">\nGenerated on "
    6060       << date("%a %b %d %H:%M:%S %Y") << " (UTC) by "
    6161       << anchor("http://lev.thep.lu.se/trac/svndigest/",
    6262                 PACKAGE_STRING, 0, "")
    63        << "</font>\n</p>\n</div>\n</body>\n</html>\n";
     63       << "\n</p>\n</div>\n</body>\n</html>\n";
    6464  }
    6565
     
    7272       << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
    7373       << "<html xmlns=\"http://www.w3.org/1999/xhtml\""
    74        << " xml:lang=\"en\" lang=\"en\"><head>\n"
     74       << " xml:lang=\"en\" lang=\"en\">\n"
    7575       << "<head>\n"
    7676       << "<title> " << title << " - svndigest</title>\n"
    77        << "</head>\n"
    7877       << "<link rel=\"stylesheet\" "
    7978       << "href=\"";
     
    8180      os << "../";
    8281    os << "svndigest.css\" type=\"text/css\" />\n"
     82       << "</head>\n"
    8383       << "<body>\n"
    8484       << "<div id=\"menu\">"
  • trunk/test/trac.cc

    r317 r400  
    5353             conf.trac_root()+"ticket/123#comment:1", my_out);
    5454  ok &= test("diff:trunk@12:123", conf.trac_root()+
    55              "changeset?new=123&new_path=trunk&old=12&old_path=trunk",
     55             "changeset?new=123&amp;new_path=trunk&amp;"+
     56             "old=12&amp;old_path=trunk",
    5657             my_out);
    5758  ok &= test("diff:tags/1.0", conf.trac_root()+
    58              "changeset?new_path=tags/1.0&old_path=tags/1.0",
     59             "changeset?new_path=tags/1.0&amp;old_path=tags/1.0",
    5960             my_out);
    6061  ok &= test("diff:tags/1.0//tags/1.0.1", conf.trac_root()+
    61              "changeset?new_path=tags/1.0.1&old_path=tags/1.0",
     62             "changeset?new_path=tags/1.0.1&amp;old_path=tags/1.0",
    6263             my_out);
    6364  ok &= test("diff:tags/1.0@123//trunk@236", conf.trac_root()+
    64              "changeset?new=236&new_path=trunk&old=123&old_path=tags/1.0",
     65             "changeset?new=236&amp;new_path=trunk&amp;"+
     66             "old=123&amp;old_path=tags/1.0",
    6567             my_out);
    66   ok &= test("r123:236", conf.trac_root()+"log/?rev=236&stop_rev=123", my_out);
    67   ok &= test("[123:236]",conf.trac_root()+"log/?rev=236&stop_rev=123", my_out);
     68  ok &= test("r123:236", conf.trac_root()+"log/?rev=236&amp;stop_rev=123",
     69             my_out);
     70  ok &= test("[123:236]",conf.trac_root()+"log/?rev=236&amp;stop_rev=123",
     71             my_out);
    6872  ok &= test("log:trunk@123:236",
    69              conf.trac_root()+"log/trunk?rev=236&stop_rev=123", my_out);
     73             conf.trac_root()+"log/trunk?rev=236&amp;stop_rev=123", my_out);
    7074  ok &= test("milestone:1.0", conf.trac_root()+"milestone/1.0", my_out);
    7175  ok &= test("source:trunk", conf.trac_root()+"browser/trunk", my_out);
Note: See TracChangeset for help on using the changeset viewer.