diff --git a/datacenterlight/cms_models.py b/datacenterlight/cms_models.py index 8438e515..a4406c04 100644 --- a/datacenterlight/cms_models.py +++ b/datacenterlight/cms_models.py @@ -47,6 +47,8 @@ class DCLSectionPluginModel(CMSPlugin): extra_classes += ' section-sm-center' if self.background_gradient: extra_classes += ' section-gradient' + if self.plain_heading: + extra_classes += ' split-section-plain' return extra_classes def __str__(self): diff --git a/datacenterlight/cms_plugins.py b/datacenterlight/cms_plugins.py index c3f2fb10..70ecfaa2 100644 --- a/datacenterlight/cms_plugins.py +++ b/datacenterlight/cms_plugins.py @@ -8,6 +8,7 @@ from .cms_models import ( DCLSectionIconPluginModel, DCLSectionImagePluginModel, DCLSectionPluginModel, ) +from .models import VMTemplate @plugin_pool.register_plugin @@ -49,6 +50,13 @@ class DCLCalculatorPlugin(CMSPluginBase): render_template = "datacenterlight/cms/calculator.html" cache = False + def render(self, context, instance, placeholder): + context = super(DCLCalculatorPlugin, self).render( + context, instance, placeholder + ) + context['templates'] = VMTemplate.objects.all() + return context + @plugin_pool.register_plugin class DCLBannerListPlugin(CMSPluginBase): diff --git a/datacenterlight/static/datacenterlight/css/cms.css b/datacenterlight/static/datacenterlight/css/cms.css index 87479a1e..d36a7876 100644 --- a/datacenterlight/static/datacenterlight/css/cms.css +++ b/datacenterlight/static/datacenterlight/css/cms.css @@ -52,7 +52,10 @@ /* only for editing mode */ .section-figure .cms-plugin { - padding: 10px; flex-basis: 50%; flex-grow: 1; +} + +.split-section-plain .section-figure .cms-plugin { + flex-grow: 0; } \ No newline at end of file diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 66ca4806..90d959a3 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -436,11 +436,29 @@ textarea { } .section-figure .section-image { - padding: 10px; + padding: 25px 15px; flex-basis: 50%; flex-grow: 1; } +.split-section-plain .section-figure .section-image { + flex-grow: 0; +} + +.split-section-plain .section-figure { + justify-content: flex-start; +} + +@media (min-width: 768px) { + .split-section-plain .split-figure { + width: 41.66666667%; + } + + .split-section-plain .split-text { + width: 58.33333333%; + } +} + .section-image img { margin: auto; } @@ -1236,12 +1254,12 @@ footer .dcl-link-separator::before { content: ""; position: absolute; display: inline-block; - top: 8px; + top: 9px; bottom: 0; - left: -3px; + left: -2px; right: 0; - width: 4px; - height: 4px; + width: 2px; + height: 2px; border-radius: 100%; background: #777; } diff --git a/datacenterlight/templates/datacenterlight/cms/section.html b/datacenterlight/templates/datacenterlight/cms/section.html index 7743b5b9..ed399ebc 100644 --- a/datacenterlight/templates/datacenterlight/cms/section.html +++ b/datacenterlight/templates/datacenterlight/cms/section.html @@ -3,24 +3,20 @@