diff --git a/datacenterlight/static/datacenterlight/css/cms.css b/datacenterlight/static/datacenterlight/css/cms.css new file mode 100644 index 00000000..abf06501 --- /dev/null +++ b/datacenterlight/static/datacenterlight/css/cms.css @@ -0,0 +1,47 @@ +.dcl-cms_page-full-width { + color: #fff; + text-align: center; + background-image: -ms-linear-gradient(right, #29427A 50%, #4F6699 100%); + background-image: -moz-linear-gradient(right, #29427A 50%, #4F6699 100%); + background-image: -o-linear-gradient(right, #29427A 50%, #4F6699 100%); + background-image: -webkit-gradient(linear, right top, left top, color-stop(50, #29427A), color-stop(100, #4F6699)); + background-image: -webkit-linear-gradient(right, #29427A 50%, #4F6699 100%); + background-image: linear-gradient(to left, #29427A 50%, #4F6699 100%); +} + +.dcl-cms_page-header { + padding: 150px 0 150px 0; + text-align: center; + color: #f8f8f8; + background: url(../img/pattern.jpg) no-repeat center center; + background-size: cover; + position: relative; + background-attachment: fixed; +} + +.dcl-cms_page-header::before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: rgba(90, 116, 175, 0.85); +} + +#dcl-cms_page-text { + background: #fff; +} + +#dcl-cms_page-text h3 { + font-size: 42px; + width: 70%; +} + +@media (max-width: 767px) { + #dcl-cms_page-text h3 { + font-size: 30px; + line-height: 40px; + width: 100%; + } +} \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index fc69a2d5..671d894e 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -1,4 +1,4 @@ -{% load staticfiles i18n%} +{% load staticfiles i18n cms_tags sekizai_tags %} {% get_current_language as LANGUAGE_CODE %} @@ -33,13 +33,15 @@ + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} + {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} {% include "google_analytics.html" %} - + {% cms_toolbar %} {% include "datacenterlight/includes/_navbar.html" %} diff --git a/datacenterlight/templates/datacenterlight/cms_page.html b/datacenterlight/templates/datacenterlight/cms_page.html new file mode 100644 index 00000000..f42528e4 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/cms_page.html @@ -0,0 +1,33 @@ +{% extends "datacenterlight/base.html" %} +{% load staticfiles cms_tags sekizai_tags %} +{% block content %} +{% addtoblock "css" %} + +{% endaddtoblock %} + +
+
+
+
+
+
+

{% placeholder 'datacenterlight_cms_page_title' %}

+
+
+
+
+
+
+ +
+
+
+
+
+ {% placeholder 'datacenterlight_cms_page_text' %} +
+
+
+
+
+{% endblock %} diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 99f6a4a8..9df9e227 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,74 +1,113 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} {% load custom_tags %} \ No newline at end of file + diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index f3d00e47..08ce457d 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -213,6 +213,8 @@ CMS_TEMPLATES = ( # ungleich ('blog_ungleich.html', gettext('Blog')), ('page.html', gettext('Page')), + # dcl + ('datacenterlight/cms_page.html', gettext('Data Center Light')), ) DATABASES = { diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 8aad8e2d..54d0ed42 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -323,9 +323,9 @@ msgid "" "You are not making any payment yet. After submitting your card information, " "you will be taken to the Confirm Order Page." msgstr "" -"Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " -"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " -"weitergeleitet." +"Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst " +"ausgelöst, nachdem Du die Bestellung auf der nächsten Seite bestätigt " +"hast." msgid "Submit" msgstr "Absenden" diff --git a/utils/context_processor.py b/utils/context_processor.py index 740591ba..a271ace8 100644 --- a/utils/context_processor.py +++ b/utils/context_processor.py @@ -7,7 +7,14 @@ def google_analytics(request): render your Google Analytics tracking code template. """ host = request.get_host() - ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', False).get(host) + ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', False).get( + host) + if ga_prop_id is None: + # Try checking if we have a www in host, if yes we remove + # that and check in the dict again + if host.startswith('www.'): + ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', + False).get(host[4:]) if not settings.DEBUG and ga_prop_id: return { 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id