diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 76cd5c9c..e9875d2f 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/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-12-21 00:20+0000\n" +"POT-Creation-Date: 2017-12-22 01:00+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/ungleich_page/cms_plugins.py b/ungleich_page/cms_plugins.py index 766ccb8c..fb40ea2b 100644 --- a/ungleich_page/cms_plugins.py +++ b/ungleich_page/cms_plugins.py @@ -7,7 +7,8 @@ from .models import ( UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer, UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader, UngleichHeaderWithBackgroundImageSlider, - UngleichHeaderWithBackgroundImageSliderItem + UngleichHeaderWithBackgroundImageSliderItem, + UngleichHeaderWithBackgroundVideoSliderItem, ) @@ -235,13 +236,33 @@ class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase): ) cache = False allow_children = True - child_classes = ['UngleichHeaderBackgroundImageAndTextItemPlugin'] + child_classes = [ + 'UngleichHeaderBackgroundImageAndTextItemPlugin', + 'UngleichHeaderBackgroundVideoItemPlugin', + ] def render(self, context, instance, placeholder): context['instance'] = instance return context +@plugin_pool.register_plugin +class UngleichHeaderBackgroundVideoItemPlugin(CMSPluginBase): + name = "ungleich Header Background Video Item Plugin" + model = UngleichHeaderWithBackgroundVideoSliderItem + render_template = "ungleich_page/ungleich/_header_with_background_video_slider_item.html" + cache = False + require_parent = True + parent_classes = ['UngleichHeaderBackgroundImageAndTextSliderPlugin'] + + def render(self, context, instance, placeholder): + context = super(UngleichHeaderBackgroundVideoItemPlugin, self).render( + context, instance, placeholder + ) + context['instance'] = instance + return context + + @plugin_pool.register_plugin class UngleichHeaderBackgroundImageAndTextItemPlugin(CMSPluginBase): name = "ungleich Header with Background and Image and Text Item Plugin" diff --git a/ungleich_page/locale/de/LC_MESSAGES/django.po b/ungleich_page/locale/de/LC_MESSAGES/django.po index affd285d..029137b1 100644 --- a/ungleich_page/locale/de/LC_MESSAGES/django.po +++ b/ungleich_page/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-11-26 00:34+0530\n" +"POT-Creation-Date: 2017-12-22 01:00+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -157,8 +157,8 @@ msgstr "Copyright © ungleich GmbH" msgid "ungleich Home" msgstr "ungleich Home" -msgid "We Design, Configure & Maintain
Your Linux Infrastructure " -msgstr "Wir designen, erstellen und warten Ihre Linux-Infrastruktur" +msgid "We Design, Configure & Maintain
Your Linux Infrastructure " +msgstr "Wir designen, erstellen und warten
Ihre Linux-Infrastruktur" msgid "Our Products" msgstr "Unsere Produkte" @@ -350,6 +350,9 @@ msgstr "WARUM UNGLEICH?" msgid "BLOG" msgstr "BLOG" +msgid "Learn More" +msgstr "erfahren Sie mehr" + msgid "contact/$" msgstr "kontakt/$" diff --git a/ungleich_page/migrations/0017_auto_20171219_1856.py b/ungleich_page/migrations/0017_auto_20171219_1856.py new file mode 100644 index 00000000..14c137a9 --- /dev/null +++ b/ungleich_page/migrations/0017_auto_20171219_1856.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-12-19 21:19 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import filer.fields.file +import filer.fields.image + + +class Migration(migrations.Migration): + + dependencies = [ + ('ungleich_page', '0016_ungleichheaderwithbackgroundimageslider_ungleichheaderwithbackgroundimageslideritem'), + ] + + operations = [ + migrations.CreateModel( + name='UngleichHeaderWithBackgroundVideoSliderItem', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, + parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), + ('description', models.TextField( + blank=True, help_text='An optional description for this slide.', null=True)), + ('image', filer.fields.image.FilerImageField(blank=True, help_text='The background image or poster image for video.', + null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_header_item_poster', to='filer.Image')), + ('btn_link', models.URLField( + blank=True, help_text='If this field is left empty, no button would be displayed.', null=True)), + ('btn_text', models.CharField( + blank=True, help_text='Text for the button, if a link is provided.', max_length=50, null=True)), + ('heading', models.CharField( + blank=True, help_text='An optional title for this slide.', max_length=100, null=True)), + ('video', filer.fields.file.FilerFileField(blank=True, help_text='Leavig this blank will make the image as the background.', + null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ungleich_header_item_video', to='filer.File')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/ungleich_page/models.py b/ungleich_page/models.py index 5c226ad4..ad44c161 100644 --- a/ungleich_page/models.py +++ b/ungleich_page/models.py @@ -1,7 +1,7 @@ from cms.models.pluginmodel import CMSPlugin from django.db import models from djangocms_text_ckeditor.fields import HTMLField -from filer.fields.image import FilerImageField +from filer.fields.image import FilerImageField, FilerFileField class UngelichPicture(CMSPlugin): @@ -155,6 +155,39 @@ class UngleichHeaderItem(CMSPlugin): description = HTMLField() +class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin): + image = FilerImageField( + null=True, + blank=True, + related_name="ungleich_header_item_poster", + on_delete=models.SET_NULL, + help_text='The background image or poster image for video.' + ) + video = FilerFileField( + null=True, + blank=True, + related_name="ungleich_header_item_video", + on_delete=models.SET_NULL, + help_text='Leaving this blank will make the image as the background.' + ) + heading = models.CharField( + blank=True, null=True, max_length=100, + help_text='An optional title for this slide.', + ) + description = models.TextField( + blank=True, null=True, + help_text='An optional description for this slide.' + ) + btn_link = models.URLField( + blank=True, null=True, + help_text='If this field is left empty, no button would be displayed.' + ) + btn_text = models.CharField( + blank=True, null=True, max_length=50, + help_text='Text for the button, if a link is provided.' + ) + + class UngleichProductItem(ServiceItem): url = models.URLField(max_length=300, default="", blank=True) diff --git a/ungleich_page/static/ungleich_page/css/ungleich.css b/ungleich_page/static/ungleich_page/css/ungleich.css index e2984c07..c52e0425 100644 --- a/ungleich_page/static/ungleich_page/css/ungleich.css +++ b/ungleich_page/static/ungleich_page/css/ungleich.css @@ -1,8 +1,15 @@ +@media (min-width: 768px) and (max-width: 991px) { + .navbar > .container { + width: 100%; + } +} + .btn-trans { color: #fff; border: 2px solid #fff; padding: 4px 18px; letter-spacing: 0.6px; + background: rgba(0,0,0,0.35); } .btn-trans:focus, @@ -142,18 +149,30 @@ } } -.header_slider { - height: 95vh; +.header_slider > .carousel .carousel-inner { + min-height: 95vh; + display: flex; } -.header_slider > .carousel, -.header_slider > .carousel .carousel-inner, -.header_slider > .carousel .item { - height: 100%; +.header_slider > .carousel .carousel-inner > .next, +.header_slider > .carousel .carousel-inner > .prev { + bottom: 0; +} + +.header_slider .carousel-indicators { + width: 100%; + left: 0; + margin-left: 0; +} + +.header_slider .carousel-indicators li { + margin-right: 25px; + width: 16px; + height: 16px; } .header_slider .carousel-indicators li.active { - background-color: #ffffff; + background-color: #ffffff; } .header_slider .carousel-control { @@ -167,6 +186,11 @@ margin-top: -50px; } +.header_slider > .carousel .item { + background: rgba(0,0,0,0.5); + flex: 1; +} + .header_slider > .carousel .item .container { overflow: auto; padding: 50px 20px 60px; @@ -174,13 +198,15 @@ display: flex; flex-direction: column; justify-content: flex-end; + /* background: rgba(0,0,0,0.5); */ } .header_slider .intro-cap { + margin: 0; text-align: right; line-height: 1.1; font-size: 23px; - margin-bottom: 12px; + padding-bottom: 10px; } .header_slider .btn-trans { @@ -191,8 +217,7 @@ @media (min-width: 768px) { .header_slider .intro-cap { - font-size: 2.25em; - margin-bottom: 20px; + font-size: 2.5em; } .header_slider .carousel-control { width: 50px; @@ -211,6 +236,12 @@ overflow: auto; padding: 75px 50px; } + .header_slider .btn-trans { + padding: 8px 15px; + min-width: 175px; + letter-spacing: 1px; + font-size: 1.25em; + } } @media (min-width: 992px) { @@ -224,7 +255,8 @@ font-size: 1.55em; text-align: right; line-height: 1.4; - margin-bottom: 20px; + margin-bottom: 0; + padding-bottom: 10px; } @media (max-width: 768px) { @@ -234,12 +266,12 @@ } .header_slider .carousel-indicators li { - margin: 1px 7px; + margin: 1px 25px; width: 16px; height: 16px; } .header_slider .carousel-indicators li.active { - margin: 0 7px; + margin: 0 25px; width: 18px; height: 18px; } @@ -256,6 +288,31 @@ background-position: center; } +.bg_vid { + position: absolute; + top: 0; + left: 0; + z-index: -1; + width: 100%; + height: 100%; + background-size: cover; + background-position: center; +} + +@media (min-aspect-ratio: 16/9) { + .bg_vid > video { + width: 100%; + height: auto; + } +} + +@media (max-aspect-ratio: 16/9) { + .bg_vid > video { + /* width: auto; */ + height: 100%; + } +} + .timeline>li .timeline-panel { display: flex; flex-direction: column; @@ -300,4 +357,46 @@ .timeline>li .timeline-panel { min-height: 170px; } +} + +.header_slider_box { + position: relative; + text-shadow: 0px 3px 5px rgba(0,0,0,0.5); + background: rgba(0,0,0,0.35); + box-shadow: 0 0 5px rgba(0,0,0,0.7); +} + +.cam_corner:after, +.cam_corner:before{ + position: absolute; + content: ' '; + z-index: 5; + width: 50px; + height: 50px; + background: transparent; + display: block; +} + +.cam_corner:after { + top: -2px; + right: -2px; + border-top: 2px solid rgba(255,255,255,0.5); + border-right: 2px solid rgba(255,255,255,0.5); +} + +.cam_corner:before { + bottom: -2px; + left: -2px; + border-bottom: 2px solid rgba(255,255,255,0.5); + border-left: 2px solid rgba(255,255,255,0.5); +} + +.bg_vid_back:after { + content: ' '; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + background: rgba(0,0,0,0.35); } \ No newline at end of file diff --git a/ungleich_page/templates/ungleich_page/includes/_header.html b/ungleich_page/templates/ungleich_page/includes/_header.html index e9a8a62a..4819ec1e 100644 --- a/ungleich_page/templates/ungleich_page/includes/_header.html +++ b/ungleich_page/templates/ungleich_page/includes/_header.html @@ -1,7 +1,7 @@ {% load static i18n %}
-