Changeset 401


Ignore:
Timestamp:
Jun 28, 2007, 11:46:24 PM (13 years ago)
Author:
Jari Häkkinen
Message:

Addresses #62. Made the blame listing nicer.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.cc

    r400 r401  
    9191    os << "<th class=\"date\">Date</th>\n";
    9292    os << "<th class=\"author\">Author</th>\n";
    93     os << "<th class=\"number\">Lineno</th>\n";
    94     os << "<th>Line</th>\n";
     93    os << "<th class=\"number\">Line</th>\n";
     94    os << "<th></th>\n";
    9595    os << "</tr>\n</thead>\n";
    9696    os << "<tbody>\n";
     
    121121         << color << color << "\">" << blame.revision()
    122122         << "</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\">";
     123         << color << color << "\">" ;
     124      hs << Date(blame.date())("%e %b %y");
     125      os << "</font></td>\n<td class=\"author\">";
    126126      hs << blame.author();
    127127      os << "</td>\n<td class=\"number\">" << blame.line_no()+1
    128          << "</td>\n<td class=\"code\">";
     128         << "</td>\n<td>";
    129129      hs << blame.line();
    130130      os << "</td>\n</tr>\n";
  • trunk/lib/css.cc

    r400 r401  
    159159
    160160    s << "table.blame {\n";
    161     s << " clear: both;\n";
    162     s << " border-bottom: 1px solid #d7d7d7;\n";
    163     s << " border-collapse: collapse;\n";
     161    s << " border: 1px solid #ddd;\n";
    164162    s << " border-spacing: 0;\n";
    165     s << " margin-top: 1em;\n";
     163    s << " border-top: 0;\n";
     164    s << " empty-cells: show;\n";
     165    s << " font-size: 12px;\n";
     166    s << " line-height: 130%;\n";
     167    s << " padding: 0;\n";
     168    s << " margin: 0 auto;\n";
     169    s << " table-layout: fixed;\n";
    166170    s << " width: 100%;\n";
    167171    s << "}\n";
    168172    s << "table.blame th {\n";
    169     s << " text-align: left;\n";
    170     s << " padding: 0 1em .1em 0;\n";
    171     s << " font-size: 12px\n";
    172     s << "}\n";
    173     s << "table.blame th.author { width: 8em; text-align:right }\n";
     173    s << " border-right: 1px solid #d7d7d7;\n";
     174    s << " border-bottom: 1px solid #998;\n";
     175    s << " font-size: 11px;\n";
     176    s << "}\n";
     177    s << "table.blame th.author { width: 5em; text-align:right }\n";
    174178    s << "table.blame th.date { width: 8em; text-align:center }\n";
    175     s << "table.blame th.number { width: 2em }\n";
    176     s << "table.blame thead { background: #f7f7f0 }\n";
     179    s << "table.blame th.number { width: 3em }\n";
    177180    s << "table.blame thead th {\n";
    178     s << " border: 1px solid #d7d7d7;\n";
    179     s << " border-bottom-color: #999;\n";
    180     s << " font-size: 11px;\n";
    181     s << " font-wheight: bold;\n";
    182     s << " padding: 2px .5em;\n";
    183     s << " vertical-align: bottom;\n";
    184     s << "}\n";
    185     s << "table.blame tbody td a:hover, table.blame tbody th a:hover {\n";
    186     s << " background-color: transparent;\n";
    187     s << "}\n";
    188     s << "table.blame tbody td, table.blame tbody th {\n";
    189     s << " border: 1px dotted #ddd;\n";
    190     s << " padding: .33em .5em;\n";
    191     s << " vertical-align: bottom;\n";
    192     s << "}\n";
    193     s << "table.blame tbody td a:hover, table.blame tbody th a:hover {\n";
    194     s << " background-color: transparent;\n";
    195     s << "}\n";
    196     s << "table.blame tbody tr { border-top: 1px solid #ddd }\n";
    197     s << "table.blame tbody tr.light { background-color: #fcfcfc }\n";
    198     s << "table.blame tbody tr.dark { background-color: #f7f7f7 }\n";
    199     s << "table.blame tbody tr:hover { background: #eed }\n";
    200     s << "table.blame tbody td { text-align: left }\n";
    201     s << "table.blame tbody td.author { text-align: right }\n";
    202     s << "table.blame tbody td.code { font: normal 12px monospace }\n";
    203     s << "table.blame tbody td.date { text-align: center }\n";
    204     s << "table.blame tbody td.number { text-align: right }\n";
    205     s << "table.blame tbody td a { display: block; }\n";
    206     s << "table.blame tbody td.directory a { font-weight: bold }\n";
     181    s << " background: #eee;\n";
     182    s << " border-top: 1px solid #d7d7d7;\n";
     183    s << " color: #999;\n";
     184    s << " padding: 0 .25em;\n";
     185    s << " text-align: center;\n";
     186    s << " white-space: nowrap;\n";
     187    s << "}\n";
     188    s << "table.blame tbody td {\n";
     189    s << " border-right: 1px solid #f0f0f0;\n";
     190    s << " background: #fff;\n";
     191    s << " font: normal 11px monospace;\n";
     192    s << " overflow: hidden;\n";
     193    s << " padding: 1px 2px;\n";
     194    s << " vertical-align: top;\n";
     195    s << "}\n";
     196    s << "table.blame tbody td.author { text-align: right; }\n";
     197    s << "table.blame tbody td.date { text-align: center; }\n";
     198    s << "table.blame tbody td.number { text-align: right; }\n";
     199    s << "table.blame tbody td:hover { background-color: transparent; }\n";
     200    s << "table.blame tbody tr:hover { background: #eed; }\n";
    207201    s << "\n";
    208202
     
    231225    s << "}\n";
    232226    s << "\n";
    233     s << "table.listings tbody td a:hover, table.listing tbody th a:hover {\n";
    234     s << " background-color: transparent;\n";
    235     s << "}\n";
    236     s << "\n";
    237227    s << "table.listings tbody td, table.listing tbody th {\n";
    238228    s << " border: 1px dotted #ddd;\n";
     
    254244
    255245    s << ".sep { color: #666}\n";
    256     s << "\n";
    257     s << "\n";
    258246    s.close();
    259247  }
    260248
    261 
    262249}} // end of namespace svndigest and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.