Commit 8ef33bb701d18f1d4fca4f3365df664aebcbcdd5

Authored by Zambom
1 parent 3da14dee

implementing css style selected

amadeus/templates/base.html
1 1 <!DOCTYPE html>
2 2  
3   -{% load static i18n %}
4   -{% load static i18n permission_tags django_bootstrap_breadcrumbs %}
  3 +{% load static i18n django_bootstrap_breadcrumbs css_theme %}
5 4 {% get_current_language as LANGUAGE_CODE %}
6 5  
7 6 <html>
... ... @@ -47,7 +46,7 @@
47 46 <!-- Custom styles -->
48 47 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus_responsive.css' %}">
49 48 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}">
50   - <link rel="stylesheet" type="text/css" href="{% static 'css/themes/green.css' %}">
  49 +
51 50  
52 51 <!--Javascript block for specific-app ones -->
53 52 <script src="{% static 'js/base/amadeus.js' %}"></script>
... ... @@ -60,6 +59,7 @@
60 59 <!-- Summernote -->
61 60 <script src="{% static 'summernote/summernote.js' %}" type="text/javascript"></script>
62 61 <link href="{% static 'summernote/summernote.css' %}" type="text/css" rel="stylesheet" />
  62 + {% css_theme %}
63 63  
64 64 </head>
65 65 <body>
... ...
amadeus/templates/css_theme.html 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +{% load static %}
  2 +
  3 +{% with 'css/themes/'|add:theme|add:'.css' as theme_selected %}
  4 + <link rel="stylesheet" type="text/css" href="{% static theme_selected %}">
  5 +{% endwith %}
0 6 \ No newline at end of file
... ...
amadeus/templatetags/css_theme.py 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +from django import template
  2 +
  3 +from themes.models import Themes
  4 +
  5 +register = template.Library()
  6 +
  7 +@register.inclusion_tag('css_theme.html')
  8 +def css_theme():
  9 + theme = Themes.objects.get(id = 1)
  10 +
  11 + context = {
  12 + 'theme': theme.css_style
  13 + }
  14 +
  15 + return context
0 16 \ No newline at end of file
... ...