diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 9d83a88f..c329dcc5 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -972,6 +972,10 @@ tech-sub-sec h2 { .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover { background: transparent; +} +.navbar-transparent .navbar-nav>.open>a, +.navbar-transparent .navbar-nav>.open>a:focus, +.navbar-transparent .navbar-nav>.open>a:hover { color: #fff; } diff --git a/datacenterlight/static/datacenterlight/js/main.js b/datacenterlight/static/datacenterlight/js/main.js index 2e928955..c508d76d 100644 --- a/datacenterlight/static/datacenterlight/js/main.js +++ b/datacenterlight/static/datacenterlight/js/main.js @@ -86,17 +86,29 @@ } function _initNavUrl() { + $('.url-init').each(function(idx, el) { + var $this = $(el); + var currentPath = window.location.pathname; + var thisPaths = $this.attr('href').split('#') + if ($this.hasClass('dropdown-toggle') && window.matchMedia("(max-width: 767px)").matches) { + $this.removeClass('url-init'); + $this.attr('href', ''); + } else if ($('#'+thisPaths[1]).length) { + $this.removeClass('url-init').addClass('url'); + $this.attr('href', '#' + thisPaths[1]); + } else { + $this.removeClass('url-init'); + } + }); $('.url').click(function(event) { event.preventDefault(); - var href = $(this).attr('data-url'); + var href = $(this).attr('href'); $('.navbar-collapse').removeClass('in'); $('.navbar-collapse').addClass('collapsing'); if ($(href).length) { $('html, body').animate({ scrollTop: $(href).offset().top }, 1000); - } else { - window.location.href = '/datacenterlight' + href; } }); } diff --git a/datacenterlight/templates/datacenterlight/includes/_footer.html b/datacenterlight/templates/datacenterlight/includes/_footer.html index f77c3385..76c2c16e 100644 --- a/datacenterlight/templates/datacenterlight/includes/_footer.html +++ b/datacenterlight/templates/datacenterlight/includes/_footer.html @@ -2,52 +2,37 @@ {% get_current_language as LANGUAGE_CODE %} diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index 9df9e227..ee791648 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,99 +1,47 @@ -{% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} {% load custom_tags %} +{% load staticfiles i18n%} {% load custom_tags %} {% get_current_language as LANGUAGE_CODE %} diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 3f89055c..cde420dd 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -16,10 +16,10 @@
diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index 7a882236..b55953bf 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -2,6 +2,11 @@ {% load staticfiles bootstrap3 %} {% load i18n %} {% load custom_tags %} + +{% block navbar %} + {% include "datacenterlight/includes/_navbar.html" %} +{% endblock navbar %} + {% block content %}
@@ -72,13 +77,15 @@

- {% csrf_token %} -
-

{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.

-
-
- -
+ {% csrf_token %} +
+
+

{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.

+
+ +
diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 25c2b87f..b6a644e4 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -554,7 +554,7 @@ class OrderConfirmationView(DetailView): stripe_subscription_obj = subscription_result.get('response_object') # Check if the subscription was approved and is active if stripe_subscription_obj is None or \ - stripe_subscription_obj.status != 'active': + stripe_subscription_obj.status != 'active': msg = subscription_result.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 87bf0493..35687e29 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-31 15:51+0530\n" +"POT-Creation-Date: 2017-08-31 23:46+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -278,9 +278,6 @@ msgstr "" msgid "See Invoice" msgstr "Rechnung" -msgid "View Detail" -msgstr "Details anzeigen" - msgid "Page" msgstr "" @@ -357,10 +354,10 @@ msgid "Type" msgstr "Kartentyp" msgid "REMOVE CARD" -msgstr "" +msgstr "KARTE ENTFERNEN" msgid "EDIT CARD" -msgstr "" +msgstr "BEARBEITEN" msgid "Add a new Card." msgstr "Neue Kreditkarte hinzufügen." @@ -397,9 +394,6 @@ msgstr "" "Du kannst deinen privaten SSH Schlüssel nur einmal herunterladen. Beware ihn " "sicher auf." -msgid "Your SSH Keys" -msgstr "Deine SSH Keys" - msgid "" "To generate a new key pair or to upload your existing key, click 'Add Key'" msgstr "" @@ -496,6 +490,9 @@ msgstr "Um eine neue VM zu erzeugen, klicke \"Neue VM erzeugen\"" msgid "CREATE VM" msgstr "NEUE VM" +msgid "View Detail" +msgstr "Details anzeigen" + msgid "login" msgstr "Einloggen" @@ -534,6 +531,9 @@ msgid "" "contact Data Center Light Support." msgstr "Kontaktiere den Data Center Light Support." +#~ msgid "Your SSH Keys" +#~ msgstr "Deine SSH Keys" + #~ msgid "Approved" #~ msgstr "Akzeptiert" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 98a75d71..b171764d 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -1,3 +1,9 @@ +@media (min-width: 768px) { + .navbar-right { + margin-right: 10px; + } +} + .dashboard-container { padding-top:70px; padding-bottom: 70px; diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index dfa39710..01cf1e0c 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -39,11 +39,28 @@ h6 { .topnav { font-size: 14px; } +.topnav .navbar-fixed-top .navbar-collapse { + max-height: 740px; +} +.navbar-brand { + padding: 10px 15px; +} + +.navbar-default { + background: #fff; + box-shadow: 0 3px 3px -2px hsla(0,0%,78%,.72); +} + +.navbar-default .navbar-header { + position: relative; + z-index: 1; +} .navbar-transparent { background: transparent; border: none; padding: 20px; + box-shadow: none; } .navbar-transparent.topnav { @@ -71,6 +88,42 @@ h6 { /* color: #fff; */ } +.navbar-right .highlights-dropdown .dropdown-menu { + left: 0 !important; + min-width: 155px; + margin-left: 15px; + padding: 5px !important; +} +@media(min-width: 768px) { + .navbar-right .highlights-dropdown .dropdown-menu { + border: 1px solid #fff; + } + .navbar-right .highlights-dropdown .dropdown-menu:before { + content: ''; + display: block; + height: 1px; + background: #e7e7e7; + position: absolute; + top: -1px; + left: -1px; + right: -1px; + } +} +.navbar-right .highlights-dropdown .dropdown-menu > li > a{ + font-size: 13px; + font-weight: 300; + font-family: 'Lato', sans-serif; + padding: 1px 10px !important; + background: transparent; + color: #333; +} +.navbar-right .highlights-dropdown .dropdown-menu > li > a:hover, +.navbar-right .highlights-dropdown .dropdown-menu > li > a:focus, +.navbar-right .highlights-dropdown .dropdown-menu > li > a:active { + background: transparent; + text-decoration: underline !important; +} + .lead { font-size: 18px; font-weight: 400; @@ -536,6 +589,7 @@ a.unlink:hover { .dcl-place-order-text{ font-size: 13px; color: #808080; + margin-bottom: 15px; } .dcl-order-table-total .tbl-total { @@ -761,6 +815,30 @@ a.unlink:hover { color: #ddd; } +.visible-mobile { + display: none !important; +} + +@media(max-width:767px) { + .visible-mobile { + display: block !important; + } + .visible-desktop { + display: none !important; + } +} + +.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover, +.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover { + background-color: transparent; +} + +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu>.active>a, .navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus, .navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover { + background-color: transparent; + } +} + /* bootstrap danger color override from #a94442 */ .text-danger, .has-error .help-block, diff --git a/hosting/static/hosting/css/user_keys.css b/hosting/static/hosting/css/user_keys.css index 7935344f..4b788da6 100644 --- a/hosting/static/hosting/css/user_keys.css +++ b/hosting/static/hosting/css/user_keys.css @@ -163,8 +163,8 @@ /* margin-left: 0; */ } .col-md-12, .col-sm-12{ - padding-left: 5px; - padding-right: 5px; + /*padding-left: 5px;*/ + /*padding-right: 5px;*/ } } @media (max-width: 360px){ @@ -172,8 +172,8 @@ /* width: 100% !important; */ } .container { - padding-right: 5px; - padding-left: 5px; + /*padding-right: 5px; + padding-left: 5px;*/ } } .dashboard-choice-container { diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index 400de367..b7d96601 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -1,5 +1,59 @@ -$( document ).ready(function() { +// also declared in datacenterlight/js/main.js +function _initNavUrl() { + // $('.url').click(function(event) { + // event.preventDefault(); + // var href = $(this).attr('href'); + // $('.navbar-collapse').removeClass('in'); + // $('.navbar-collapse').addClass('collapsing'); + // if ($(href).length) { + // $('html, body').animate({ + // scrollTop: $(href).offset().top + // }, 1000); + // } else { + // window.location.href = '/datacenterlight' + href; + // } + // }); + $('.url-init').each(function(idx, el) { + var $this = $(el); + var currentPath = window.location.pathname; + var thisPaths = $this.attr('href').split('#') + if ($this.hasClass('dropdown-toggle') && window.matchMedia("(max-width: 767px)").matches) { + $this.removeClass('url-init'); + $this.attr('href', ''); + } else if ($('#'+thisPaths[1]).length) { + $this.removeClass('url-init').addClass('url'); + $this.attr('href', '#' + thisPaths[1]); + } else { + $this.removeClass('url-init'); + } + }); + $('.url').click(function(event) { + event.preventDefault(); + var href = $(this).attr('href'); + $('.navbar-collapse').removeClass('in'); + $('.navbar-collapse').addClass('collapsing'); + if ($(href).length) { + $('html, body').animate({ + scrollTop: $(href).offset().top + }, 1000); + } + }); +} +/* --------------------------------------------- + Nav panel classic + --------------------------------------------- */ +if (window.matchMedia("(min-width: 767px)").matches) { + $('ul.nav li.dropdown').hover(function() { + $(this).find('.dropdown-menu').stop(true, true).fadeIn(500); + }, function() { + $(this).find('.dropdown-menu').stop(true, true).fadeOut(500); + }); +} else { + /* the viewport is less than 400 pixels wide */ +} + +$( document ).ready(function() { $('[data-toggle="tooltip"]').tooltip(); @@ -13,6 +67,8 @@ $( document ).ready(function() { }, 1000); }); + _initNavUrl(); + /* * Replace all SVG images with inline SVG */ diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 18d8bc30..f02f4e0c 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -60,12 +60,14 @@
{% if request.user.is_authenticated %} diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index ea4ded94..5515a0ab 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -40,7 +40,7 @@ {% endif %} - {% trans "View Detail" %} + {% trans 'See Invoice' %} {% endfor %} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 5d4c66e3..75b58e47 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -5,6 +5,10 @@ {% endblock css_extra %} +{% block navbar %} + {% include "datacenterlight/includes/_navbar.html" %} +{% endblock navbar %} + {% block content %}
@@ -211,7 +215,6 @@ window.hasCreditcard = true; })(); - {%endif%} {%endblock%} diff --git a/hosting/templates/hosting/user_keys.html b/hosting/templates/hosting/user_keys.html index fd93b66f..31332929 100644 --- a/hosting/templates/hosting/user_keys.html +++ b/hosting/templates/hosting/user_keys.html @@ -3,7 +3,7 @@ {% block content %}
-

 {% trans "Your SSH Keys" %}

+

 {% trans "My SSH Keys" %}

{% if messages %}
{% for message in messages %}