diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 2887095f..3351aee3 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -172,6 +172,27 @@ msgstr "CHF/Monat" msgid "Start VM" msgstr "VM jetzt starten" +msgid "My Dashboard" +msgstr "Mein Dashboard" + +msgid "Create VM" +msgstr "VM erstellen" + +msgid "My VMs" +msgstr "Meine VMs" + +msgid "My SSH Keys" +msgstr "Meine SSH Keys" + +msgid "My Bills" +msgstr "Meine Rechnungen" + +msgid "My Settings" +msgstr "Meine Einstellungen" + +msgid "Support / Contact" +msgstr "Support / Kontakt" + #, python-format msgid "" "You're receiving this email because you requested a password reset for your " @@ -345,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 " @@ -382,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" @@ -423,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?" @@ -492,20 +506,7 @@ msgstr "Bestellung Bestätigen" msgid "" "We could not find the requested VM. Please " "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." +msgstr "Kontaktiere den Data Center Light Support." #~ msgid "Approved" #~ msgstr "Akzeptiert" @@ -516,24 +517,9 @@ msgstr "" #~ msgid "Cancel Order" #~ msgstr "Bestellung stornieren" -#, fuzzy -#~| msgid "Do You want to delete your order?" #~ msgid "Do you want to delete your order?" #~ msgstr "Willst du deine Bestellung löschen?" -#~ 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 "Ip not assigned yet" #~ msgstr "Ip nicht zugewiesen" @@ -561,82 +547,12 @@ msgstr "" #~ msgid "Keys" #~ msgstr "Schlüssel" -#, fuzzy -#~| msgid "Contact" -#~ msgid "Content" -#~ msgstr "Kontakt" - -#, fuzzy -#~| msgid "Contact" -#~ msgid "DG.Contact" -#~ msgstr "Kontakt" - -#, fuzzy -#~| msgid "Home" -#~ msgid "DG.Home" -#~ msgstr "Home" - -#, fuzzy -#~| msgid "Amount" -#~ msgid "Country" -#~ msgstr "Betrag" - #~ msgid "Log in" #~ msgstr "Anmelden" -#, fuzzy -#~| msgid "Configuration" -#~ msgid "Donation #" -#~ msgstr "Konfiguration" - -#, fuzzy -#~| msgid "Billing Address" -#~ msgid "Billing Address:" -#~ msgstr "Rechnungsadresse" - -#, fuzzy -#~| msgid "Date" -#~ msgid "Date:" -#~ msgstr "Datum" - -#, fuzzy -#~| msgid "Configuration" -#~ msgid "Donation" -#~ msgstr "Konfiguration" - -#, fuzzy -#~| msgid "View Detail" -#~ msgid "View Donations" -#~ msgstr "Details anzeigen" - #~ msgid "You haven been logged out" #~ msgstr "Sie wurden abgmeldet" -#, fuzzy -#~| msgid "Log in" -#~ msgid "Log in " -#~ msgstr "Anmelden" - -#, fuzzy -#~| msgid "View Detail" -#~ msgid "DG.Detail" -#~ msgstr "Details anzeigen" - -#, fuzzy -#~| msgid "Cancel" -#~ msgid "France" -#~ msgstr "Beenden" - -#, fuzzy -#~| msgid "Enter your credit card number" -#~ msgid "Enter your name or company name" -#~ msgstr "Deine Kreditkartennummer" - -#, fuzzy -#~| msgid "Card Number" -#~ msgid "Cardholder Name" -#~ msgstr "Kreditkartennummer" - #~ msgid "How it works" #~ msgstr "So funktioniert es" @@ -658,9 +574,6 @@ msgstr "" #~ msgid "Generate Key Pair" #~ msgstr "Schlüsselpaar generieren" -#~ msgid "Created at" -#~ msgstr "Erstellt am" - #~ msgid "Billing Amount" #~ msgstr "Rechnungsbetrag" diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css new file mode 100644 index 00000000..c7bbecd9 --- /dev/null +++ b/hosting/static/hosting/css/dashboard.css @@ -0,0 +1,85 @@ +.hosting-dashboard:after { + content: ''; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(91, 116, 173, 0.7); + z-index: -1; +} +.hosting-dashboard:before { + content: ''; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: url(../../datacenterlight/img/pattern.jpg) no-repeat center center; + background-size: cover; + z-index: -2; + height: 100%; +} + +.hosting-dashboard .dashboard-container-head { + color: #fff; + margin-bottom: 60px; +} + +.hosting-dashboard-item { + background: #e9ebee; + box-shadow: 1px 3px 3px rgba(0,0,0,0.4); + padding: 25px; + color: rgba(124, 139, 175, 1); + font-size: 19px; + display: block; + margin-bottom: 20px; +} +.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: 18px; + padding-bottom: 15px; + border-bottom: 2px solid #acb5cf; + margin-bottom: 10px; +} + +.hosting-dashboard-image { + 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%; + height: 100%; + max-height: 79px; +} +.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: 31.5%; + } +} \ No newline at end of file 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 4db05be3..473828a2 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..c382cffa 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. + + + + + + + + diff --git a/hosting/static/hosting/img/dashboard_settings.svg b/hosting/static/hosting/img/dashboard_settings.svg new file mode 100644 index 00000000..f8d60bf5 --- /dev/null +++ b/hosting/static/hosting/img/dashboard_settings.svg @@ -0,0 +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 new file mode 100644 index 00000000..42b1e539 --- /dev/null +++ b/hosting/static/hosting/img/key.svg @@ -0,0 +1,12 @@ + + + + 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 new file mode 100644 index 00000000..2bd59e2d --- /dev/null +++ b/hosting/static/hosting/img/plusVM.svg @@ -0,0 +1,14 @@ + + + + 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..061d80ce 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 diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index 50975806..2f00c996 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -13,6 +13,43 @@ $( 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'); + }); + $('.alt-text').on('mouseenter mouseleave', function(e){ var $this = $(this); var txt = $this.text(); 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..4d41874e --- /dev/null +++ b/hosting/templates/hosting/dashboard.html @@ -0,0 +1,50 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 i18n %} + +{% block content %} +
+
+
+

{% trans "My Dashboard" %}

+
+ +
+
+{%endblock%} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 499511f8..543234f0 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -87,7 +87,7 @@
{% if not messages and not form.non_field_errors %}

- {% blocktrans %}You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page.{% endblocktrans %} + {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}

{% endif %}
@@ -144,7 +144,7 @@
{% if not messages and not form.non_field_errors %}

- {% blocktrans %}You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page.{% endblocktrans %} + {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}

{% endif %}
diff --git a/hosting/urls.py b/hosting/urls.py index 23709904..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'), diff --git a/hosting/views.py b/hosting/views.py index 0747f134..08f0862e 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" @@ -558,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 @@ -572,7 +585,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): # Check if the payment was approved if not charge_response.get('response_object'): 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')