Skip to content

Commit

Permalink
Right-align numeric counts on home page
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Scott <[email protected]>
  • Loading branch information
dbs committed Apr 26, 2019
1 parent 5ad2b78 commit c29a9f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ section.home_summary td.pub {
td {
border-bottom: 0.25em solid transparent;
}
td.count {
text-align: right;
padding-right: 1em;
}
th.numcites {
width: 5em;
}
Expand Down
10 changes: 5 additions & 5 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>{{ _('Authors (%(count)d)', count=summary.acnt) }}</h2>
url_for('filter_citations', facets='author:' + author.0|striptags, lang=_('en'))
}}">{{ author.1|striptags }}</a>
</td>
<td>{{ author.2 }}</td>
<td class="count">{{ author.2 }}</td>
</tr>
{%- endfor %}
</tbody>
Expand All @@ -41,7 +41,7 @@ <h2>{{ _('Publications (%(count)d)', count=summary.pcnt) }}</h2>
<a href="{{url_for('filter_citations', facets='publication:' + pub.0|striptags, lang=_('en'))}}">
{%- endif %}{{ pub.0|striptags }}{%- if pub.0 %}</a>{%- endif %}
</td>
<td>{{ pub.1 }}</td>
<td class="count">{{ pub.1 }}</td>
</tr>
{%- endfor %}
</tbody>
Expand All @@ -61,7 +61,7 @@ <h2>{{ _('Publication types') }}</h2>
<a href="{{url_for('filter_citations', facets='doctype:' + pub.0|striptags, lang=_('en'))}}">
{%- endif %}{{ _(pub.0|striptags) }}{%- if pub.0 %}</a>{%- endif %}
</td>
<td>{{ pub.1 }}</td>
<td class="count">{{ pub.1 }}</td>
</tr>
{%- endfor %}
</tbody>
Expand All @@ -77,7 +77,7 @@ <h2>{{ _('Languages') }}</h2>
{%- for pub in summary.languages %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="pubtype">{{ pub.0|striptags }}</td>
<td>{{ pub.1 }}</td>
<td class="count">{{ pub.1 }}</td>
</tr>
{%- endfor %}
</tbody>
Expand All @@ -99,7 +99,7 @@ <h2>{{ _('Series') }}</h2>
}}">
{%- endif %}{{ pub.0|striptags }}{%- if pub.0 %}</a>{%- endif %}
</td>
<td>{{ pub.1 }}</td>
<td class="count">{{ pub.1 }}</td>
</tr>
{%- endfor %}
</tbody>
Expand Down

0 comments on commit c29a9f4

Please sign in to comment.