diff --git a/datacenterlight/forms.py b/datacenterlight/forms.py index 8371ebfd..90340e8d 100644 --- a/datacenterlight/forms.py +++ b/datacenterlight/forms.py @@ -7,7 +7,7 @@ class BetaAccessForm(forms.ModelForm): email = forms.CharField(widget=forms.EmailInput()) class Meta: - fields = ['email'] + fields = ['name', 'email'] model = BetaAccess diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 07f03f97..33e563ba 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -84,6 +84,11 @@ h6 { background-color: rgba(90, 116, 175, 0.8); border-color: #5A74AF; } +.btn-info:focus { + color: #fff; + background-color: rgba(90, 116, 175, 0.8); + border-color: #5A74AF; +} .btn-lg{ min-width: 180px; } @@ -131,6 +136,9 @@ h6 { padding: 10px 15px; cursor: pointer; } +.navbar-right { + margin-right: 0px; +} .intro-header { height: 100vh; text-align: center; @@ -217,6 +225,33 @@ h6 { font-weight: 300; font-family: 'Montserrat-Light'; } + +.intro-pricing{ + text-align: center; + color: #fff; + background: url(../img/pattern.jpg) no-repeat center center; + background-size: cover; + height: 70vh; + max-height: 400px; + display: flex; + justify-content: center; + align-items: center; + position: relative; +} +.intro-pricing::before{ + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: rgba(90, 116, 175, 0.7); +} +.intro-pricing .intro-message .section-heading{ + font-size: 45px; + width: 80%; + margin: 0 auto; +} .split-section { padding: 70px 0; } @@ -472,6 +507,115 @@ h6 { right: 0; } +/*Pricing page*/ + +.price-calc-section{ + padding: 80px 40px !important; + background: -webkit-linear-gradient(top, #f0f4f7, #fff) no-repeat; + background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; + display: flex; +} +.price-calc-section .text{ + width: 50%; +} +.price-calc-section .text .section-heading{ + font-family: 'Montserrat-Bold'; + font-size: 50px; + line-height: 50px; + padding-bottom: 25px; + color: #3a3a3a; + letter-spacing: 1px; + position: relative; + text-align: right; +} +.price-calc-section .text .description{ + font-size: 20px; + text-align: right; +} +.price-calc-section .text .section-heading::before{ + content: ""; + position: absolute; + bottom: 0; + background: #29427A; + height: 7px; + width: 70px; + right: 0; +} +.price-calc-section .card{ + width: 50%; + 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; + text-align: center; + /* margin-right: auto; */ + max-width: 400px; +} +.price-calc-section .card .title{ + padding: 15px 40px; + font-family: 'Montserrat-Medium'; +} +.price-calc-section .card .title h3{ + font-family: 'Montserrat-Medium'; +} +.price-calc-section .card .price{ + background: #5A74AF; + padding: 22px; + color: #fff; + font-size: 32px; +} +.price-calc-section .card .description{ + padding: 12px; + border-bottom: 1px solid rgba(128, 128, 128, 0.3); + position: relative; + display: flex; + justify-content: center; + align-items: center; +} +.price-calc-section .card .description span{ + font-size: 20px; + margin-left: 4px; +} +.price-calc-section .card .description i{ + color: #29427A; + cursor: pointer; + font-size: 24px; +} +.price-calc-section .card .description .left{ + margin-right: 7px; +} +.price-calc-section .card .description .right{ + margin-left: 7px; +} +.price-calc-section .card .descriptions{ + padding: 10px 30px; +} +.price-calc-section .card .description p{ + margin: 0; +} +.price-calc-section .card .btn{ + margin-top: 20px; + font-size: 20px; + width: 200px; +} +.price-calc-section .card .select-configuration select{ + outline: none; + background: #fff; + border-color: #d0d0d0; + height: 40px; + width: 200px; + text-align: center; + font-size: 18px; +} +.price-calc-section .card .check-ip{ + font-size: 18px; +} + +.price-calc-section .card .check-ip input[type=checkbox]{ + font-size: 17px; + margin: 0 8px; +} @media(max-width:990px) { .pricing-section .text { @@ -481,6 +625,10 @@ h6 { .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) { @@ -562,7 +710,7 @@ h6 { left: 50%; transform: translate(-50%, 0); } - + } @media(max-width:540px) { @@ -672,4 +820,4 @@ a#forgotpassword { } .form-300{ width: 300px; -} \ No newline at end of file +} diff --git a/datacenterlight/static/datacenterlight/img/pattern.jpg b/datacenterlight/static/datacenterlight/img/pattern.jpg new file mode 100755 index 00000000..8ae4c0f2 Binary files /dev/null and b/datacenterlight/static/datacenterlight/img/pattern.jpg differ diff --git a/datacenterlight/static/datacenterlight/js/form.js b/datacenterlight/static/datacenterlight/js/form.js new file mode 100644 index 00000000..0e91b172 --- /dev/null +++ b/datacenterlight/static/datacenterlight/js/form.js @@ -0,0 +1,12 @@ +/*! + * jQuery Form Plugin + * version: 4.2.1 + * Requires jQuery v1.7 or later + * Copyright 2017 Kevin Morris + * Copyright 2006 M. Alsup + * Project repository: https://github.com/jquery-form/form + * Dual licensed under the MIT and LGPLv3 licenses. + * https://github.com/jquery-form/form#license + */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";function b(b){var c=b.data;b.isDefaultPrevented()||(b.preventDefault(),a(b.target).closest("form").ajaxSubmit(c))}function c(b){var c=b.target,d=a(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=c.form;if(f.clk=c,"image"===c.type)if(void 0!==b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function d(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}var e={};e.fileapi=void 0!==a('').get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b,c,g,h){function i(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;d',z).val(k.extraData[j].value).appendTo(x)[0]):i.push(a('',z).val(k.extraData[j]).appendTo(x)[0]));k.iframeTarget||p.appendTo(A),q.attachEvent?q.attachEvent("onload",h):q.addEventListener("load",h,!1),setTimeout(b,15);try{x.submit()}catch(a){var m=document.createElement("form").submit;m.apply(x)}}finally{x.setAttribute("action",f),x.setAttribute("enctype",g),c?x.setAttribute("target",c):o.removeAttr("target"),a(i).remove()}}function h(b){if(!r.aborted&&!F){if(E=e(q),E||(d("cannot access response document"),b=2),1===b&&r)return r.abort("timeout"),void y.reject(r,"timeout");if(2===b&&r)return r.abort("server abort"),void y.reject(r,"error","server abort");if(E&&E.location.href!==k.iframeSrc||v){q.detachEvent?q.detachEvent("onload",h):q.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"===k.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var i=E.body?E.body:E.documentElement;r.responseText=i?i.innerHTML:null,r.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(k.dataType="xml"),r.getResponseHeader=function(a){return{"content-type":k.dataType}[a.toLowerCase()]},i&&(r.status=Number(i.getAttribute("status"))||r.status,r.statusText=i.getAttribute("statusText")||r.statusText);var j=(k.dataType||"").toLowerCase(),l=/(json|script|text)/.test(j);if(l||k.textarea){var n=E.getElementsByTagName("textarea")[0];if(n)r.responseText=n.value,r.status=Number(n.getAttribute("status"))||r.status,r.statusText=n.getAttribute("statusText")||r.statusText;else if(l){var o=E.getElementsByTagName("pre")[0],s=E.getElementsByTagName("body")[0];o?r.responseText=o.textContent?o.textContent:o.innerText:s&&(r.responseText=s.textContent?s.textContent:s.innerText)}}else"xml"===j&&!r.responseXML&&r.responseText&&(r.responseXML=H(r.responseText));try{D=J(r,j,k)}catch(a){f="parsererror",r.error=c=a||f}}catch(a){d("error caught: ",a),f="error",r.error=c=a||f}r.aborted&&(d("upload aborted"),f=null),r.status&&(f=r.status>=200&&r.status<300||304===r.status?"success":"error"),"success"===f?(k.success&&k.success.call(k.context,D,"success",r),y.resolve(r.responseText,"success",r),m&&a.event.trigger("ajaxSuccess",[r,k])):f&&(void 0===c&&(c=r.statusText),k.error&&k.error.call(k.context,r,f,c),y.reject(r,"error",c),m&&a.event.trigger("ajaxError",[r,k,c])),m&&a.event.trigger("ajaxComplete",[r,k]),m&&!--a.active&&a.event.trigger("ajaxStop"),k.complete&&k.complete.call(k.context,r,f),F=!0,k.timeout&&clearTimeout(w),setTimeout(function(){k.iframeTarget?p.attr("src",k.iframeSrc):p.remove(),r.responseXML=null},100)}}}var i,j,k,m,n,p,q,r,t,u,v,w,x=o[0],y=a.Deferred();if(y.abort=function(a){r.abort(a)},c)for(j=0;j',z),p.css({position:"absolute",top:"-1000px",left:"-1000px"})),q=p[0],r={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{q.contentWindow.document.execCommand&&q.contentWindow.document.execCommand("Stop")}catch(a){}p.attr("src",k.iframeSrc),r.error=c,k.error&&k.error.call(k.context,r,c,b),m&&a.event.trigger("ajaxError",[r,k,c]),k.complete&&k.complete.call(k.context,r,c)}},m=k.global,m&&0==a.active++&&a.event.trigger("ajaxStart"),m&&a.event.trigger("ajaxSend",[r,k]),k.beforeSend&&k.beforeSend.call(k.context,r,k)===!1)return k.global&&a.active--,y.reject(),y;if(r.aborted)return y.reject(),y;(t=x.clk)&&(u=t.name)&&!t.disabled&&(k.extraData=k.extraData||{},k.extraData[u]=t.value,"image"===t.type&&(k.extraData[u+".x"]=x.clk_x,k.extraData[u+".y"]=x.clk_y));var B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(k.extraData=k.extraData||{},k.extraData[C]=B),k.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!==b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=("xml"===c||!c)&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&(("json"===c||!c)&&e.indexOf("json")>=0?g=I(g):("script"===c||!c)&&e.indexOf("javascript")>=0&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var l,m,n,o=this;"function"==typeof b?b={success:b}:"string"==typeof b||b===!1&&arguments.length>0?(b={url:b,data:c,dataType:g},"function"==typeof h&&(b.success=h)):void 0===b&&(b={}),l=b.method||b.type||this.attr2("method"),m=b.url||this.attr2("action"),n="string"==typeof m?a.trim(m):"",n=n||window.location.href||"",n&&(n=(n.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:n,success:a.ajaxSettings.success,type:l||a.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var p={};if(this.trigger("form-pre-serialize",[this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var q=b.traditional;void 0===q&&(q=a.ajaxSettings.traditional);var r,s=[],t=this.formToArray(b.semantic,s,b.filtering);if(b.data){var u=a.isFunction(b.data)?b.data(t):b.data;b.extraData=u,r=a.param(u,q)}if(b.beforeSubmit&&b.beforeSubmit(t,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[t,this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=a.param(t,q);r&&(v=v?v+"&"+r:r),"GET"===b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+v,b.data=null):b.data=v;var w=[];if(b.resetForm&&w.push(function(){o.resetForm()}),b.clearForm&&w.push(function(){o.clearForm(b.includeHidden)}),!b.dataType&&b.target){var x=b.success||function(){};w.push(function(c,d,e){var f=arguments,g=b.replaceTarget?"replaceWith":"html";a(b.target)[g](c).each(function(){x.apply(this,f)})})}else b.success&&(a.isArray(b.success)?a.merge(w,b.success):w.push(b.success));if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=w.length;f0,C="multipart/form-data",D=o.attr("enctype")===C||o.attr("encoding")===C,E=e.fileapi&&e.formdata;d("fileAPI :"+E);var F,G=(B||D)&&!E;b.iframe!==!1&&(b.iframe||G)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){F=k(t)}):F=k(t):F=(B||D)&&E?j(t):a.ajax(b),o.removeData("jqxhr").data("jqxhr",F);for(var H=0;H0)&&(e={url:e,data:f,dataType:g},"function"==typeof h&&(e.success=h)),e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!a.isReady&&i.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(i.s,i.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().on("submit.form-plugin",e,b).on("click.form-plugin",e,c)},a.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c,d){var f=[];if(0===this.length)return f;var g,h=this[0],i=this.attr("id"),j=b||void 0===h.elements?h.getElementsByTagName("*"):h.elements;if(j&&(j=a.makeArray(j)),i&&(b||/(Edge|Trident)\//.test(navigator.userAgent))&&(g=a(':input[form="'+i+'"]').get(),g.length&&(j=(j||[]).concat(g))),!j||!j.length)return f;a.isFunction(d)&&(j=a.map(j,d));var k,l,m,n,o,p,q;for(k=0,p=j.length;k 10 ){ - console.log($(window).scrollTop()); $(".navbar").removeClass("navbar-transparent"); $(".navbar-default .btn-link").css("color", "#777"); }else{ @@ -65,6 +81,39 @@ } } + function _initPricing(){ + _fetchPricing(); + + $('.fa-minus-circle.left').click(function(event){ + var data = $(this).data('minus'); + + if(cardPricing[data].value > 1){ + cardPricing[data].value --; + } + _fetchPricing(); + }); + $('.fa-plus-circle.right').click(function(event){ + var data = $(this).data('plus'); + if(cardPricing[data].value < cardPricing[data].limit){ + cardPricing[data].value ++; + } + _fetchPricing(); + }); + } + function _fetchPricing(){ + Object.keys(cardPricing).map(function(element){ + $('#'+cardPricing[element].id).text(cardPricing[element].value); + $('input[name='+element+']').val(cardPricing[element].value); + }); + _calcPricing(); + } + + function _calcPricing(){ + var total = (cardPricing['cpu'].value * 5) + (2* cardPricing['ram'].value) + (0.6* cardPricing['storage'].value) + + $("#total").text(total); + $('input[name=total]').val(total); + } function form_success(){ $('#sucessModal').modal('show'); } diff --git a/datacenterlight/templates/datacenterlight/beta_access.html b/datacenterlight/templates/datacenterlight/beta_access.html new file mode 100644 index 00000000..b1bdfe21 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/beta_access.html @@ -0,0 +1,27 @@ +{% load i18n %} + +
+ {% csrf_token %} + {{ form.non_field_errors }} +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
+
+
+ + {{ form.name.errors|striptags}} +
+
+ + {{ form.email.errors|striptags}} +
+
+ +
+ diff --git a/datacenterlight/templates/datacenterlight/beta_success.html b/datacenterlight/templates/datacenterlight/beta_success.html new file mode 100644 index 00000000..ffcfcce9 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/beta_success.html @@ -0,0 +1,47 @@ +{% load i18n %} + + + + diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index a642a667..531bd235 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -43,7 +43,7 @@