Skip to content

Commit deed456

Browse files
committed
Added subchapter and section titles
1 parent 9f2ea0f commit deed456

3 files changed

Lines changed: 9 additions & 70 deletions

File tree

‎problems/problems.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ func (p *ProblemInfo) GetSubchapter() string {
5959
return cpTitles[c]
6060
}
6161

62+
func (p *ProblemInfo) GetSection() string {
63+
c := cpProblems[p.ID].Section
64+
return cpTitles[c]
65+
}
66+
6267
// Initialize API server and cache
6368
func InitAPIServer(url string) {
6469
// Set API sever URL

‎ranking.go‎

Lines changed: 0 additions & 68 deletions
This file was deleted.

‎templates/problems.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>
1919
<th>
2020
<a href="?all&u={{$.Username}}&o=star" title="Star problems">*</a>
2121
</th>
22-
<th style="text-align: center">
22+
<th style="text-align: center; width:209px; ">
2323
<a href="?all&u={{$.Username}}&o=cat" title="Category">Category</a>
2424
</th>
2525
<th>
@@ -49,7 +49,9 @@ <h2>
4949
{{$p.Title}}</a>
5050
</td>
5151
<td style="text-align: center">
52-
<span title="{{$p.GetSubchapter}}">{{$p.GetChapter}}</span>
52+
<span style="font-size:90%">{{$p.GetChapter}}</span><br />
53+
<span style="font-size:65%">{{$p.GetSubchapter}}</span><br />
54+
<span style="font-size:50%">{{$p.GetSection}}</span>
5355
</td>
5456
<td style="text-align: center">{{$p.Level}}</td>
5557
<td style="text-align: center; font-size:85%">{{$p.TotalSubmissions}}</td>

0 commit comments

Comments
 (0)