Skip to content

Commit

Permalink
fix: templates collection
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Apr 15, 2021
1 parent 2a451f9 commit 8c19b9d
Show file tree
Hide file tree
Showing 17 changed files with 114 additions and 80 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

setup(
name=PKG_NAME,
version='0.4.6',
version='0.4.7',

packages=[PKG_NAME],
package_dir={PKG_NAME: f"{SRC_FOLDER}/{PKG_NAME}"},
package_data={PKG_NAME: [i.replace(f'{SRC_FOLDER}/{PKG_NAME}/', '')
for i in glob(f'{SRC_FOLDER}/{PKG_NAME}/**',

package_data={PKG_NAME: [i.replace(f'{SRC_FOLDER}/{PKG_NAME}/', '')
for i in glob(f'{SRC_FOLDER}/{PKG_NAME}/**',
recursive=True)]
},

license='Apache License 2.0',
description="uniCMS Template based on Bootstrap Italia design",
long_description=README,
Expand Down

This file was deleted.

16 changes: 16 additions & 0 deletions src/unicms_template_italia/templates/blocks/italia_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% load i18n %}
{% load static %}


<div class="link-list-wrapper">
<ul class="link-list">
<li>
<a class="list-item" href="{{ url }}">
<svg class="icon icon-primary icon-right">
<use xlink:href="{% static 'svg/sprite.svg' %}#it-link"></use>
</svg>
<span>{{ name }}</span>
</a>
</li>
</ul>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!-- https://getbootstrap.com/docs/4.0/utilities/embed/#aspect-ratios -->

{% if url %}
<a href="{{ url }}">
{% endif %}
<img src="{{ media.get_media_path }}" class="w-100" alt="{{ media.title }}" title="{{ media.title }}" />
<img src="{{ media.get_media_path }}" class="w-100" alt="{{ media.description }}" title="{{ media.title }}" />
{% if url %}
</a>
{% endif %}
Expand Down
45 changes: 45 additions & 0 deletions src/unicms_template_italia/templates/blocks/italia_menu_side.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% load i18n %}
{% load static %}

{% if items %}
<div class="sidebar-wrapper">
<div class="sidebar-linklist-wrapper">
<div class="link-list-wrapper">
<ul class="link-list">
{% for item in items %}
<li>
{% if item.get_childs %}
<a class="list-item large medium right-icon"
href="#collapse{{ forloop.counter }}"
data-toggle="collapse"
aria-expanded="false"
aria-controls="collapseOne">
<span>{{ item.name }} </span>
<svg class="icon icon-sm icon-primary right" aria-hidden="true">
<use xlink:href="{% static 'svg/sprite.svg' %}#it-expand"></use>
</svg>
</a>
<ul class="link-sublist collapse" id="collapse{{ forloop.counter }}">
{% for child in item.get_childs %}
<li>
<a class="list-item" href="{{ child.link}}">
<span>{{ child.name }} </span>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<a class="list-item" href="{{ item.link }}">
<span>{{ item.name }} </span>
</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}



Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "blocks/italia_alert_info.html" %}

{% block variant %}danger{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% load static %}
{% load unicms_contexts %}


<div class="alert alert-{% block variant %}info{% endblock %}" role="alert">
<h4 class="alert-heading">{{ publication.title }}</h4>
{% if publication.subheading %}
<p><i>{{ publication.subheading }}</i></p>
<hr>
{% endif %}
{% if publication.presentation_image %}
<div class="media mb-0">
<img class="align-self-start mr-3 w-25" src="{{ publication.image_url }}" alt="{{ publication.title }}">
<div class="media-body">
{{ publication.content|safe }}
</div>
</div>
{% else %}
<p class="mb-0">{{ publication.content|safe }}</p>
{% endif %}
{% if publication.related_links %}
<hr>
<ul class="pl-0" style="list-style: none">
{% for link in publication.related_links %}
<li class="mb-3">
<a href="{{ link.url }}">
<svg class="icon icon-xs">
<use xlink:href="{% static 'svg/sprite.svg' %}#it-link"></use>
</svg>
{{ link.name }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "blocks/italia_alert_info.html" %}

{% block variant %}success{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "blocks/italia_alert_info.html" %}

{% block variant %}warning{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% load unicms_pages %}
{% load unicms_publications %}


<div class="row">
<div class="col-4">
<div class="card-wrapper card-space pb-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<use xlink:href="{% static 'svg/sprite.svg' %}#it-burger"></use>
</svg>
<span class="m-2">
{% trans "Board Menu" %} - <b>{{ request.user }}</b>
{% trans "Hi" %}, <b>{{ request.user.first_name }}</b>
{% if preview_mode %} - <b>Preview mode</b>{% endif %}
</span>
</div>
Expand Down

0 comments on commit 8c19b9d

Please sign in to comment.