From 6890c821220f0c3b14a46f9851d76ec7c6b1448f Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 22 Aug 2017 20:45:18 +0530 Subject: [PATCH 01/30] dashboard url, view,template and css added --- hosting/static/hosting/css/dashboard.css | 21 +++++++ .../static/hosting/img/24-hours-support.svg | 61 +++++++++++++++++++ hosting/static/hosting/img/billing.svg | 1 + .../static/hosting/img/dashboard_settings.svg | 50 +++++++++++++++ hosting/static/hosting/img/key.svg | 7 +++ hosting/static/hosting/img/plusVM.svg | 19 ++++++ hosting/templates/hosting/base_short.html | 1 + hosting/templates/hosting/dashboard.html | 10 +++ hosting/urls.py | 29 +++++---- hosting/views.py | 21 ++++++- 10 files changed, 206 insertions(+), 14 deletions(-) create mode 100644 hosting/static/hosting/css/dashboard.css create mode 100644 hosting/static/hosting/img/24-hours-support.svg create mode 100644 hosting/static/hosting/img/billing.svg create mode 100644 hosting/static/hosting/img/dashboard_settings.svg create mode 100644 hosting/static/hosting/img/key.svg create mode 100644 hosting/static/hosting/img/plusVM.svg create mode 100644 hosting/templates/hosting/dashboard.html diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css new file mode 100644 index 00000000..82332e23 --- /dev/null +++ b/hosting/static/hosting/css/dashboard.css @@ -0,0 +1,21 @@ +.hosting-dashboard:after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(41, 66, 122, 0.59); + z-index: -1; +} +.hosting-dashboard:before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: url(../../datacenterlight/img/pattern.jpg) no-repeat center center; + background-size: cover; + z-index: -2; +} \ No newline at end of file diff --git a/hosting/static/hosting/img/24-hours-support.svg b/hosting/static/hosting/img/24-hours-support.svg new file mode 100644 index 00000000..4db05be3 --- /dev/null +++ b/hosting/static/hosting/img/24-hours-support.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/img/billing.svg b/hosting/static/hosting/img/billing.svg new file mode 100644 index 00000000..d002fa6c --- /dev/null +++ b/hosting/static/hosting/img/billing.svg @@ -0,0 +1 @@ +billing icon \ No newline at end of file diff --git a/hosting/static/hosting/img/dashboard_settings.svg b/hosting/static/hosting/img/dashboard_settings.svg new file mode 100644 index 00000000..4044e93a --- /dev/null +++ b/hosting/static/hosting/img/dashboard_settings.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/img/key.svg b/hosting/static/hosting/img/key.svg new file mode 100644 index 00000000..b2bd7bc3 --- /dev/null +++ b/hosting/static/hosting/img/key.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/hosting/static/hosting/img/plusVM.svg b/hosting/static/hosting/img/plusVM.svg new file mode 100644 index 00000000..c6c49316 --- /dev/null +++ b/hosting/static/hosting/img/plusVM.svg @@ -0,0 +1,19 @@ + + + + +VM + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 847daa37..4dcf5074 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -24,6 +24,7 @@ + diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html new file mode 100644 index 00000000..4c06f19b --- /dev/null +++ b/hosting/templates/hosting/dashboard.html @@ -0,0 +1,10 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 i18n %} + +{% block content %} +
+
+ +
+
+{%endblock%} diff --git a/hosting/urls.py b/hosting/urls.py index ea96af77..e6b6fee3 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -1,17 +1,20 @@ from django.conf.urls import url from django.contrib.auth import views as auth_views -from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\ - NodeJSHostingView, LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, \ - OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\ - VirtualMachineView, OrdersHostingDeleteView, NotificationsView, \ - MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, HostingPricingView,\ - CreateVirtualMachinesView, HostingBillListView, HostingBillDetailView, \ - SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView +from .views import ( + DjangoHostingView, RailsHostingView, PaymentVMView, NodeJSHostingView, + LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, + NotificationsView, OrdersHostingListView, OrdersHostingDetailView, + VirtualMachinesPlanListView, VirtualMachineView, OrdersHostingDeleteView, + MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, + HostingPricingView, CreateVirtualMachinesView, HostingBillListView, + HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, + SSHKeyChoiceView, DashboardView) urlpatterns = [ url(r'index/?$', IndexView.as_view(), name='index'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), + url(r'dashboard/?$', DashboardView.as_view(), name='dashboard'), url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'), url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'), url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'), @@ -20,9 +23,12 @@ urlpatterns = [ url(r'orders/(?P\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'), url(r'bills/?$', HostingBillListView.as_view(), name='bills'), url(r'bills/(?P\d+)/?$', HostingBillDetailView.as_view(), name='bills'), - url(r'cancel_order/(?P\d+)/?$', OrdersHostingDeleteView.as_view(), name='delete_order'), - url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(), name='create_virtual_machine'), - url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'), + url(r'cancel_order/(?P\d+)/?$', + OrdersHostingDeleteView.as_view(), name='delete_order'), + url(r'create_virtual_machine/?$', CreateVirtualMachinesView.as_view(), + name='create_virtual_machine'), + url(r'my-virtual-machines/?$', + VirtualMachinesPlanListView.as_view(), name='virtual_machines'), url(r'my-virtual-machines/(?P\d+)/?$', VirtualMachineView.as_view(), name='virtual_machines'), url(r'ssh_keys/?$', SSHKeyListView.as_view(), @@ -44,5 +50,6 @@ urlpatterns = [ PasswordResetConfirmView.as_view(), name='reset_password_confirm'), url(r'^logout/?$', auth_views.logout, {'next_page': '/hosting/login?logged_out=true'}, name='logout'), - url(r'^validate/(?P.*)/$', SignupValidatedView.as_view(), name='validate') + url(r'^validate/(?P.*)/$', + SignupValidatedView.as_view(), name='validate') ] diff --git a/hosting/views.py b/hosting/views.py index 2b4c8d21..394fd04c 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -40,6 +40,18 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend connection error. please try again in a few minutes." +class DashboardView(View): + template_name = "hosting/dashboard.html" + + def get_context_data(self, **kwargs): + context = {} + return context + + def get(self, request, *args, **kwargs): + context = self.get_context_data() + return render(request, self.template_name, context) + + class DjangoHostingView(ProcessVMSelectionMixin, View): template_name = "hosting/django.html" @@ -244,7 +256,8 @@ class SignupValidatedView(SignupValidateView): lurl=login_url) else: home_url = 'Data Center Light' + reverse('datacenterlight:index') + \ + '">Data Center Light' message = '{sorry_message}
{go_back_to} {hurl}'.format( sorry_message=_("Sorry. Your request is invalid."), go_back_to=_('Go back to'), @@ -557,7 +570,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): token=token) if not customer: msg = _("Invalid credit card") - messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + messages.add_message( + self.request, messages.ERROR, msg, extra_tags='make_charge_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') # Create Billing Address @@ -571,7 +585,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): # Check if the payment was approved if not charge_response.get('response_object') and not charge_response.get('paid'): msg = charge_response.get('error') - messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + messages.add_message( + self.request, messages.ERROR, msg, extra_tags='make_charge_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') charge = charge_response.get('response_object') From 12844ac0d917df6bce34a0ddfe9ee887ef25b44d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 22 Aug 2017 21:35:30 +0530 Subject: [PATCH 02/30] dashboard page --- hosting/static/hosting/css/dashboard.css | 56 ++++++++++++++++++++++++ hosting/static/hosting/img/connected.svg | 45 +++++++++++++++++++ hosting/static/hosting/img/plusVM.svg | 8 ++-- hosting/static/hosting/img/settings.svg | 53 ++++++++++++++++++++++ hosting/static/hosting/js/initial.js | 37 ++++++++++++++++ hosting/templates/hosting/dashboard.html | 42 +++++++++++++++++- 6 files changed, 236 insertions(+), 5 deletions(-) create mode 100644 hosting/static/hosting/img/connected.svg create mode 100644 hosting/static/hosting/img/settings.svg diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index 82332e23..7a80e162 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -18,4 +18,60 @@ background: url(../../datacenterlight/img/pattern.jpg) no-repeat center center; background-size: cover; z-index: -2; +} + +.hosting-dashboard .dashboard-container-head { + color: #fff; + margin-bottom: 25px; +} + +.hosting-dashboard-item { + background: #e9ebee; + box-shadow: 1px 3px 3px rgba(0,0,0,0.5); + padding: 25px; + color: rgba(124, 139, 175, 0.7); + font-size: 19px; +} +.hosting-dashboard-item:hover, +.hosting-dashboard-item:focus, +.hosting-dashboard-item:active { + text-decoration: none; + color: #7c8baf; + background: #fff; +} + +.hosting-dashboard-item h2 { + margin: 0; + font-size: 19px; + padding-bottom: 10px; + border-bottom: 2px solid #acb5cf; + margin-bottom: 25px; +} + +.hosting-dashboard-image { + height: 100px; + fill: #8b9bb7; + display: flex; + align-items: center; +} +.hosting-dashboard-image img, +.hosting-dashboard-image svg { + width: 100%; + height: 100%; + max-height: 65px; +} +.hosting-dashboard-image img { + opacity: 0.2; +} + +@media (min-width: 768px) { + .hosting-dashboard-content { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + } + .hosting-dashboard-item { + width: 32%; + margin-bottom: 15px; + } } \ No newline at end of file diff --git a/hosting/static/hosting/img/connected.svg b/hosting/static/hosting/img/connected.svg new file mode 100644 index 00000000..fa3875dc --- /dev/null +++ b/hosting/static/hosting/img/connected.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/img/plusVM.svg b/hosting/static/hosting/img/plusVM.svg index c6c49316..2c1bb8f8 100644 --- a/hosting/static/hosting/img/plusVM.svg +++ b/hosting/static/hosting/img/plusVM.svg @@ -4,10 +4,10 @@ +VM Created with Sketch. - - - - + + + + diff --git a/hosting/static/hosting/img/settings.svg b/hosting/static/hosting/img/settings.svg new file mode 100644 index 00000000..61dc8613 --- /dev/null +++ b/hosting/static/hosting/img/settings.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index da2887c6..de36db7c 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -13,4 +13,41 @@ $( document ).ready(function() { }, 1000); }); + /* + * Replace all SVG images with inline SVG + */ + $('.svg-img').each(function(){ + console.log('asa') + var $img = $(this); + var imgID = $img.attr('id'); + var imgClass = $img.attr('class'); + var imgURL = $img.attr('src'); + + jQuery.get(imgURL, function(data) { + // Get the SVG tag, ignore the rest + var $svg = jQuery(data).find('svg'); + + // Add replaced image's ID to the new SVG + if(typeof imgID !== 'undefined') { + $svg = $svg.attr('id', imgID); + } + // Add replaced image's classes to the new SVG + if(typeof imgClass !== 'undefined') { + $svg = $svg.attr('class', imgClass+' replaced-svg'); + } + + // Remove any invalid XML tags as per http://validator.w3.org + $svg = $svg.removeAttr('xmlns:a'); + + // Check if the viewport is set, if the viewport is not set the SVG wont't scale. + if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) { + $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width')) + } + + // Replace image with new SVG + $img.replaceWith($svg); + + }, 'xml'); + + }); }); \ No newline at end of file diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html index 4c06f19b..562b3671 100644 --- a/hosting/templates/hosting/dashboard.html +++ b/hosting/templates/hosting/dashboard.html @@ -4,7 +4,47 @@ {% block content %} {%endblock%} From 9bbcd1b9abe40691974eb279c049c0d978801b77 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 22 Aug 2017 21:40:40 +0530 Subject: [PATCH 03/30] translations compiled --- hosting/locale/de/LC_MESSAGES/django.po | 75 +++++++++++++++++-------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 3cc30292..54ddb6a8 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-16 04:19+0530\n" +"POT-Creation-Date: 2017-08-22 21:38+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -172,6 +172,27 @@ msgstr "CHF/Monat" msgid "Start VM" msgstr "VM jetzt starten" +msgid "My Dashboard" +msgstr "" + +msgid "Create VM" +msgstr "" + +msgid "My VMs" +msgstr "" + +msgid "My SSH Keys" +msgstr "" + +msgid "My Bills" +msgstr "" + +msgid "My Settings" +msgstr "" + +msgid "Support / Contact" +msgstr "" + #, python-format msgid "" "You're receiving this email because you requested a password reset for your " @@ -300,13 +321,21 @@ msgstr "" "\"https://stripe.com\" target=\"_blank\">Stripe für die Bezahlung und " "speichern keine Informationen in unserer Datenbank." +#, fuzzy +#| msgid "" +#| "\n" +#| " You are not making any " +#| "payment yet. After submitting your card\n" +#| " information, you will be " +#| "taken to the Confirm Order Page.\n" +#| " " msgid "" "\n" -" You are not making any payment yet. " -"After submitting your card\n" -" information, you will be taken to " -"the Confirm Order Page.\n" -" " +" You are not making any " +"payment yet. After submitting your card\n" +" information, you will be " +"taken to the Confirm Order Page.\n" +" " msgstr "" "\n" "Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " @@ -328,19 +357,6 @@ msgstr "" msgid "Card Type" msgstr "Kartentyp" -msgid "" -"\n" -" You are not making any payment " -"yet. After submitting your card\n" -" information, you will be taken " -"to the Confirm Order Page.\n" -" " -msgstr "" -"\n" -"Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " -"Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " -"weitergeleitet." - msgid "Processing" msgstr "Weiter" @@ -474,6 +490,11 @@ msgstr "Du kannst dich nun" msgid "Sorry. Your request is invalid." msgstr "Entschuldigung, deine Anfrage ist ungültig." +#, fuzzy +#| msgid "Credit Card" +msgid "Invalid credit card" +msgstr "Kreditkarte" + msgid "Confirm Order" msgstr "Bestellung Bestätigen" @@ -482,6 +503,19 @@ msgid "" "contact Data Center Light Support." msgstr "" +#~ msgid "" +#~ "\n" +#~ " You are not making any payment " +#~ "yet. After submitting your card\n" +#~ " information, you will be taken to " +#~ "the Confirm Order Page.\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " +#~ "Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " +#~ "weitergeleitet." + #~ msgid "Ipv4" #~ msgstr "IPv4" @@ -597,9 +631,6 @@ msgstr "" #~ msgid "Generate Key Pair" #~ msgstr "Schlüsselpaar generieren" -#~ msgid "Created at" -#~ msgstr "Erstellt am" - #~ msgid "Billing Amount" #~ msgstr "Rechnungsbetrag" From 27a233ffc41e9d9882fc03b1e129dbe069bfb315 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 18:14:33 +0530 Subject: [PATCH 04/30] translations added --- hosting/locale/de/LC_MESSAGES/django.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 54ddb6a8..0206e8b1 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -173,25 +173,25 @@ msgid "Start VM" msgstr "VM jetzt starten" msgid "My Dashboard" -msgstr "" +msgstr "Mein Dashboard" msgid "Create VM" -msgstr "" +msgstr "VM erstellen" msgid "My VMs" -msgstr "" +msgstr "Meine VMs" msgid "My SSH Keys" -msgstr "" +msgstr "Meine SSH Keys" msgid "My Bills" -msgstr "" +msgstr "Meine Rechnungen" msgid "My Settings" -msgstr "" +msgstr "Meine Einstellungen" msgid "Support / Contact" -msgstr "" +msgstr "Support / Kontakt" #, python-format msgid "" From 4179d622aa95f8a5ea707ce07364ac4934289e64 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 23 Aug 2017 23:46:59 +0530 Subject: [PATCH 05/30] changed border color for error input --- hosting/static/hosting/css/landing-page.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 7a569dc8..c5ef9489 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -760,7 +760,6 @@ a.unlink:hover { .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label, -.has-error .form-control, .has-error .form-control-feedback, .alert-danger, .list-group-item-danger, @@ -770,6 +769,7 @@ a.list-group-item-danger:focus, .panel-danger > .panel-heading { color: #eb4d5c; } +.has-error .form-control, .has-error .input-group-addon { color: #eb4d5c; border-color: #eb4d5c; From fc0ed904472ce0aeeb8e6406f8aa0d944ca87377 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 00:39:47 +0530 Subject: [PATCH 06/30] background and margin fix --- hosting/static/hosting/css/dashboard.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index 7a80e162..ac5634c0 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -1,6 +1,6 @@ .hosting-dashboard:after { content: ''; - position: absolute; + position: fixed; top: 0; bottom: 0; left: 0; @@ -10,7 +10,7 @@ } .hosting-dashboard:before { content: ''; - position: absolute; + position: fixed; top: 0; bottom: 0; left: 0; @@ -18,6 +18,7 @@ background: url(../../datacenterlight/img/pattern.jpg) no-repeat center center; background-size: cover; z-index: -2; + height: 100%; } .hosting-dashboard .dashboard-container-head { @@ -31,6 +32,8 @@ padding: 25px; color: rgba(124, 139, 175, 0.7); font-size: 19px; + display: block; + margin-bottom: 15px; } .hosting-dashboard-item:hover, .hosting-dashboard-item:focus, @@ -72,6 +75,5 @@ } .hosting-dashboard-item { width: 32%; - margin-bottom: 15px; } } \ No newline at end of file From cfb1a303a17030b659fab0abebb461c5fd2c68bc Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 19:56:30 +0530 Subject: [PATCH 07/30] new icons --- hosting/static/hosting/css/dashboard.css | 2 +- .../static/hosting/img/24-hours-support.svg | 76 ++++--------------- hosting/static/hosting/img/billing.svg | 14 +++- .../static/hosting/img/dashboard_settings.svg | 64 ++++------------ hosting/static/hosting/img/key.svg | 17 +++-- hosting/static/hosting/img/plusVM.svg | 21 ++--- hosting/static/hosting/img/vm.svg | 17 +++-- 7 files changed, 73 insertions(+), 138 deletions(-) diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index ac5634c0..3974d4c5 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -30,7 +30,7 @@ background: #e9ebee; box-shadow: 1px 3px 3px rgba(0,0,0,0.5); padding: 25px; - color: rgba(124, 139, 175, 0.7); + color: rgba(124, 139, 175, 0.8); font-size: 19px; display: block; margin-bottom: 15px; diff --git a/hosting/static/hosting/img/24-hours-support.svg b/hosting/static/hosting/img/24-hours-support.svg index 4db05be3..e7ca37ff 100644 --- a/hosting/static/hosting/img/24-hours-support.svg +++ b/hosting/static/hosting/img/24-hours-support.svg @@ -1,61 +1,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Slice 23 + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/hosting/static/hosting/img/billing.svg b/hosting/static/hosting/img/billing.svg index d002fa6c..67f928ea 100644 --- a/hosting/static/hosting/img/billing.svg +++ b/hosting/static/hosting/img/billing.svg @@ -1 +1,13 @@ -billing icon \ No newline at end of file + + + + Slice 23 + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/hosting/static/hosting/img/dashboard_settings.svg b/hosting/static/hosting/img/dashboard_settings.svg index 4044e93a..38130c74 100644 --- a/hosting/static/hosting/img/dashboard_settings.svg +++ b/hosting/static/hosting/img/dashboard_settings.svg @@ -1,50 +1,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Slice 23 + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/hosting/static/hosting/img/key.svg b/hosting/static/hosting/img/key.svg index b2bd7bc3..4a1a39b8 100644 --- a/hosting/static/hosting/img/key.svg +++ b/hosting/static/hosting/img/key.svg @@ -1,7 +1,12 @@ - - - - - Svg Vector Icons : http://www.onlinewebfonts.com/icon - + + + + Slice 23 + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/hosting/static/hosting/img/plusVM.svg b/hosting/static/hosting/img/plusVM.svg index 2c1bb8f8..cd4ed759 100644 --- a/hosting/static/hosting/img/plusVM.svg +++ b/hosting/static/hosting/img/plusVM.svg @@ -1,19 +1,14 @@ - - - +VM + + + Slice 23 Created with Sketch. - - - - - - - - + - - + + + + + \ No newline at end of file diff --git a/hosting/static/hosting/img/vm.svg b/hosting/static/hosting/img/vm.svg index 376e7d0a..696619b9 100644 --- a/hosting/static/hosting/img/vm.svg +++ b/hosting/static/hosting/img/vm.svg @@ -1,7 +1,12 @@ - - - - - Svg Vector Icons : http://www.onlinewebfonts.com/icon - + + + + Slice 23 + Created with Sketch. + + + + + + \ No newline at end of file From 9be42f3fd4bf0ebc03277ad7835f45cfae16676d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 20:36:00 +0530 Subject: [PATCH 08/30] links added to the boxes --- hosting/templates/hosting/dashboard.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html index 562b3671..4464c5ca 100644 --- a/hosting/templates/hosting/dashboard.html +++ b/hosting/templates/hosting/dashboard.html @@ -8,25 +8,25 @@

