Upload templates/partials/paper_card.html with huggingface_hub
Browse files
templates/partials/paper_card.html
CHANGED
|
@@ -59,12 +59,34 @@
|
|
| 59 |
{% endif %}
|
| 60 |
</div>
|
| 61 |
|
| 62 |
-
<!--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
<p class="mt-2 text-gray-600 text-sm leading-relaxed">
|
| 64 |
-
{% if search %}
|
| 65 |
-
{{ paper.abstract[:400]|highlight(search) }}{% if paper.abstract|length > 400 %}...{% endif %}
|
| 66 |
-
{% else %}
|
| 67 |
-
{{ paper.abstract[:400] }}{% if paper.abstract|length > 400 %}...{% endif %}
|
| 68 |
-
{% endif %}
|
| 69 |
</p>
|
|
|
|
| 70 |
</article>
|
|
|
|
| 59 |
{% endif %}
|
| 60 |
</div>
|
| 61 |
|
| 62 |
+
<!-- Authors -->
|
| 63 |
+
{% if paper.authors %}
|
| 64 |
+
{% set author_list = paper.authors.split(', ') %}
|
| 65 |
+
<p class="mt-1 text-sm text-gray-500">
|
| 66 |
+
{{ author_list[:3]|join(', ') }}{% if author_list|length > 3 %} <span class="text-gray-400">et al.</span>{% endif %}
|
| 67 |
+
</p>
|
| 68 |
+
{% endif %}
|
| 69 |
+
|
| 70 |
+
<!-- Abstract (expandable) -->
|
| 71 |
+
{% if paper.abstract|length > 400 %}
|
| 72 |
+
<div class="mt-2" x-data="{ expanded: false }">
|
| 73 |
+
<p class="text-gray-600 text-sm leading-relaxed">
|
| 74 |
+
<span x-show="!expanded">
|
| 75 |
+
{% if search %}{{ paper.abstract[:400]|highlight(search) }}{% else %}{{ paper.abstract[:400] }}{% endif %}…
|
| 76 |
+
</span>
|
| 77 |
+
<span x-show="expanded" x-cloak>
|
| 78 |
+
{% if search %}{{ paper.abstract|highlight(search) }}{% else %}{{ paper.abstract }}{% endif %}
|
| 79 |
+
</span>
|
| 80 |
+
<button @click="expanded = !expanded"
|
| 81 |
+
class="ml-1 text-gray-400 hover:text-gray-600 text-sm">
|
| 82 |
+
<span x-show="!expanded">Show more</span>
|
| 83 |
+
<span x-show="expanded" x-cloak>Show less</span>
|
| 84 |
+
</button>
|
| 85 |
+
</p>
|
| 86 |
+
</div>
|
| 87 |
+
{% else %}
|
| 88 |
<p class="mt-2 text-gray-600 text-sm leading-relaxed">
|
| 89 |
+
{% if search %}{{ paper.abstract|highlight(search) }}{% else %}{{ paper.abstract }}{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
</p>
|
| 91 |
+
{% endif %}
|
| 92 |
</article>
|