Commit
Β·
33174dd
1
Parent(s):
1f751b9
fix: update paper title link and button styles in interface
Browse files- css/table.css +1 -1
- interface.py +5 -5
css/table.css
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
}
|
23 |
|
24 |
.paper-title {
|
25 |
-
color:
|
26 |
cursor: pointer;
|
27 |
text-decoration: none !important;
|
28 |
}
|
|
|
22 |
}
|
23 |
|
24 |
.paper-title {
|
25 |
+
color: var(--body-text-color);
|
26 |
cursor: pointer;
|
27 |
text-decoration: none !important;
|
28 |
}
|
interface.py
CHANGED
@@ -55,7 +55,7 @@ def format_paper_info(article):
|
|
55 |
info.append(f"<strong>Comments</strong>: {article.numComments or 0}</p>")
|
56 |
if article.paper.discussionId:
|
57 |
info.append(
|
58 |
-
f"<a href='https://huggingface.co/papers/{article.paper.id}#community' target='_blank'>Join Discussion</a></p>")
|
59 |
|
60 |
# Submitter information
|
61 |
if article.submittedBy:
|
@@ -77,7 +77,7 @@ def generate_table_html(papers):
|
|
77 |
'<th>π Upvotes</th>'
|
78 |
'<th>π¬ Comments</th>'
|
79 |
'<th>π
Date</th>'
|
80 |
-
'<th
|
81 |
'</tr></thead><tbody>']
|
82 |
|
83 |
for article in papers:
|
@@ -92,17 +92,17 @@ def generate_table_html(papers):
|
|
92 |
|
93 |
row = f"""
|
94 |
<tr>
|
95 |
-
<td><a class="paper-title" href="
|
96 |
<td>{upvotes}</td>
|
97 |
<td>{comments}</td>
|
98 |
<td>{date}</td>
|
99 |
-
<td><a href="
|
100 |
</tr>
|
101 |
"""
|
102 |
html.append(row)
|
103 |
|
104 |
html.append("</tbody></table>")
|
105 |
-
return "
|
106 |
|
107 |
|
108 |
def build_html(papers):
|
|
|
55 |
info.append(f"<strong>Comments</strong>: {article.numComments or 0}</p>")
|
56 |
if article.paper.discussionId:
|
57 |
info.append(
|
58 |
+
f"<a href='https://huggingface.co/papers/{article.paper.id}#community' target='_blank' class='sf-button'>Join Discussion{assets.SVG_LINK}</a></p>")
|
59 |
|
60 |
# Submitter information
|
61 |
if article.submittedBy:
|
|
|
77 |
'<th>π Upvotes</th>'
|
78 |
'<th>π¬ Comments</th>'
|
79 |
'<th>π
Date</th>'
|
80 |
+
'<th></th>'
|
81 |
'</tr></thead><tbody>']
|
82 |
|
83 |
for article in papers:
|
|
|
92 |
|
93 |
row = f"""
|
94 |
<tr>
|
95 |
+
<td><a class="paper-title" href="{arxiv_abs_link}" target="_blank">{title}{assets.SVG_LINK}</a></td>
|
96 |
<td>{upvotes}</td>
|
97 |
<td>{comments}</td>
|
98 |
<td>{date}</td>
|
99 |
+
<td><a href="javascript:void(0)" onclick="showDetail('{paper_id}')" class="sf-button">Details{assets.SVG_LINK}</a></td>
|
100 |
</tr>
|
101 |
"""
|
102 |
html.append(row)
|
103 |
|
104 |
html.append("</tbody></table>")
|
105 |
+
return "".join(html)
|
106 |
|
107 |
|
108 |
def build_html(papers):
|