Merge branch 'master' into task/3704/my_settings

This commit is contained in:
Arvind Tiwari 2017-08-29 17:42:40 +05:30
commit 32ba9c5ff7
7 changed files with 203 additions and 73 deletions

View file

@ -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%;
}
}

View file

@ -1,4 +1,4 @@
{% load staticfiles i18n%} {% load staticfiles i18n cms_tags sekizai_tags %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{LANGUAGE_CODE}}"> <html lang="{{LANGUAGE_CODE}}">
@ -33,13 +33,15 @@
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]--> <![endif]-->
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
<!-- Google analytics --> <!-- Google analytics -->
{% include "google_analytics.html" %} {% include "google_analytics.html" %}
<!-- End Google Analytics --> <!-- End Google Analytics -->
</head> </head>
<body> <body>
{% cms_toolbar %}
<!-- Navigation --> <!-- Navigation -->
{% include "datacenterlight/includes/_navbar.html" %} {% include "datacenterlight/includes/_navbar.html" %}

View file

@ -0,0 +1,33 @@
{% extends "datacenterlight/base.html" %}
{% load staticfiles cms_tags sekizai_tags %}
{% block content %}
{% addtoblock "css" %}
<link href="{% static 'datacenterlight/css/cms.css' %}" media="screen" rel="stylesheet" type="text/css"/>
{% endaddtoblock %}
<div class="dcl-cms_page-full-width">
<div class="dcl-cms_page-header">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="single-heading">
<h2>{% placeholder 'datacenterlight_cms_page_title' %}</h2>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="split-section left" id="dcl-cms_page-text">
<div class="space">
<div class="container">
<div class="row">
<div class="col-md-12">
{% placeholder 'datacenterlight_cms_page_text' %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -3,18 +3,23 @@
<div class="topnav"> <div class="topnav">
<!-- Brand and toggle get grouped for better mobile display --> <!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <button type="button" class="navbar-toggle" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
{% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %} {% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %}
<a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav" data-url="#home"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a> <a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav" data-url="#home"><img
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav" data-url="#home"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav" data-url="#home"><img
src="{% static 'datacenterlight/img/logo_white.svg' %}"></a>
{% else %} {% else %}
<a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a> <a href="{% url 'datacenterlight:index' %}" id="logoBlack" class="navbar-brand topnav"><img
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav"><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a> src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a href="{% url 'datacenterlight:index' %}" id="logoWhite" class="navbar-brand topnav"><img
src="{% static 'datacenterlight/img/logo_white.svg' %}"></a>
{% endif %} {% endif %}
</div> </div>
@ -22,34 +27,68 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %} {% if request.resolver_match.url_name == "index" or request.resolver_match.url_name == "whydatacenterlight" %}
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle visible-mobile" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a> <a class="dropdown-toggle visible-mobile" href="#" data-toggle="dropdown" role="button"
<a class="dropdown-toggle url disabled visible-desktop menu-url" data-url="#how" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span class="caret"></span></a> aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span
class="caret"></span></a>
<a class="dropdown-toggle url disabled visible-desktop menu-url" data-url="#how"
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}
<span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="url menu-url" data-url="#your" href="#your">{% trans "Scale out" %}</a></li> <li><a class="url menu-url" data-url="#your" href="#your">{% trans "Scale out" %}</a></li>
<li><a class="url menu-url" data-url="#our" href="#our">{% trans "Reliable and light" %}</a></li> <li><a class="url menu-url" data-url="#our" href="#our">{% trans "Reliable and light" %}</a>
<li> <a class="url menu-url" data-url="#price" href="#price">{% trans "Order VM" %}</a></li> </li>
<li><a class="url menu-url" data-url="#price" href="#price">{% trans "Order VM" %}</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<a href="{% url 'datacenterlight:whydatacenterlight' %}" >{% trans "Why Data Center Light?" %}</a> <a href="{% url 'datacenterlight:whydatacenterlight' %}">{% trans "Why Data Center Light?" %}</a>
</li> </li>
<li> <li>
<a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact" >{% trans "Contact" %}</a> <a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact">{% trans "Contact" %}</a>
</li>
{% else %}
<li class="dropdown">
<a class="dropdown-toggle visible-mobile" href="#" data-toggle="dropdown" role="button"
aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}<span
class="caret"></span></a>
<a class="dropdown-toggle url disabled visible-desktop menu-url" data-url="#how"
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Highlights" %}
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a class="url menu-url" data-url="#your"
href="{% url 'datacenterlight:whydatacenterlight' %}#your">{% trans "Scale out" %}</a>
</li>
<li><a class="url menu-url" data-url="#our"
href="{% url 'datacenterlight:whydatacenterlight' %}#our">{% trans "Reliable and light" %}
</a></li>
<li><a class="url menu-url" data-url="#price"
href="{% url 'datacenterlight:whydatacenterlight' %}#price">{% trans "Order VM" %}</a>
</li>
</ul>
</li>
<li>
<a href="{% url 'datacenterlight:whydatacenterlight' %}">{% trans "Why Data Center Light?" %}</a>
</li>
<li>
<a class="url" href="{% url 'datacenterlight:index' %}#contact" data-url="#contact">{% trans "Contact" %}</a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
{% if LANGUAGE_CODE == 'en-us'%} {% if LANGUAGE_CODE == 'en-us'%}
<a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> <a class="on-hover-border" href="{% change_lang 'de' %}">Deutsch&nbsp;&nbsp;<i class="fa fa-globe"
aria-hidden="true"></i></a>
{% else %} {% else %}
<a class="on-hover-border" href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i class="fa fa-globe" aria-hidden="true"></i></a> <a class="on-hover-border" href="{% change_lang 'en-us' %}">English&nbsp;&nbsp;<i
class="fa fa-globe" aria-hidden="true"></i></a>
{% endif %} {% endif %}
</li> </li>
{% comment %} {% comment %}
<!-- to be used when more than one option for language --> <!-- to be used when more than one option for language -->
<li class="nav-language"> <li class="nav-language">
<div class="dropdown"> <div class="dropdown">
<div class="dropdown-toggle select-language" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <div class="dropdown-toggle select-language" data-toggle="dropdown" role="button"
aria-haspopup="true" aria-expanded="false">
{% if LANGUAGE_CODE == 'en-us'%} {% if LANGUAGE_CODE == 'en-us'%}
<span>English</span> <span>English</span>
{% else %} {% else %}

View file

@ -213,6 +213,8 @@ CMS_TEMPLATES = (
# ungleich # ungleich
('blog_ungleich.html', gettext('Blog')), ('blog_ungleich.html', gettext('Blog')),
('page.html', gettext('Page')), ('page.html', gettext('Page')),
# dcl
('datacenterlight/cms_page.html', gettext('Data Center Light')),
) )
DATABASES = { DATABASES = {

View file

@ -302,9 +302,9 @@ msgid ""
"You are not making any payment yet. After submitting your card information, " "You are not making any payment yet. After submitting your card information, "
"you will be taken to the Confirm Order Page." "you will be taken to the Confirm Order Page."
msgstr "" msgstr ""
"Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " "Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst "
"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " "ausgelöst, nachdem Du die Bestellung auf der nächsten Seite bestätigt "
"weitergeleitet." "hast."
msgid "Submit" msgid "Submit"
msgstr "Absenden" msgstr "Absenden"

View file

@ -7,7 +7,14 @@ def google_analytics(request):
render your Google Analytics tracking code template. render your Google Analytics tracking code template.
""" """
host = request.get_host() 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: if not settings.DEBUG and ga_prop_id:
return { return {
'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id