From 6bb7f2f187fe3821fc96cf9641402f5bd8097a77 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 31 Jan 2018 04:22:34 +0530 Subject: [PATCH] create vm error fix, more css optimizations --- .../static/datacenterlight/css/hosting.css | 14 +- .../datacenterlight/css/landing-page.css | 180 ++++++++---------- .../datacenterlight/base_hosting.html | 2 + .../datacenterlight/includes/_navbar.html | 121 ++++++------ .../management/commands/optimize_frontend.py | 4 +- 5 files changed, 141 insertions(+), 180 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/hosting.css b/datacenterlight/static/datacenterlight/css/hosting.css index 6065c12e..b5622bff 100644 --- a/datacenterlight/static/datacenterlight/css/hosting.css +++ b/datacenterlight/static/datacenterlight/css/hosting.css @@ -423,7 +423,8 @@ order: 2; } .dcl-payment-section { - padding: 15px 10px; + padding-top: 15px; + padding-bottom: 15px; margin-bottom: 0; border-bottom-width: 5px; } @@ -444,13 +445,6 @@ } } -@media (max-width: 767px) { - .order-confirm-btn { - text-align: center; - margin-top: 10px; - } -} - #virtual_machine_create_form { padding: 15px 0; } @@ -548,10 +542,6 @@ font-size: 11px; } -#virtual_machine_create_form { - padding: 15px 0; -} - .dashboard-title-thin { font-weight: 300; font-size: 32px; diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index c4994b62..3af86333 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -76,21 +76,30 @@ textarea { transition: all .3s ease-in; } -.navbar-transparent { +.navbar-default .navbar-nav>.open>a, +.navbar-default .navbar-nav>.open>a:focus, +.navbar-default .navbar-nav>.open>a:hover { background: transparent; - border: none; - padding: 20px; } -#logoWhite, -.navbar-transparent #logoBlack { - display: none; +.navbar-default .navbar-nav>.active>a, +.navbar-default .navbar-nav>.active>a:focus, +.navbar-default .navbar-nav>.active>a:hover { + background: #2D457A; + color: #fff; + border-radius: 6px; } -#logoBlack -.navbar-transparent #logoWhite { - display: block; - width: 220px; +@media (max-width: 767px) { + .navbar-default .navbar-nav>li>a{ + font-weight: 400; + } +} + +.navbar-transparent .navbar-nav>.open>a, +.navbar-transparent .navbar-nav>.open>a:focus, +.navbar-transparent .navbar-nav>.open>a:hover { + color: #fff; } .navbar-transparent .navbar-nav>li>a { @@ -103,12 +112,6 @@ textarea { background-color: transparent; } -@media (max-width: 767px) { - .navbar-default .navbar-nav>li>a{ - font-weight: 400; - } -} - .navbar-transparent .navbar-nav>li>.on-hover-border { transition: all 0.3s linear; box-shadow: none; @@ -119,6 +122,27 @@ textarea { border-radius: 5px; } +.navbar-transparent { + background: transparent; + border: none; + padding: 20px; +} + +.navbar-transparent .nav-language .select-language { + color: #fff; +} + +#logoWhite, +.navbar-transparent #logoBlack { + display: none; +} + +#logoBlack, +.navbar-transparent #logoWhite { + display: block; + width: 220px; +} + .nav-language { position: relative; } @@ -128,10 +152,6 @@ textarea { color: #777; } -.navbar-transparent .nav-language .select-language { - color: #fff; -} - .nav-language .select-language span { margin-left: 5px; margin-right: 5px; @@ -153,16 +173,44 @@ textarea { border-radius: 4px; } -.nav-language .open .drop-language { - width: 100px; - min-width: 100px; -} - .nav-language .drop-language a { cursor: pointer; padding: 5px 10px !important; } +.nav-language .open .drop-language { + width: 100px; + min-width: 100px; +} + +.dropdown-menu { + border: 1px solid #fff; + -webkit-box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); + -moz-box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); + box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); + border-radius: 4px !important; + left: 0 !important; + min-width: 155px; + padding: 5px; + margin-left: 15px; +} + +.dropdown-menu>li>a:focus, +.dropdown-menu>li>a:hover { + background: transparent; + text-decoration: underline !important; +} + +@media (min-width: 768px) { + .dropdown-menu>li>a { + font-weight: 300; + } +} + +.highlights-dropdown .dropdown-menu>li>a { + font-size: 13px; + padding: 1px 10px; +} /* Show the dropdown menu on hover */ @@ -731,23 +779,6 @@ tech-sub-sec h2 { padding: 30px 2px; } -.dropdown-menu { - border: 1px solid #fff; - -webkit-box-shadow: -8px 13px 31px -8px rgba(77, 77, 77, 1); - -moz-box-shadow: -8px 13px 31px -8px rgba(77, 77, 77, 1); - box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); - display: none; - text-align: center; - border-radius: 4px !important; - padding: 5px !important; -} - -.dropdown-menu>li>a:focus, -.dropdown-menu>li>a:hover { - background: transparent; - text-decoration: underline !important; -} - .logo-wrap .logo-caption { padding-top: 20px; display: inline-block; @@ -758,49 +789,6 @@ tech-sub-sec h2 { padding-top: 50px; } -.dropdown-menu>li>a { - padding: 1px 10px !important; -} - -.dropdown-menu { - left: 0 !important; - min-width: 155px; - text-align: left; - margin-left: 15px; -} - -.navbar-default .navbar-nav>.open>a, -.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; -} - -.dropdown-menu>li>a { - font-size: 13px; -} - -@media (min-width: 768px) { - .dropdown-menu>li>a { - font-weight: 300; - } -} - -.navbar-default .navbar-nav>.active>a, -.navbar-default .navbar-nav>.active>a:focus, -.navbar-default .navbar-nav>.active>a:hover { - background: #2D457A; - color: #fff; - border-radius: 6px; -} - - - /*Pricing page*/ @@ -1014,13 +1002,8 @@ tech-sub-sec h2 { } } -@media screen and (min-device-width: 480px) and (max-device-width: 767px) { - .logo-wrap { - width: 50%; - padding: 15px 30px !important; - min-height: 179px; - } - .logo-wrap-1 { +@media screen and (min-width: 480px) and (max-width: 767px) { + .logo-wrap, .logo-wrap-1 { width: 50%; padding: 15px 30px !important; min-height: 179px; @@ -1032,16 +1015,13 @@ tech-sub-sec h2 { text-align: center; margin-bottom: 40px; } - .navbar-transparent .navbar-nav>li>a { - font-size: 14px; - } .pricing-section .text .section-heading::before { left: 50%; transform: translate(-50%, 0); } } -@media(max-width:768px) { +@media(max-width:767px) { .single-heading h2 { font-size: 50px; } @@ -1087,10 +1067,6 @@ tech-sub-sec h2 { .navbar-transparent #logoWhite { display: none; } - .navbar-transparent .navbar-nav>li>a { - font-size: 14px; - color: #777; - } .navbar-transparent .nav-language .select-language { color: #777; } @@ -1144,10 +1120,6 @@ tech-sub-sec h2 { font-size: 35px; line-height: 35px; } - .pricing-section .text .section-heading::before { - left: 50%; - transform: translate(-50%, 0); - } .contact-section .title { width: 300px; margin: 0 auto; diff --git a/datacenterlight/templates/datacenterlight/base_hosting.html b/datacenterlight/templates/datacenterlight/base_hosting.html index 6ac9e810..01ddc9c1 100644 --- a/datacenterlight/templates/datacenterlight/base_hosting.html +++ b/datacenterlight/templates/datacenterlight/base_hosting.html @@ -78,6 +78,8 @@ + + diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index a7378e7e..03690252 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -2,70 +2,69 @@ {% get_current_language as LANGUAGE_CODE %} diff --git a/utils/management/commands/optimize_frontend.py b/utils/management/commands/optimize_frontend.py index 51e460c3..ebbe1d0c 100644 --- a/utils/management/commands/optimize_frontend.py +++ b/utils/management/commands/optimize_frontend.py @@ -74,7 +74,6 @@ class Command(BaseCommand): print(file, selector[0], count[selector[0]]) else: count[selector[0]] = 1 - # print(count) def get_files(self, app_name): # the view file for the app @@ -145,9 +144,8 @@ class Command(BaseCommand): ) with open(output_file, 'w', newline='') as f: w = csv.writer(f) - # print(zip_longest(*results)) + print(zip_longest(*results)) for r in zip_longest(*results): - # print(r) w.writerow(r)