@@ -107,12 +107,12 @@ auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant,
107107 }
108108
109109 htmlCode += " <table style=\" border: solid;\" ><tr>" ;
110- htmlCode += QString (R"( <th scope="col" class="a ">%1</th>)" ).arg (tr (" Test Case" ));
111- htmlCode += QString (R"( <th scope="col" class="a ">%1</th>)" ).arg (tr (" Input File" ));
112- htmlCode += QString (R"( <th scope="col" class="a ">%1</th>)" ).arg (tr (" Result" ));
113- htmlCode += QString (R"( <th scope="col" class="a ">%1</th>)" ).arg (tr (" Time Used" ));
114- htmlCode += QString (R"( <th scope="col" class="a ">%1</th>)" ).arg (tr (" Memory Used" ));
115- htmlCode += QString (R"( <th scope="col" class="a ">%1</th></tr>)" ).arg (tr (" Score" ));
110+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th>)" ).arg (tr (" Test Case" ));
111+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th>)" ).arg (tr (" Input File" ));
112+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th>)" ).arg (tr (" Result" ));
113+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th>)" ).arg (tr (" Time Used" ));
114+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th>)" ).arg (tr (" Memory Used" ));
115+ htmlCode += QString (R"( <th scope="col" class="td-0 ">%1</th></tr>)" ).arg (tr (" Score" ));
116116 QList<TestCase *> testCases = taskList[i]->getTestCaseList ();
117117 QList<QStringList> inputFiles = contestant->getInputFiles (i);
118118 QList<QList<ResultState>> result = contestant->getResult (i);
@@ -127,23 +127,23 @@ auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant,
127127
128128 if (k == 0 ) {
129129 if (score[j].size () == inputFiles[j].size ())
130- htmlCode += QString (R"( <td rowspan="%1" class="a ">#%2</td>)" )
130+ htmlCode += QString (R"( <td rowspan="%1" class="td-0 ">#%2</td>)" )
131131 .arg (inputFiles[j].size ())
132132 .arg (j + 1 );
133133 else
134- htmlCode += QString (R"( <td rowspan="%1" class="a ">#%2<br>%3:%4</td>)" )
134+ htmlCode += QString (R"( <td rowspan="%1" class="td-0 ">#%2<br>%3:%4</td>)" )
135135 .arg (inputFiles[j].size ())
136136 .arg (j + 1 )
137137 .arg (tr (" Subtask Dependence Status" ))
138138 .arg (statusRankingText (score[j].back ()));
139139 }
140140
141- htmlCode += QString (" <td class=\" a \" >%1</td>" ).arg (inputFiles[j][k]);
141+ htmlCode += QString (" <td class=\" td-0 \" >%1</td>" ).arg (inputFiles[j][k]);
142142 QString text;
143143 QString bgColor = " rgb(255, 255, 255)" ;
144144 QString frColor = " rgb(0, 0, 0)" ;
145145 Settings::setTextAndColor (result[j][k], text, frColor, bgColor);
146- htmlCode += QString (" <td class=\" a \" style=\" background-color: %2; color: %3;\" >%1" )
146+ htmlCode += QString (" <td class=\" td-0 \" style=\" background-color: %2; color: %3;\" >%1" )
147147 .arg (text)
148148 .arg (bgColor)
149149 .arg (frColor);
@@ -156,7 +156,7 @@ auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant,
156156 }
157157
158158 htmlCode += " </td>" ;
159- htmlCode += " <td class=\" a \" >" ;
159+ htmlCode += " <td class=\" td-0 \" >" ;
160160
161161 if (timeUsed[j][k] != -1 ) {
162162 htmlCode += QString (" " ).asprintf (" %.3lf s" , double (timeUsed[j][k]) / 1000 );
@@ -165,7 +165,7 @@ auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant,
165165 }
166166
167167 htmlCode += " </td>" ;
168- htmlCode += " <td class=\" a \" >" ;
168+ htmlCode += " <td class=\" td-0 \" >" ;
169169
170170 if (memoryUsed[j][k] != -1 ) {
171171 htmlCode += QString (" " ).asprintf (" %.3lf MB" , double (memoryUsed[j][k]) / 1024 / 1024 );
@@ -192,7 +192,7 @@ auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant,
192192
193193 htmlCode +=
194194 QString (
195- R"( <td rowspan="%1" class="a " style=" background-color: %2;"><a class="c">%3</a> / %4</td>)" )
195+ R"( <td rowspan="%1" class="td-0 " style="background-color: %2;"><a class="c">%3</a> / %4</td>)" )
196196 .arg (inputFiles[j].size ())
197197 .arg (bgColor)
198198 .arg (minv)
@@ -234,11 +234,13 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
234234 out << " <html><head>" ;
235235 out << R"( <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />)" ;
236236 out << " <style type=\" text/css\" >th, td {padding-left: 1em; padding-right: 1em; white-space: nowrap; "
237- " text-align: center; verticle-align: middle;} .a {border-style: none solid solid none; "
238- " border-width: 1px 3px; border-color: #ccc;} .b {border-style: none solid solid none; "
239- " border-width: 3px 3px; border-color: #000;} .c {font-weight: bold; font-size: large;} "
240- " .d {font-size:x-large; font-weight:bold;} .e {font-size: small;} .f {font-weight: bold;}"
241- " .g {border-style: none solid solid none; border-width: 3px 2px; border-color: #000;}</style>" ;
237+ " text-align: center; verticle-align: middle;}"
238+ " .td-0 {border-style: none solid solid none; border-width: 1px 3px; border-color: #ccc;}"
239+ " .th-0 {border-style: none solid solid none; border-width: 3px 3px; border-color: #000;}"
240+ " .th-1 {border-style: none solid solid none; border-width: 3px 2px; border-color: #000;}"
241+ " .a-0 {color: black; text-decoration: none;} .c {font-weight: bold; font-size: large;}"
242+ " .td-2 {border-radius: 5px; font-weight: bold;}"
243+ " .td-3 {border-radius: 5px;}</style>" ;
242244 out << " <title>" << contest->getContestTitle () << " : " << tr (" Contest Result" ) << " </title>" ;
243245 out << " </head><body>" ;
244246 QList<std::pair<int , QString>> sortList;
@@ -275,12 +277,12 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
275277 out << " <p class=\" e\" >" << tr (" Click names or task scores to jump to details. Judged By LemonLime" )
276278 << " </p>" ;
277279 out << R"( <p><table cellpadding="1" style="border-style: solid;"><tr>)" ;
278- out << QString (R"( <th class="b " scope="col">%1</th>)" ).arg (tr (" Rank" ));
279- out << QString (R"( <th class="b " scope="col">%1</th>)" ).arg (tr (" Name" ));
280- out << QString (R"( <th class="g " scope="col">%1</th>)" ).arg (tr (" Total Score" ));
280+ out << QString (R"( <th class="th-0 " scope="col">%1</th>)" ).arg (tr (" Rank" ));
281+ out << QString (R"( <th class="th-0 " scope="col">%1</th>)" ).arg (tr (" Name" ));
282+ out << QString (R"( <th class="th-1 " scope="col">%1</th>)" ).arg (tr (" Total Score" ));
281283
282284 for (auto &i : taskList)
283- out << QString (R"( <th class="g " scope="col">%1</th>)" ).arg (i->getProblemTitle ());
285+ out << QString (R"( <th class="th-1 " scope="col">%1</th>)" ).arg (i->getProblemTitle ());
284286
285287 out << " </tr>" ;
286288 QList<int > fullScore;
@@ -292,9 +294,8 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
292294
293295 for (auto &i : sortList) {
294296 Contestant *contestant = contest->getContestant (i.second );
295- out << QString (" <tr><td class=\" a\" >%1</td>" ).arg (rankList[contestant->getContestantName ()] + 1 );
296- out << QString (
297- R"( <td class="a"><a href="#c%1" style="color: black; text-decoration: none;">%2</a></td>)" )
297+ out << QString (" <tr><td class=\" td-0\" >%1</td>" ).arg (rankList[contestant->getContestantName ()] + 1 );
298+ out << QString (R"( <td class="td-0"><a href="#c%1" class="a-0">%2</a></td>)" )
298299 .arg (loc[contestant])
299300 .arg (i.second );
300301 int allScore = contestant->getTotalScore ();
@@ -311,15 +312,15 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
311312#endif
312313 colors->getColorGrand (allScore, sfullScore).getHslF (&h, &s, &l);
313314 h *= 360 , s *= 100 , l *= 100 ;
314- out << QString (" <td style=\" background-color: hsl(%2,%3%,%4%); border-radius: 5px; font-weight: "
315- " bold; border: 2px solid hsl(%2,%3%,%5%);\" >%1</td>" )
315+ out << QString (" <td class= \" td-2 \" style=\" background-color: hsl(%2,%3%,%4%); border: 2px solid "
316+ " hsl(%2,%3%,%5%);\" >%1</td>" )
316317 .arg (allScore)
317318 .arg (h)
318319 .arg (s)
319320 .arg (l)
320321 .arg (qMax (l - 20 , 0.00 ));
321322 } else {
322- out << QString (" <td style =\" border-radius: 5px; font-weight: bold; \" >%1</td>" ).arg (tr (" Invalid" ));
323+ out << QString (" <td class =\" td-2 \" >%1</td>" ).arg (tr (" Invalid" ));
323324 }
324325
325326 for (int j = 0 ; j < taskList.size (); j++) {
@@ -349,16 +350,15 @@ void ExportUtil::exportHtml(QWidget *widget, Contest *contest, const QString &fi
349350
350351 h *= 360 , s *= 100 , l *= 100 ;
351352 out << QString (
352- R"( <td style="background-color : hsl(%2,%3%,%4%); border-radius: 5px; "><a href="#c%5p%6" style="color: black; text-decoration: none; ">%1</a></td>)" )
353+ R"( <td class="td-3" style="background: hsl(%2,%3%,%4%);"><a href="#c%5p%6" class="a-0 ">%1</a></td>)" )
353354 .arg (score)
354355 .arg (h)
355356 .arg (s)
356357 .arg (l)
357358 .arg (loc[contestant])
358359 .arg (j);
359360 } else {
360- out << QString (
361- R"( <td style="border-radius: 5px;"><a href="#c%2p%3" style="color: black; text-decoration: none;">%1</a></td>)" )
361+ out << QString (R"( <td class="td-3"><a href="#c%2p%3" class="a-0">%1</a></td>)" )
362362 .arg (tr (" Invalid" ))
363363 .arg (loc[contestant])
364364 .arg (j);
0 commit comments