diff --git a/Changelog b/Changelog index debfb974..f5280eaf 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,6 @@ -Next: +1.3.3: 2018-02-21 + * Add ALLOWED_HOST nüglarus.ch IDN + * #4105: [cms] Add cms footer plugin * #4049: [blog] Replace header background image * #3670: [hosting] Shorten ssh key name * #4046: [hosting] Add sdd_size, hdd_size to VirtualMachineSerializer (No visual change) diff --git a/dynamicweb/settings/prod.py b/dynamicweb/settings/prod.py index 6cc872d5..12a1f349 100644 --- a/dynamicweb/settings/prod.py +++ b/dynamicweb/settings/prod.py @@ -31,5 +31,6 @@ ALLOWED_HOSTS = [ ".ipv6onlyhosting.com", ".ipv6onlyhosting.net", ".digitalglarus.ch", - ".hack4glarus.ch" + ".hack4glarus.ch", + ".xn--nglarus-n2a.ch" ] diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index 07506a8b..0ce15c36 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -104,7 +104,7 @@ class VirtualMachineSerializer(serializers.Serializer): disk_size += int(disk.size) return disk_size / 1024 - def get_sdd_size(self, obj): + def get_ssd_size(self, obj): template = obj.template disk_size = 0 for disk in template.disks: diff --git a/ungleich_page/cms_plugins.py b/ungleich_page/cms_plugins.py index 47f296aa..660a363a 100644 --- a/ungleich_page/cms_plugins.py +++ b/ungleich_page/cms_plugins.py @@ -8,6 +8,7 @@ from .models import ( UngleichCustomerItem, UngleichHTMLOnly, UngleichHeaderWithBackgroundImageSlider, UngleichHeaderWithBackgroundVideoSliderItem, + UngleichFooter ) @@ -295,3 +296,18 @@ class UngleichHTMLPlugin(CMSPluginBase): ) context['instance'] = instance return context + + +@plugin_pool.register_plugin +class UngleichFooterPlugin(CMSPluginBase): + name = "ungleich Footer Plugin" + model = UngleichFooter + render_template = "ungleich_page/ungleich/_footer.html" + cache = False + + def render(self, context, instance, placeholder): + context = super(UngleichFooterPlugin, self).render( + context, instance, placeholder + ) + context['instance'] = instance + return context diff --git a/ungleich_page/migrations/0018_ungleichfooter.py b/ungleich_page/migrations/0018_ungleichfooter.py new file mode 100644 index 00000000..37c33003 --- /dev/null +++ b/ungleich_page/migrations/0018_ungleichfooter.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-02-08 15:49 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ungleich_page', '0017_auto_20171219_1856'), + ('cms', '0014_auto_20160404_1908'), + ] + + operations = [ + migrations.CreateModel( + name='UngleichFooter', + 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')), + ('copyright_label', models.CharField(blank=True, default='', + help_text='Name of the company alongside the copyright year', max_length=100)), + ('link_text', models.CharField( + blank=True, help_text='Text for the link on the right part of footer', max_length=100, null=True)), + ('link_url', models.URLField(blank=True, + help_text='Url to the link in footer', null=True)), + ('twitter_url', models.URLField( + blank=True, help_text='If empty, twitter btn will not be visible', null=True)), + ('linkedin_url', models.URLField( + blank=True, help_text='If empty, linkedin btn will not be visible', null=True)), + ('github_url', models.URLField( + blank=True, help_text='If empty, github btn will not be visible', null=True)), + ('facebook_url', models.URLField( + blank=True, help_text='If empty, facebook btn will not be visible', null=True)), + ('youtube_url', models.URLField( + blank=True, help_text='If empty, youtube btn will not be visible', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/ungleich_page/migrations/0019_merge.py b/ungleich_page/migrations/0019_merge.py new file mode 100644 index 00000000..1cd6b7f9 --- /dev/null +++ b/ungleich_page/migrations/0019_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-02-08 20:10 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('ungleich_page', '0018_ungleichfooter'), + ('ungleich_page', '0018_auto_20180105_1826'), + ] + + operations = [ + ] diff --git a/ungleich_page/models.py b/ungleich_page/models.py index b96afcb1..4ffd1a33 100644 --- a/ungleich_page/models.py +++ b/ungleich_page/models.py @@ -169,3 +169,38 @@ class UngleichHTMLOnly(CMSPlugin): def __str__(self): return self.name + + +class UngleichFooter(CMSPlugin): + copyright_label = models.CharField( + max_length=100, default='', blank=True, + help_text='Name of the company alongside the copyright year' + ) + link_text = models.CharField( + max_length=100, blank=True, null=True, + help_text='Text for the link on the right part of footer' + ) + link_url = models.URLField( + blank=True, null=True, + help_text='Url to the link in footer' + ) + twitter_url = models.URLField( + blank=True, null=True, + help_text='If empty, twitter btn will not be visible' + ) + linkedin_url = models.URLField( + blank=True, null=True, + help_text='If empty, linkedin btn will not be visible' + ) + github_url = models.URLField( + blank=True, null=True, + help_text='If empty, github btn will not be visible' + ) + facebook_url = models.URLField( + blank=True, null=True, + help_text='If empty, facebook btn will not be visible' + ) + youtube_url = models.URLField( + blank=True, null=True, + help_text='If empty, youtube btn will not be visible' + ) diff --git a/ungleich_page/static/ungleich_page/css/glasfaser.css b/ungleich_page/static/ungleich_page/css/glasfaser.css index 5547ea0e..36dd6871 100644 --- a/ungleich_page/static/ungleich_page/css/glasfaser.css +++ b/ungleich_page/static/ungleich_page/css/glasfaser.css @@ -19,13 +19,28 @@ color: #fff; } -.navbar-transparent .navbar-nav>li>a:hover, -.navbar-transparent .navbar-nav>li>a:focus, -.navbar-transparent .navbar-nav>li>a:focus:active { - color: #fed136; +.navbar-default .navbar-nav>li>a:focus, +.navbar-default .navbar-nav>li>a:hover, +.navbar-default .navbar-nav>li>a:active { + color: #333; +} + +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} + +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background: #ddd; } @media (min-width: 768px) { + .navbar-transparent .navbar-nav>li>a:focus, + .navbar-transparent .navbar-nav>li>a:hover, + .navbar-transparent .navbar-nav>li>a:active { + color: #e5e6e7; + } + .navbar-transparent { border-color: transparent; } diff --git a/ungleich_page/templates/ungleich_page/glasfaser.html b/ungleich_page/templates/ungleich_page/glasfaser.html index 77338ac9..2481844e 100644 --- a/ungleich_page/templates/ungleich_page/glasfaser.html +++ b/ungleich_page/templates/ungleich_page/glasfaser.html @@ -57,13 +57,13 @@ @@ -312,7 +312,6 @@ - diff --git a/ungleich_page/templates/ungleich_page/ungleich/_footer.html b/ungleich_page/templates/ungleich_page/ungleich/_footer.html new file mode 100644 index 00000000..f8770e57 --- /dev/null +++ b/ungleich_page/templates/ungleich_page/ungleich/_footer.html @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/ungleich_page/templates/ungleich_page/ungleich_cms_page.html b/ungleich_page/templates/ungleich_page/ungleich_cms_page.html index 707d0dab..f8d32f07 100644 --- a/ungleich_page/templates/ungleich_page/ungleich_cms_page.html +++ b/ungleich_page/templates/ungleich_page/ungleich_cms_page.html @@ -41,7 +41,9 @@ {% placeholder 'Ungleich Page Contents' %} - {% include "ungleich_page/includes/_footer.html" %} + {% placeholder 'Footer' or %} + {% include "ungleich_page/includes/_footer.html" %} + {% endplaceholder %}