Skip to content

Commit

Permalink
Added padding to licence
Browse files Browse the repository at this point in the history
replace "Licence" to "" (use an extension template)
  • Loading branch information
toavina committed Sep 4, 2024
1 parent c811f2f commit f693bb9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ckanext/zarr/assets/css/zarr.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,10 @@
background-color: var(--primary10);
}
/* misc */
.licence-space {
padding-top: 3px;
padding-left: 15px;
padding-right: 15px;
margin: 0;
font-size: 14px;
}
13 changes: 13 additions & 0 deletions ckanext/zarr/templates/package/resource_read.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% ckan_extends %}

{% block secondary_content %}

{% block resources_list %}
{% snippet "package/snippets/resources.html", pkg=pkg, active=res.id, action='read' %}
{% endblock %}

<tr>
<th scope="row"></th>
<td><p class="licence-space">{{ _('License') }}{% snippet "snippets/resource_license.html", pkg_dict=pkg, text_only=True %}</p></td>
</tr>
{% endblock %}
16 changes: 16 additions & 0 deletions ckanext/zarr/templates/snippets/resource_license.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends 'snippets/license.html' %}

{% block license %}
{% if text_only %}
{% set text_license = license_string(pkg_dict) | trim %}
{% if 'License not specified' in text_license %}
{{ 'not specified' }}
{% else %}
{{ text_license }}
{% endif %}
{% else %}
{% block license_wrapper %}
{{ super() }}
{% endblock %}
{% endif %}
{% endblock %}

0 comments on commit f693bb9

Please sign in to comment.