{% trans "My Dashboard" %}

- +

{% trans "Create VM" %}

- +

{% trans "My VMs" %}

- +

{% trans "My SSH Keys" %}

- +

{% trans "My Bills" %}

From 2ed07e25fff570d41e4ec89c7fafb22b5ce0245f Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 25 Aug 2017 09:49:55 +0530 Subject: [PATCH 09/30] 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" From cd67bb9938211ea927e37b5431b00788647421df Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:37:40 +0530 Subject: [PATCH 10/30] 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 189adbadfb43cbda4b4688578f91b8f45e1dbc28 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:39:56 +0530 Subject: [PATCH 11/30] 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 8ab52c339855a79100ed762874b81108d8f4b58c Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 19 Aug 2017 06:41:29 +0530 Subject: [PATCH 12/30] 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 f3d00e47..209ece99 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/faq.html', gettext('DCL.Faq')), ) DATABASES = { From 8caeaf02172a59eb28f1e817e1608d46ab20180a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:51:17 +0200 Subject: [PATCH 13/30] 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 597541a2ee9bf51c3d00b7baffb69dc3b0ce5926 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:52:57 +0200 Subject: [PATCH 14/30] 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 929d790517c14d52cd30330bceca8b19a78001b6 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 17:59:56 +0200 Subject: [PATCH 15/30] 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 209ece99..08ce457d 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -214,7 +214,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 b044acab5dd4da6217e0794e981666767532ea98 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 21 Aug 2017 18:00:41 +0200 Subject: [PATCH 16/30] 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 6cca92ec3afc07e940162f73d7d444ae4ace668d Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 21 Aug 2017 23:16:30 +0530 Subject: [PATCH 17/30] 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 28bcef082c8e7e64feef358ced784c58230aef6f Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 27 Aug 2017 13:19:05 +0530 Subject: [PATCH 18/30] Merged tiwariav/task/3657/contact_section into task/3740/contact_send_message --- datacenterlight/forms.py | 9 +- .../locale/de/LC_MESSAGES/django.po | 30 ++- datacenterlight/migrations/0007_contactus.py | 24 +++ .../migrations/0008_contactus_field.py | 23 +++ datacenterlight/models.py | 10 +- .../datacenterlight/css/landing-page.css | 183 +++++++++++++----- .../datacenterlight/img/facebook_logo.svg | 11 ++ .../static/datacenterlight/js/main.js | 27 ++- .../datacenterlight/contact_form.html | 50 +++++ .../templates/datacenterlight/index.html | 32 +-- datacenterlight/urls.py | 9 +- datacenterlight/views.py | 33 +++- 12 files changed, 362 insertions(+), 79 deletions(-) create mode 100644 datacenterlight/migrations/0007_contactus.py create mode 100644 datacenterlight/migrations/0008_contactus_field.py create mode 100644 datacenterlight/static/datacenterlight/img/facebook_logo.svg create mode 100644 datacenterlight/templates/datacenterlight/contact_form.html diff --git a/datacenterlight/forms.py b/datacenterlight/forms.py index 33d95c29..3ffe403c 100644 --- a/datacenterlight/forms.py +++ b/datacenterlight/forms.py @@ -1,6 +1,6 @@ from django import forms -from .models import BetaAccess +from .models import BetaAccess, ContactUs class BetaAccessForm(forms.ModelForm): @@ -11,6 +11,13 @@ class BetaAccessForm(forms.ModelForm): model = BetaAccess +class ContactForm(forms.ModelForm): + + class Meta: + fields = ['name', 'email', 'message'] + model = ContactUs + + # class BetaAccessVMForm(forms.ModelForm): # type = forms.CharField(widget=forms.EmailInput()) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 3853d4e3..c0dc55ca 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -82,6 +82,24 @@ msgstr "Bitte gib eine gültige E-Mailadresse ein." msgid "Continue" msgstr "Weiter" +msgid "Thank you for contacting us." +msgstr "Nachricht gesendet." + +msgid "Your message was successfully sent to our team." +msgstr "Vielen Dank für Deine Nachricht." + +msgid "Get in touch with us!" +msgstr "Sende uns eine Nachricht." + +msgid "Message" +msgstr "Nachricht" + +msgid "Sorry, there was an unexpected error. Kindly retry." +msgstr "Bitte entschuldige, es scheint ein unerwarteter Fehler aufgetreten zu sein. Versuche es doch bitte noch einmal." + +msgid "SUBMIT" +msgstr "ABSENDEN" + msgid "Thank you for your request." msgstr "Vielen Dank für Ihre Anfrage." @@ -234,15 +252,12 @@ msgstr "" msgid "Affordable VM hosting based in Switzerland" msgstr "Bezahlbares VM Hosting in der Schweiz" +msgid "Contact us" +msgstr "Kontaktiere uns" + msgid "Switzerland " msgstr "Schweiz" -msgid "Questions?" -msgstr "Fragen?" - -msgid "Contact us!" -msgstr "Kontaktiere uns!" - msgid "Confirm Order" msgstr "Bestellung Bestätigen" @@ -412,6 +427,9 @@ msgstr "ist kein gültiger Name" msgid "is not a proper email" msgstr "ist keine gültige E-Mailadresse" +#~ msgid "Questions?" +#~ msgstr "Fragen?" + #~ msgid "Please enter a value greater than or equal to 1." #~ msgstr "Bitte gib einen Wert größer oder gleich 1 ein." diff --git a/datacenterlight/migrations/0007_contactus.py b/datacenterlight/migrations/0007_contactus.py new file mode 100644 index 00000000..12af594c --- /dev/null +++ b/datacenterlight/migrations/0007_contactus.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-08-19 21:08 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0006_vmtemplate'), + ] + + operations = [ + migrations.CreateModel( + name='ContactUs', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=250)), + ('email', models.CharField(max_length=250)), + ('message', models.TextField()), + ], + ), + ] diff --git a/datacenterlight/migrations/0008_contactus_field.py b/datacenterlight/migrations/0008_contactus_field.py new file mode 100644 index 00000000..ceea8f8f --- /dev/null +++ b/datacenterlight/migrations/0008_contactus_field.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-08-23 13:06 +from __future__ import unicode_literals + +import datetime +from django.db import migrations, models +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0007_contactus'), + ] + + operations = [ + migrations.AddField( + model_name='contactus', + name='field', + field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2017, 8, 23, 13, 6, 24, 650869, tzinfo=utc)), + preserve_default=False, + ), + ] diff --git a/datacenterlight/models.py b/datacenterlight/models.py index f7b50a01..e2de41e1 100644 --- a/datacenterlight/models.py +++ b/datacenterlight/models.py @@ -57,7 +57,8 @@ class VMTemplate(models.Model): @classmethod def create(cls, name, opennebula_vm_template_id): - vm_template = cls(name=name, opennebula_vm_template_id=opennebula_vm_template_id) + vm_template = cls( + name=name, opennebula_vm_template_id=opennebula_vm_template_id) return vm_template @@ -71,3 +72,10 @@ class StripePlan(models.Model): def create(cls, stripe_plan_id): stripe_plan = cls(stripe_plan_id=stripe_plan_id) return stripe_plan + + +class ContactUs(models.Model): + name = models.CharField(max_length=250) + email = models.CharField(max_length=250) + message = models.TextField() + field = models.DateTimeField(auto_now_add=True) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index a5562710..9d83a88f 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -323,9 +323,9 @@ button, input, optgroup, select, textarea { padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */ padding-bottom: 50px; - text-align: center; +/* text-align: center; */ color: #f8f8f8; - background: url(../img/banner-bg.jpg) no-repeat center center; + background: url(../img/pattern.jpg) no-repeat center center; background-size: cover; position: relative; } @@ -654,74 +654,161 @@ button, input, optgroup, select, textarea { position: relative; } -.full-contact-section { - 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%); -} - .contact-section { - padding: 60px 0; - color: #fff; + padding: 80px 0; + color: rgba(255,255,255,0.9); background-attachment: fixed; } -.contact-section .card { - text-align: center; - width: 350px; - margin: 0 auto; - background: #fff; - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - padding-bottom: 40px; - border-radius: 7px; - color: #4c4444; - box-sizing: border-box; - padding: 45px; - margin-top: -115px; +.contact-section .modal { + color: #333; } -.contact-section .card .social a { - color: #29427A; +.contact-details { + padding-left: 5px; +} + +.contact-section .description{ + font-size: 20px; +} + +.contact-section .social a { + color: #fff; font-size: 45px; } -.contact-section .card .subtitle h3 { - font-size: 30px; - margin-bottom: 23px; +.contact-section .social .fa-facebook { + font-size: 40px; + background: #fff; + border-radius: 100%; + color: #425d89; + width: 40px; + text-align: center; + top: -2px; + position: relative; + left: 10px; +} +.contact-section .social .fa-facebook:before { + font-size: 32px; + position: relative; + top: -1px; + left: -1px; } -.contact-section .card .social a:hover { +.contact-section .social a:hover { text-decoration: none; } -.contact-section .title { - margin-right: auto; - width: 80%; - max-width: 468px; +.contact-section .subtitle h3 { + font-size: 30px; + margin-bottom: 15px; +} + +.contact-section .contact-form-success { + font-size: 18px; + text-align: center; + background-color: rgba(0,0,0,0.2); + padding: 0 15px 35px; + margin-top: 25px; } .contact-section .title h2 { font-size: 65px; margin: 0; - color: #fff; - padding-bottom: 25px; position: relative; - text-align: right; +/* color: #eee; + padding-bottom: 25px; + text-align: right; */ } -.contact-section .title h2::before { - content: ""; +.contact-form .form-group { + border: 0; + margin-bottom: 20px; +} + +.contact-form .form-group label { + letter-spacing: 0.6px; + font-weight: 400; +} + +.contact-form .btn { + min-width: 140px; + background: rgba(23, 23, 23, 0.18); + color: #fff; + border-radius: 4px; + border-width: 2px; + box-shadow: none; + letter-spacing: 2px; + border-color: #fff; +} + +.contact-form .btn.sending { + cursor: wait; +} + +@keyframes sending { + 0% {content: '.';} + 50% {content: '..';} + 100% {content: '...';} +} + +.contact-form .btn.sending:after { + content: '.'; position: absolute; - bottom: 0; - background: #fff; - height: 7px; - width: 70px; - right: 0; + display: inline-block; + text-align: left; + margin-left: 5px; + width: 20px; + animation: sending 1s linear infinite; } +.contact-form .btn:hover, +.contact-form .btn:focus { + background: rgba(23, 23, 23, 0.28); + border-color: #fff; + box-shadow: none; + outline: 0; +} + +.contact-form .form-control { + box-shadow: none; + border-color: #ccc; +} + +.contact-form .errorlist { + list-style: none; + padding: 5px; + margin: 0; + color: rgb(255, 164, 164); + font-weight: 600; + letter-spacing: 0.4px; +} + +.contact-form .form-error { + background: rgba(255,255,255,0.9); + color: #eb4d5c; + padding: 10px; + text-align: center; + margin-bottom: 20px; + border-radius: 5px; +} + +.contact-form .has-error label { + color: #fff; +} + +.contact-form .has-error .form-control { + border: 2px solid #e8534b; + box-shadow: none; +} + +.contact-form .subtitle { + padding: 22px 0 15px; +} + +.contact-form textarea { + resize: none; +} /*Why DCL*/ @@ -1311,9 +1398,9 @@ tech-sub-sec h2 { margin: 0 auto; } .contact-section .title h2 { - font-size: 35px; + font-size: 45px; line-height: 40px; - text-align: center; +/* text-align: center; */ margin-top: 35px; } .contact-section .title h2::before { @@ -1558,4 +1645,4 @@ a.list-group-item-danger.active:focus { } .panel-danger > .panel-heading .badge { background-color: #eb4d5c; -} \ No newline at end of file +} diff --git a/datacenterlight/static/datacenterlight/img/facebook_logo.svg b/datacenterlight/static/datacenterlight/img/facebook_logo.svg new file mode 100644 index 00000000..c2ab1b51 --- /dev/null +++ b/datacenterlight/static/datacenterlight/img/facebook_logo.svg @@ -0,0 +1,11 @@ + + + + Slice 20 + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index 5594fe11..2e928955 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -39,7 +39,7 @@ _initScroll(); _initNavUrl(); _initPricing(); - + ajaxForms(); }); $(window).resize(function() { @@ -157,4 +157,27 @@ $('#valueTotal').text(numbers * price * 31); } -})(jQuery); + function ajaxForms() { + $('body').on('submit', '.ajax-form', function(e){ + e.preventDefault(); + var $form = $(this); + $form.find('[type=submit]').addClass('sending'); + $.ajax({ + url: $form.attr('action'), + type: $form.attr('method'), + data: $form.serialize(), + + success: function(response) { + var responseContain = $($form.attr('data-response')); + responseContain.html(response); + $form.find('[type=submit]').removeClass('sending'); + }, + + error: function() { + $form.find('[type=submit]').removeClass('sending'); + $form.find('.form-error').removeClass('hide'); + } + }); + }) + } +})(jQuery); \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/contact_form.html b/datacenterlight/templates/datacenterlight/contact_form.html new file mode 100644 index 00000000..458d6168 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/contact_form.html @@ -0,0 +1,50 @@ +{% load i18n %} + +{% if success %} +
    +
    +

    {% trans "Thank you for contacting us." %}

    +
    +

    + {% trans "Your message was successfully sent to our team." %} +

    +
    +{% else %} +
    +
    +
    +

    {% trans "Get in touch with us!" %}

    +
    +
    +
    +
    + {% csrf_token %} +
    + +
    + + {{contact_form.name.errors}} +
    +
    +
    + +
    + + {{contact_form.email.errors}} +
    +
    +
    + +
    + + {{contact_form.message.errors}} +
    +
    +
    +
    +
    {% trans "Sorry, there was an unexpected error. Kindly retry." %}
    + +
    +
    +
    +{% endif %} \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 3ddb516d..3f89055c 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -1,5 +1,5 @@ {% extends "datacenterlight/base.html" %} -{% load staticfiles i18n%} +{% load staticfiles i18n %} {% block content %} @@ -149,32 +149,34 @@
    - +
    - -
    -
    +
    +
    +

    {% trans "Contact us" %}

    +
    +
    -

    ungleich GmbH

    +

    ungleich GmbH

    -

    info@datacenterlight.ch

    +

    info@datacenterlight.ch

    In der Au 7, Schwanden 8762

    {% trans "Switzerland " %}

    - +
    +
    -
    -
    -

    {% trans "Questions?" %} {% trans "Contact us!" %}

    +
    +
    + {% include "datacenterlight/contact_form.html" %}
    diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index a3aed7a6..f5f84ba9 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,17 +1,20 @@ from django.conf.urls import url from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView, \ - PaymentOrderView, OrderConfirmationView, WhyDataCenterLightView + PaymentOrderView, OrderConfirmationView, WhyDataCenterLightView, ContactUsView urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), - url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), + url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), + name='whydatacenterlight'), url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^pricing/?$', PricingView.as_view(), name='pricing'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), - url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), + url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), + name='order_confirmation'), url(r'^order-success/?$', SuccessView.as_view(), name='order_success'), url(r'^beta_access?$', BetaAccessView.as_view(), name='beta_access'), + url(r'^contact/?$', ContactUsView.as_view(), name='contact_us'), ] diff --git a/datacenterlight/views.py b/datacenterlight/views.py index fd1435a1..c7b258c2 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -1,6 +1,6 @@ from django.views.generic import FormView, CreateView, TemplateView, DetailView from django.http import HttpResponseRedirect -from .forms import BetaAccessForm +from .forms import BetaAccessForm, ContactForm from .models import BetaAccess, BetaAccessVMType, BetaAccessVM, VMTemplate from django.contrib import messages from django.core.urlresolvers import reverse @@ -23,6 +23,33 @@ from opennebula_api.serializers import VirtualMachineTemplateSerializer, \ from datacenterlight.tasks import create_vm_task +class ContactUsView(FormView): + template_name = "datacenterlight/contact_form.html" + form_class = ContactForm + + def get(self, request, *args, **kwargs): + return HttpResponseRedirect(reverse('datacenterlight:index')) + + def form_invalid(self, form): + if self.request.is_ajax(): + return self.render_to_response( + self.get_context_data(contact_form=form)) + else: + return render(self.request, + 'datacenterlight/index.html', + self.get_context_data(contact_form=form)) + + def form_valid(self, form): + form.save() + if self.request.is_ajax(): + return self.render_to_response( + self.get_context_data(success=True, contact_form=form)) + else: + return render(self.request, + 'datacenterlight/index.html', + self.get_context_data(success=True, contact_form=form)) + + class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" @@ -314,8 +341,8 @@ class IndexView(CreateView): def get_context_data(self, **kwargs): context = super(IndexView, self).get_context_data(**kwargs) context.update({ - 'base_url': "{0}://{1}".format(self.request.scheme, - self.request.get_host()) + 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), + 'contact_form': ContactForm }) return context From 7c9ec6fdde76b6fe1d1675a679b4d4fc6f67ba5d Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 27 Aug 2017 13:38:08 +0530 Subject: [PATCH 19/30] Added contact us migrations after --merge with the existing migrations --- datacenterlight/migrations/0009_merge.py | 16 ++++++++++++++++ datacenterlight/migrations/0010_merge.py | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 datacenterlight/migrations/0009_merge.py create mode 100644 datacenterlight/migrations/0010_merge.py diff --git a/datacenterlight/migrations/0009_merge.py b/datacenterlight/migrations/0009_merge.py new file mode 100644 index 00000000..1f5d5bad --- /dev/null +++ b/datacenterlight/migrations/0009_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-08-27 07:55 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0007_contactus'), + ('datacenterlight', '0008_auto_20170821_2024'), + ] + + operations = [ + ] diff --git a/datacenterlight/migrations/0010_merge.py b/datacenterlight/migrations/0010_merge.py new file mode 100644 index 00000000..72feedf5 --- /dev/null +++ b/datacenterlight/migrations/0010_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-08-27 08:02 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('datacenterlight', '0009_merge'), + ('datacenterlight', '0008_contactus_field'), + ] + + operations = [ + ] From d69dbcb720002ff64684596f96508c97f6b6ff25 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 27 Aug 2017 15:20:23 +0530 Subject: [PATCH 20/30] Cleaned up some comment code --- datacenterlight/tests.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/datacenterlight/tests.py b/datacenterlight/tests.py index 602fb403..7c2f7353 100644 --- a/datacenterlight/tests.py +++ b/datacenterlight/tests.py @@ -6,10 +6,8 @@ import stripe from celery.result import AsyncResult from django.conf import settings from django.core.management import call_command -# Create your tests here. from django.test import TestCase, override_settings from model_mommy import mommy - from datacenterlight.models import VMTemplate from datacenterlight.tasks import create_vm_task from membership.models import StripeCustomer From 1da04a05d1f6bf8d38975cd0324e8f90b4036fca Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 27 Aug 2017 15:23:19 +0530 Subject: [PATCH 21/30] Created send_plain_email_task celery task and calling it on contact send --- datacenterlight/views.py | 10 ++++++++++ utils/tasks.py | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 utils/tasks.py diff --git a/datacenterlight/views.py b/datacenterlight/views.py index c7b258c2..9eaf95aa 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -21,6 +21,7 @@ from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer, \ VMTemplateSerializer from datacenterlight.tasks import create_vm_task +from utils.tasks import send_plain_email_task class ContactUsView(FormView): @@ -41,6 +42,15 @@ class ContactUsView(FormView): def form_valid(self, form): form.save() + email_data = { + 'subject': 'Request received on Data Center Light', + 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, + 'to': ['info@ungleich.ch'], + 'body': "\n".join( + ["%s=%s" % (k, v) for (k, v) in form.cleaned_data.items()]), + 'reply_to': [form.cleaned_data.get('email')], + } + send_plain_email_task.delay(email_data) if self.request.is_ajax(): return self.render_to_response( self.get_context_data(success=True, contact_form=form)) diff --git a/utils/tasks.py b/utils/tasks.py new file mode 100644 index 00000000..5334b507 --- /dev/null +++ b/utils/tasks.py @@ -0,0 +1,20 @@ +from celery.utils.log import get_task_logger +from django.conf import settings +from dynamicweb.celery import app +from django.core.mail import EmailMessage + +logger = get_task_logger(__name__) + + +@app.task(bind=True, max_retries=settings.CELERY_MAX_RETRIES) +def send_plain_email_task(self, email_data): + """ + This is a generic celery task to be used for sending emails. + A celery wrapper task for EmailMessage + + :param self: + :param email_data: A dict of all needed email headers + :return: + """ + email = EmailMessage(**email_data) + email.send() From 2f2dcb08145b08ca774eb697c897163f5d4439dd Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 29 Aug 2017 10:43:30 +0200 Subject: [PATCH 22/30] Added datacenterlight/t, datacenterlight/g, datacenterlight/f url routes to point to dcl's IndexView --- datacenterlight/urls.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index a3aed7a6..3c8eafae 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,17 +1,22 @@ from django.conf.urls import url -from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView, \ - PaymentOrderView, OrderConfirmationView, WhyDataCenterLightView - +from .views import IndexView, BetaProgramView, LandingProgramView, \ + BetaAccessView, PricingView, SuccessView, \ + PaymentOrderView, OrderConfirmationView, WhyDataCenterLightView urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), - url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), + url(r'^t$', IndexView.as_view(), name='index_t'), + url(r'^g$', IndexView.as_view(), name='index_g'), + url(r'^f$', IndexView.as_view(), name='index_g'), + url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), + name='whydatacenterlight'), url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^pricing/?$', PricingView.as_view(), name='pricing'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), - url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), + url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), + name='order_confirmation'), url(r'^order-success/?$', SuccessView.as_view(), name='order_success'), url(r'^beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] From 12bb95f68588964db48d38fa557697e4f1677f9b Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 29 Aug 2017 10:46:16 +0200 Subject: [PATCH 23/30] Fixed a mistake --- datacenterlight/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 3c8eafae..ceb4ff93 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -8,7 +8,7 @@ urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), url(r'^t$', IndexView.as_view(), name='index_t'), url(r'^g$', IndexView.as_view(), name='index_g'), - url(r'^f$', IndexView.as_view(), name='index_g'), + url(r'^f$', IndexView.as_view(), name='index_f'), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), From e032fb744c2049c5d21bb1055d5e580a8971994a Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 14:24:27 +0530 Subject: [PATCH 24/30] svg images fixed --- hosting/static/hosting/css/dashboard.css | 2 +- .../static/hosting/css/virtual-machine.css | 11 +-- .../static/hosting/img/24-hours-support.svg | 70 +------------------ hosting/static/hosting/img/billing.svg | 8 +-- .../static/hosting/img/dashboard_settings.svg | 4 +- hosting/static/hosting/img/key.svg | 4 +- hosting/static/hosting/img/plusVM.svg | 8 +-- hosting/static/hosting/img/vm.svg | 4 +- 8 files changed, 22 insertions(+), 89 deletions(-) diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index 3974d4c5..80855301 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -30,7 +30,7 @@ background: #e9ebee; box-shadow: 1px 3px 3px rgba(0,0,0,0.5); padding: 25px; - color: rgba(124, 139, 175, 0.8); + color: rgba(124, 139, 175, 1); font-size: 19px; display: block; margin-bottom: 15px; diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index 45aa68ff..806d40c6 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -440,10 +440,11 @@ } .dashboard-title-thin .un-icon { - height: 30px; + height: 34px; margin-right: 5px; - margin-top: -1px; - width: 30px; + margin-top: -2px; + width: 34px; + vertical-align: middle; } .dashboard-subtitle { @@ -528,8 +529,8 @@ font-size: 22px; } .dashboard-title-thin .un-icon { - height: 20px; - width: 18px; + height: 22px; + width: 22px; margin-top: -3px; } .dashboard-subtitle p { diff --git a/hosting/static/hosting/img/24-hours-support.svg b/hosting/static/hosting/img/24-hours-support.svg index 1617197e..473828a2 100644 --- a/hosting/static/hosting/img/24-hours-support.svg +++ b/hosting/static/hosting/img/24-hours-support.svg @@ -1,79 +1,15 @@ -<<<<<<< HEAD Slice 23 Created with Sketch. - - + + - -======= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->>>>>>> master + \ No newline at end of file diff --git a/hosting/static/hosting/img/billing.svg b/hosting/static/hosting/img/billing.svg index 253b0fb4..c382cffa 100644 --- a/hosting/static/hosting/img/billing.svg +++ b/hosting/static/hosting/img/billing.svg @@ -1,17 +1,13 @@ -<<<<<<< HEAD Slice 23 Created with Sketch. - - + + -======= -billing icon ->>>>>>> master diff --git a/hosting/static/hosting/img/dashboard_settings.svg b/hosting/static/hosting/img/dashboard_settings.svg index 38130c74..f8d60bf5 100644 --- a/hosting/static/hosting/img/dashboard_settings.svg +++ b/hosting/static/hosting/img/dashboard_settings.svg @@ -4,8 +4,8 @@ Slice 23 Created with Sketch. - - + + diff --git a/hosting/static/hosting/img/key.svg b/hosting/static/hosting/img/key.svg index 4a1a39b8..42b1e539 100644 --- a/hosting/static/hosting/img/key.svg +++ b/hosting/static/hosting/img/key.svg @@ -4,8 +4,8 @@ Slice 23 Created with Sketch. - - + + diff --git a/hosting/static/hosting/img/plusVM.svg b/hosting/static/hosting/img/plusVM.svg index cd4ed759..2bd59e2d 100644 --- a/hosting/static/hosting/img/plusVM.svg +++ b/hosting/static/hosting/img/plusVM.svg @@ -4,11 +4,11 @@ Slice 23 Created with Sketch. - - + + - - + + \ No newline at end of file diff --git a/hosting/static/hosting/img/vm.svg b/hosting/static/hosting/img/vm.svg index 696619b9..061d80ce 100644 --- a/hosting/static/hosting/img/vm.svg +++ b/hosting/static/hosting/img/vm.svg @@ -4,8 +4,8 @@ Slice 23 Created with Sketch. - - + + From 591c51bb4630e80385e2a2a0ff1e6a4ae72305de Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 17:57:11 +0530 Subject: [PATCH 25/30] translation fix --- hosting/locale/de/LC_MESSAGES/django.po | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 54d0ed42..3351aee3 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -366,8 +366,6 @@ msgstr "Erstelle dein neues Keypaar" msgid "Warning!" msgstr "Achtung!" -#, fuzzy -#| msgid "You can download your SSH private key once. Don't lost your key" msgid "You can download your SSH private key once. Don't loose your key" msgstr "" "Du kannst deinen privaten SSH Schlüssel nur einmal herunterladen. Beware ihn " @@ -403,8 +401,6 @@ msgstr "Möchtest Du den Schlüssel löschen?" msgid "Show" msgstr "Anzeigen" -#, fuzzy -#| msgid "Public SSH Key" msgid "Public SSH Key" msgstr "Public SSH Key" @@ -444,9 +440,6 @@ msgstr "Fehlgeschlagen" msgid "Terminate VM" msgstr "VM Beenden" -msgid "Support / Contact" -msgstr "Support / Kontakt" - msgid "Something doesn't work?" msgstr "Etwas funktioniert nicht?" @@ -513,7 +506,7 @@ msgstr "Bestellung Bestätigen" msgid "" "We could not find the requested VM. Please " "contact Data Center Light Support." -msgstr "" +msgstr "Kontaktiere den Data Center Light Support." #~ msgid "Approved" #~ msgstr "Akzeptiert" From 919ad6e869646a863429feed041671504b01ed4c Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 18:01:00 +0530 Subject: [PATCH 26/30] email added to contact button --- hosting/templates/hosting/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html index 4464c5ca..4d41874e 100644 --- a/hosting/templates/hosting/dashboard.html +++ b/hosting/templates/hosting/dashboard.html @@ -38,7 +38,7 @@
    - +

    {% trans "Support / Contact" %}

    From 3e88b3bd5372398787712c599ece074bc77a3eb4 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 30 Aug 2017 01:51:59 +0530 Subject: [PATCH 27/30] Updated Changelog for 1.1.1 --- Changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Changelog b/Changelog index 6d1dfd5d..1f5b70e6 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +1.1.1: 2017-08-29 + * #3709: [datacenterlight] Added faq tos cms template + * #3657: [datacenterlight] Added a new contact section at landing + * #3740: [datacenterlight] Made contact section to send email to info when user submits a message + * #3757: [datacenterlight] Added new routes to dcl 1.1: 2017-08-24 * #3637: [datacenterlight, hosting] Added Stripe error handler * #3695: [hosting] Applied new design for VM list in hosting From 5ffb2a2bb702b25499a540190e2e9efc1e264431 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 30 Aug 2017 10:04:19 +0200 Subject: [PATCH 28/30] Improved the contact us email message subject & reformatted code --- datacenterlight/views.py | 44 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 9eaf95aa..25c2b87f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -1,27 +1,27 @@ -from django.views.generic import FormView, CreateView, TemplateView, DetailView -from django.http import HttpResponseRedirect -from .forms import BetaAccessForm, ContactForm -from .models import BetaAccess, BetaAccessVMType, BetaAccessVM, VMTemplate -from django.contrib import messages -from django.core.urlresolvers import reverse -from utils.mailer import BaseEmail -from django.shortcuts import render -from django.shortcuts import redirect from django import forms -from django.core.exceptions import ValidationError -from django.views.decorators.cache import cache_control from django.conf import settings +from django.contrib import messages +from django.core.exceptions import ValidationError +from django.core.urlresolvers import reverse +from django.http import HttpResponseRedirect +from django.shortcuts import redirect +from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ -from utils.forms import BillingAddressForm -from utils.models import BillingAddress +from django.views.decorators.cache import cache_control +from django.views.generic import FormView, CreateView, TemplateView, DetailView + +from datacenterlight.tasks import create_vm_task from hosting.models import HostingOrder -from utils.stripe_utils import StripeUtils from membership.models import CustomUser, StripeCustomer from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer, \ VMTemplateSerializer -from datacenterlight.tasks import create_vm_task +from utils.forms import BillingAddressForm +from utils.mailer import BaseEmail +from utils.stripe_utils import StripeUtils from utils.tasks import send_plain_email_task +from .forms import BetaAccessForm, ContactForm +from .models import BetaAccess, BetaAccessVMType, BetaAccessVM, VMTemplate class ContactUsView(FormView): @@ -43,7 +43,10 @@ class ContactUsView(FormView): def form_valid(self, form): form.save() email_data = { - 'subject': 'Request received on Data Center Light', + 'subject': "{dcl_text} Message from {sender}".format( + dcl_text=settings.DCL_TEXT, + sender=form.cleaned_data.get('email') + ), 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, 'to': ['info@ungleich.ch'], 'body': "\n".join( @@ -57,7 +60,8 @@ class ContactUsView(FormView): else: return render(self.request, 'datacenterlight/index.html', - self.get_context_data(success=True, contact_form=form)) + self.get_context_data(success=True, + contact_form=form)) class LandingProgramView(TemplateView): @@ -351,7 +355,8 @@ class IndexView(CreateView): def get_context_data(self, **kwargs): context = super(IndexView, self).get_context_data(**kwargs) context.update({ - 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), + 'base_url': "{0}://{1}".format(self.request.scheme, + self.request.get_host()), 'contact_form': ContactForm }) return context @@ -456,7 +461,8 @@ class PaymentOrderView(FormView): token=token) if not customer: form.add_error("__all__", "Invalid credit card") - return self.render_to_response(self.get_context_data(form=form)) + return self.render_to_response( + self.get_context_data(form=form)) # Create Billing Address billing_address = form.save() From 03ab40eed590b9646bd4ce310910758349892958 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 30 Aug 2017 16:05:35 +0530 Subject: [PATCH 29/30] proportions fixed for dashboard box --- hosting/static/hosting/css/dashboard.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index 80855301..7d2f245d 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -5,7 +5,7 @@ bottom: 0; left: 0; right: 0; - background-color: rgba(41, 66, 122, 0.59); + background-color: rgba(91, 116, 173, 0.7); z-index: -1; } .hosting-dashboard:before { @@ -23,12 +23,12 @@ .hosting-dashboard .dashboard-container-head { color: #fff; - margin-bottom: 25px; + margin-bottom: 60px; } .hosting-dashboard-item { background: #e9ebee; - box-shadow: 1px 3px 3px rgba(0,0,0,0.5); + box-shadow: 1px 3px 3px rgba(0,0,0,0.4); padding: 25px; color: rgba(124, 139, 175, 1); font-size: 19px; @@ -45,14 +45,14 @@ .hosting-dashboard-item h2 { margin: 0; - font-size: 19px; - padding-bottom: 10px; + font-size: 18px; + padding-bottom: 15px; border-bottom: 2px solid #acb5cf; margin-bottom: 25px; } .hosting-dashboard-image { - height: 100px; + height: 110px; fill: #8b9bb7; display: flex; align-items: center; @@ -61,7 +61,7 @@ .hosting-dashboard-image svg { width: 100%; height: 100%; - max-height: 65px; + max-height: 79px; } .hosting-dashboard-image img { opacity: 0.2; @@ -74,6 +74,6 @@ flex-wrap: wrap; } .hosting-dashboard-item { - width: 32%; + width: 31.5%; } } \ No newline at end of file From e4b5ed5e4b6950ef86a886cf0d0b5747c2f1b4fb Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 30 Aug 2017 16:14:02 +0530 Subject: [PATCH 30/30] hover color fix --- hosting/static/hosting/css/dashboard.css | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css index 7d2f245d..c7bbecd9 100644 --- a/hosting/static/hosting/css/dashboard.css +++ b/hosting/static/hosting/css/dashboard.css @@ -33,7 +33,7 @@ color: rgba(124, 139, 175, 1); font-size: 19px; display: block; - margin-bottom: 15px; + margin-bottom: 20px; } .hosting-dashboard-item:hover, .hosting-dashboard-item:focus, @@ -48,15 +48,21 @@ font-size: 18px; padding-bottom: 15px; border-bottom: 2px solid #acb5cf; - margin-bottom: 25px; + margin-bottom: 10px; } .hosting-dashboard-image { - height: 110px; + height: 120px; fill: #8b9bb7; display: flex; align-items: center; } +.hosting-dashboard-item:hover .hosting-dashboard-image, +.hosting-dashboard-item:focus .hosting-dashboard-image, +.hosting-dashboard-item:active .hosting-dashboard-image { + fill: #6D84AC; + color: #6D84AC; +} .hosting-dashboard-image img, .hosting-dashboard-image svg { width: 100%;