Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Patch djangocms icons for d120 #37

Merged
merged 4 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions d120/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@
'skin': 'moono-lisa',
'toolbar': 'CMS',
'stylesSet': format_lazy('default:{}', reverse_lazy('admin:cascade_texteditor_config')),
'contentsCss': [
'/static/vendor/bootstrap/dist/css/bootstrap.min.css',
'/static/vendor/font-awesome/css/font-awesome.min.css',
'/static/vendor/typeface-libre-franklin/index.css',
'/static/d120/css/custom.css',
],
}

CMSPLUGIN_CASCADE = {
Expand All @@ -289,3 +295,9 @@
# application-specific-cookies
CSRF_COOKIE_NAME = 'djangocms_csrftoken'
SESSION_COOKIE_NAME = 'djangocms_sessionid'

### ICONS ###

DJANGOCMS_ICON_SETS = (
('fontawesome4', 'fa', 'Font Awesome 4', 'lastest'),
)
3 changes: 3 additions & 0 deletions d120/static/d120/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ body {
color: #444444;
overflow-y: scroll;
}
body.cke_editable {
margin: 8px;
}
a:hover {
color: #111111;
}
Expand Down
2 changes: 2 additions & 0 deletions d120/templates/admin/djangocms_icon/includes/assets.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'vendor/font-awesome/css/font-awesome.min.css' %}" />
26 changes: 26 additions & 0 deletions d120/templates/djangocms_bootstrap4/link/default/link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% load cms_tags %}{% spaceless %}
{# this needs to be in one line for rendering purpose #}
<a
href="{{ link }}"
{% if instance.target %}
target="{{ instance.target }}"
{% endif %}

{% if instance.attributes %}
{{ instance.attributes_str }}
{% endif %}
>
{% if instance.icon_left %}
<i class="{{ instance.icon_left }}"></i>
{% endif %}
{% for plugin in instance.child_plugin_instances %}
{% render_plugin plugin %}
{% empty %}
{{ instance.name }}
{% endfor %}

{% if instance.icon_right %}
<i class="{{ instance.icon_right }}"></i>
{% endif %}
</a>
{% endspaceless %}
bhaettasch marked this conversation as resolved.
Show resolved Hide resolved