Skip to content

Commit

Permalink
switch from an <a> to a <div> to disable if it doesn't exist
Browse files Browse the repository at this point in the history
Fix the formatting lost for the horizontal list that was relying on the a member.
  • Loading branch information
tfoote committed Jan 2, 2024
1 parent 9d0c592 commit 02cc614
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions _includes/package_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@
{% endif %}

<div class="list-group list-group-sm {%if horizontal%}list-group-horizontal list-group-justified{%endif%}">
<a class="{{list_group_class}} {% if package.data.docs_uri == '' %}disabled{% endif %}" target="_blank"
{% if package.data.docs_uri == '' %}
href="javascript:void(0)"
{% else %}
href="{{ package.data.docs_uri }}"
{% endif %}
{% if package.data.docs_uri == '' %}
<div class="{{list_group_class}} disabled"
title="View API documentation">
<span style="margin-right: 5px;" class="glyphicon glyphicon-file"></span>
{%if hide_link_labels%}<br>{%endif%}
API Docs
</div>
{% else %}
<a class="{{list_group_class}}" target="_blank"
href="{{ package.data.docs_uri }}"
title="View API documentation">
<span style="margin-right: 5px;" class="glyphicon glyphicon-file"></span>
{%if hide_link_labels%}<br>{%endif%}
API Docs
</a>
{% endif %}
<a class="{{list_group_class}}"
target="_blank"
href="{{ package.data.browse_uri }}"
Expand Down
2 changes: 1 addition & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ th.rotate45 {
}

.list-group-horizontal .list-group-item {
display: inline-block;
display: table-cell;
}
.list-group-horizontal .list-group-item {
margin-bottom: 0;
Expand Down

0 comments on commit 02cc614

Please sign in to comment.