Merge pull request #269 from HenryGBC/develop

Develop
This commit is contained in:
Levi Velázquez 2017-05-23 12:17:04 -05:00 committed by GitHub
commit 08e3ac6bce
7 changed files with 443 additions and 9 deletions

View file

@ -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) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

View file

@ -5,7 +5,23 @@
/* ---------------------------------------------
Scripts initialization
--------------------------------------------- */
var cardPricing ={
'cpu': {
'id': 'coreValue',
'value': 1,
'limit': 48
},
'ram': {
'id': 'ramValue',
'value': 1,
'limit': 200
},
'storage': {
'id': 'storageValue',
'value': 1,
'limit': 500
}
}
$(window).load(function(){
@ -16,6 +32,7 @@
_navScroll();
_initScroll();
_initNavUrl();
_initPricing();
});
@ -41,7 +58,6 @@
function _navScroll(){
if($(window).scrollTop() > 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');
}

View file

@ -43,7 +43,7 @@
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container topnav">
<div class="topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
@ -113,7 +113,7 @@
<a href="#how" class="btn btn-default btn-lg btn-transparent"><i class="#Services"></i> <span class="network-name">{% trans "What is it?" %}</span></a>
</li>
<li>
<a href="#requestform" class="btn btn-primary btn-lg page-scroll"><span class="network-name">{% trans "I want it!" %}</span></a>
<a class="btn btn-primary btn-lg page-scroll url" href="javascript:void(0)" data-url="#request" ><span class="network-name">{% trans "I want it!" %}</span></a>
</li>
</ul>
</div>
@ -243,7 +243,7 @@
<p>{% trans "15 GiB storage(SSD)" %}</p>
</div>
</div>
<a href="{% url 'hosting:payment' %}" class="btn btn-primary">{% trans "Order Now!" %}</a>
<a href="{% url 'datacenterlight:pricing' %}" class="btn btn-primary">{% trans "Order Now!" %}</a>
</div>
</div>
</div>
@ -252,7 +252,7 @@
</div>
<!-- Configure -->
<div class="request-section" >
<div class="request-section" id="request">
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-6">

View file

@ -0,0 +1,234 @@
{% load staticfiles i18n%}
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>datacenterlight.ch - Featherlight Swiss VM</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'datacenterlight/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<!--Import Google Icon Font-->
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="{% static 'datacenterlight/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'datacenterlight/img/favicon.ico' %}" type="image/x-icon" />
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'datacenterlight/css/landing-page.css' %}" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a id="logoBlack" class="navbar-brand topnav url" href="{% url 'datacenterlight:index' %}" ><img src="{% static 'datacenterlight/img/logo_black.svg' %}"></a>
<a id="logoWhite" class="navbar-brand topnav url" href="{% url 'datacenterlight:index' %}" ><img src="{% static 'datacenterlight/img/logo_white.svg' %}"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- <li>
<a class="url" href="javascript:void(0)" data-url="#how" >{% trans "What is it" %}</a>
</li>
<li>
<a class="url" href="javascript:void(0)" data-url="#your" >{% trans "Scale out" %}</a>
</li>
<li>
<a class="url" href="javascript:void(0)" data-url="#our">{% trans "Reliable and light" %}</a>
</li>
<li>
<a class="url" href="javascript:void(0)" data-url="#price" >{% trans "Buy VM" %}</a>
</li>
<li>
<a class="url" href="javascript:void(0)" data-url="#contact" >{% trans "Contact" %}</a>
</li> -->
<select class="selectpicker" data-width="fit" onchange="location = this.value;" style="margin-top:10px;">
{% if LANGUAGE_CODE == 'en-us'%}
<option selected="selected" value="{{base_url}}/en-us/datacenterlight/">English</option>
{% else %}
<option value="{{base_url}}/en-us/datacenterlight/">English</option>
{% endif %}
{% if LANGUAGE_CODE == 'de'%}
<option selected="selected" value="{{base_url}}/de/datacenterlight/">Deutsch</option>
{% else %}
<option value="{{base_url}}/de/datacenterlight/">Deutsch</option>
{% endif %}
</select>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="intro-pricing">
<div class="intro-message">
<h2 class="section-heading">{% trans "We are cutting down the costs significantly!" %}</h2>
</div>
</div>
<div class="price-calc-section">
<div class="card">
<div class="caption">
<form action="POST">
<div class="title">
<h3>{% trans "VM hosting" %} </h3>
</div>
<div class="price">
<span id="total">15</span>
<span>CHF</span>
</div>
<div class="descriptions">
<div class="description">
<p>{% trans "Based in Switzerland" %}</p>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="cpu" aria-hidden="true"></i>
<span id="coreValue">1</span><span> core</span>
<i class="fa fa-plus-circle right" data-plus="cpu" aria-hidden="true"></i>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="ram" aria-hidden="true"></i>
<span id="ramValue">2</span><span> GiB RAM</span>
<i class="fa fa-plus-circle right" data-plus="ram" aria-hidden="true"></i>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="storage" aria-hidden="true"></i>
<span id="storageValue">15</span><span>{% trans "GiB storage(SSD)" %}</span>
<i class="fa fa-plus-circle right" data-plus="storage" aria-hidden="true"></i>
</div>
<div class="description select-configuration">
<select name="config" id="">
<option value="" disabled selected>Configuration</option>
<option value="CentOS 7">CentOS 7</option>
<option value="Debian 8">Debian 8</option>
<option value="Ubuntu 14.04">Ubuntu 14.04</option>
<option value="Ubuntu 16.04">Ubuntu 16.04</option>
</select>
</div>
<input type="hidden" name="cpu">
<input type="hidden" name="ram">
<input type="hidden" name="storage">
<input type="hidden" name="total">
<div class="description check-ip">
<input type="checkbox" name="ipv6"> Ipv6 Only<br>
</div>
</div>
<input type="submit" class="btn btn-primary" value="{% trans 'Buy Now!' %}"></input>
</form>
</div>
</div>
<div class="text">
<h2 class="section-heading">{% trans "Simple and affordable: Try our virtual machine with featherlight price." %}</h2>
<div class="description">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab laudantium quis quam nostrum ipsum est nisi asperiores provident recusandae aliquid, reiciendis vitae quisquam error, porro fuga obcaecati maiores dolores repudiandae?</p>
</div>
</div>
</div>
<!-- /.banner -->
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12">
<ul class="list-inline">
<li>
<a href="#">{% trans "Home" %}</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#about">{% trans "How it works" %}</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#about">{% trans "Scale out" %}</a></li>
<li>&sdot;</li>
<li>
<a href="#about">{% trans "Reliable and light" %}</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#services">{% trans "Pricing" %}</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#contact">{% trans "Contact" %}</a>
</li>
</ul>
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. All Rights Reserved</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="{% static 'datacenterlight/js/jquery.js' %}"></script>
<script type="text/javascript">
window.onload=function(){
$('.selectpicker').selectpicker({
style: 'btn-link',
windowPadding: 10,
});
var hash = window.location.hash.substr(1);
console.log(hash);
if (hash == 'requestform'){
$('#reques-success-message').modal('show');
}
};
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'datacenterlight/js/bootstrap.min.js' %}"></script>
<script src="{% static 'datacenterlight/js/main.js' %}"></script>
</body>
</html>

View file

@ -1,12 +1,12 @@
from django.conf.urls import url
from .views import IndexView, BetaProgramView, LandingProgramView, \
BetaAccessView
from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView
urlpatterns = [
url(r'^/?$', IndexView.as_view(), name='index'),
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'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'),
]

View file

@ -13,6 +13,9 @@ from opennebula_api.serializers import VirtualMachineTemplateSerializer
class LandingProgramView(TemplateView):
template_name = "datacenterlight/landing.html"
class PricingView(TemplateView):
template_name = "datacenterlight/pricing.html"
class BetaAccessView(FormView):
template_name = "datacenterlight/beta_access.html"
form_class = BetaAccessForm