From 17fbaa59befe033d0f82fa1c8e3fb0f33302095f Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:37:40 +0530 Subject: [PATCH 01/11] Added faq.html cms template --- .../templates/datacenterlight/faq.html | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 datacenterlight/templates/datacenterlight/faq.html diff --git a/datacenterlight/templates/datacenterlight/faq.html b/datacenterlight/templates/datacenterlight/faq.html new file mode 100644 index 00000000..96970ada --- /dev/null +++ b/datacenterlight/templates/datacenterlight/faq.html @@ -0,0 +1,29 @@ +{% extends "datacenterlight/base.html" %} +{% load staticfiles cms_tags %} +{% block content %} +
+
+
+
+
+
+

{% placeholder 'datacenterlight_faq_title' %}

+
+
+
+
+
+
+ +
+
+
+
+
+ {% placeholder 'datacenterlight_faq_text' %} +
+
+
+
+
+{% endblock %} From 687cf96287a6eeb2fb783aa280e8f95289957437 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:39:56 +0530 Subject: [PATCH 02/11] Added cms_tags, sekizai_tags and cms_toolbar --- datacenterlight/templates/datacenterlight/base.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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" %} From f28f55c7753a14ab0245472fabca102e388792d5 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:41:29 +0530 Subject: [PATCH 03/11] faq.html now referred as DCL.Faq --- dynamicweb/settings/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index a837f0f2..37fc03dc 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -190,6 +190,8 @@ CMS_TEMPLATES = ( # ungleich ('blog_ungleich.html', gettext('Blog')), ('page.html', gettext('Page')), + # dcl + ('datacenterlight/faq.html', gettext('DCL.Faq')), ) DATABASES = { From 090f3388783c577413c22cf32eac52971ba4673a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:51:17 +0200 Subject: [PATCH 04/11] Added cms.css and renamed faq.html to cms_page.html --- .../static/datacenterlight/css/cms.css | 47 +++++++++++++++++++ .../{faq.html => cms_page.html} | 6 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 datacenterlight/static/datacenterlight/css/cms.css rename datacenterlight/templates/datacenterlight/{faq.html => cms_page.html} (80%) 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/faq.html b/datacenterlight/templates/datacenterlight/cms_page.html similarity index 80% rename from datacenterlight/templates/datacenterlight/faq.html rename to datacenterlight/templates/datacenterlight/cms_page.html index 96970ada..6f377749 100644 --- a/datacenterlight/templates/datacenterlight/faq.html +++ b/datacenterlight/templates/datacenterlight/cms_page.html @@ -1,6 +1,10 @@ {% extends "datacenterlight/base.html" %} -{% load staticfiles cms_tags %} +{% load staticfiles cms_tags sekizai_tags %} {% block content %} +{% addtoblock "css" %} + +{% endaddtoblock %} +
From c8dcd65adc1885bb4a4f36ffaac9fafb9d4cc12d Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:52:57 +0200 Subject: [PATCH 05/11] Updated _navbar to show menu on other pages except for index and whydcl --- .../datacenterlight/includes/_navbar.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 99f6a4a8..fe948861 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -29,6 +29,22 @@
  • {% trans "Reliable and light" %}
  • {% trans "Order VM" %}
  • + +
  • + {% trans "Why Data Center Light?" %} +
  • +
  • + {% trans "Contact" %} +
  • + {% else %} +
  • {% trans "Why Data Center Light?" %} From 7d7260ce6d4b863df885e579ffdda6268ddc4e3e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:59:56 +0200 Subject: [PATCH 06/11] Renamed faq.html to cms_page.html --- dynamicweb/settings/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 37fc03dc..c0f84da7 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -191,7 +191,7 @@ CMS_TEMPLATES = ( ('blog_ungleich.html', gettext('Blog')), ('page.html', gettext('Page')), # dcl - ('datacenterlight/faq.html', gettext('DCL.Faq')), + ('datacenterlight/cms_page.html', gettext('Data Center Light')), ) DATABASES = { From 696af58bffe1734486dbd382e7af0bc7e0ce1535 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 18:00:41 +0200 Subject: [PATCH 07/11] Refactored class names to better names --- .../templates/datacenterlight/cms_page.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/cms_page.html b/datacenterlight/templates/datacenterlight/cms_page.html index 6f377749..f42528e4 100644 --- a/datacenterlight/templates/datacenterlight/cms_page.html +++ b/datacenterlight/templates/datacenterlight/cms_page.html @@ -5,13 +5,13 @@ {% endaddtoblock %} -
    -
    +
    +
    -

    {% placeholder 'datacenterlight_faq_title' %}

    +

    {% placeholder 'datacenterlight_cms_page_title' %}

    @@ -19,12 +19,12 @@
    -
    +
    - {% placeholder 'datacenterlight_faq_text' %} + {% placeholder 'datacenterlight_cms_page_text' %}
    From 6c80f94f6769404a82d14f5fc94136462e6b0b00 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 21 Aug 2017 23:16:30 +0530 Subject: [PATCH 08/11] Reformatted dcl's _navbar.html. Attention: Some lines are over 120 char limit as multiline templatetags is not supported. --- .../datacenterlight/includes/_navbar.html | 189 ++++++++++-------- 1 file changed, 106 insertions(+), 83 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index fe948861..9df9e227 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,90 +1,113 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} {% load custom_tags %} \ No newline at end of file + From 01b64fec88a469be13240b3b00c20b6e1c4bef3f Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 24 Aug 2017 16:04:37 +0200 Subject: [PATCH 09/11] Attempt to fix no ga code in www. sites --- utils/context_processor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/context_processor.py b/utils/context_processor.py index 740591ba..37544962 100644 --- a/utils/context_processor.py +++ b/utils/context_processor.py @@ -7,7 +7,13 @@ 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 = host[4:] if not settings.DEBUG and ga_prop_id: return { 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id From bf304f9493e769419da5d34b936417abb89d9470 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 24 Aug 2017 16:10:53 +0200 Subject: [PATCH 10/11] Fixed obtaining ga code from dict --- utils/context_processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/context_processor.py b/utils/context_processor.py index 37544962..a271ace8 100644 --- a/utils/context_processor.py +++ b/utils/context_processor.py @@ -13,7 +13,8 @@ def google_analytics(request): # 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 = host[4:] + 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 From 2ed07e25fff570d41e4ec89c7fafb22b5ce0245f Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 25 Aug 2017 09:49:55 +0530 Subject: [PATCH 11/11] Corrected translation for 'You are not making payment ...' --- hosting/locale/de/LC_MESSAGES/django.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index ddb853da..2887095f 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -302,9 +302,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"