ckanext-d4science_theme/ckanext/d4science_theme/templates/home/snippets/popular_metadatatypes.html

32 lines
877 B
HTML

{% set metadatatype = h.d4science_theme_get_systemtype_field_dict_from_session() %}
{% set metadatatypes = h.get_facet_items_dict(metadatatype['name'], limit=30) %}
<style>
#pop-types {
line-height: 1.3;
padding: 5px 15px 10px;
word-break: break-all;
}
#pop-types a + a{
margin-left: 5px;
}
</style>
<div>
<h3 style="padding-left: 15px;">Popular {{ metadatatype['title'].capitalize() }}s</h3>
<div id="pop-types">
{% for type in metadatatypes %}
{% set weight = 30 - loop.index %}
<a href="{% url_for controller='package', action='search', systemtype=type.name %}" rel={{weight}}>{{ h.truncate(type.display_name, 26) }}</a>
{% endfor %}
</div>
</div>
<script type="text/javascript" >
loadCloud('pop-types','#33cccc','#003366')
//loadCloud('pop-types','#2A3990','#8DB93E')
//loadCloud('pop-types')
</script>