From 17fbaa59befe033d0f82fa1c8e3fb0f33302095f Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:37:40 +0530 Subject: [PATCH 1/8] 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 2/8] 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 3/8] 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 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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 +