Merge remote-tracking branch 'mainRepo/master' into multisite
This commit is contained in:
commit
d72df9b350
11 changed files with 189 additions and 12 deletions
|
@ -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
|
* #4049: [blog] Replace header background image
|
||||||
* #3670: [hosting] Shorten ssh key name
|
* #3670: [hosting] Shorten ssh key name
|
||||||
* #4046: [hosting] Add sdd_size, hdd_size to VirtualMachineSerializer (No visual change)
|
* #4046: [hosting] Add sdd_size, hdd_size to VirtualMachineSerializer (No visual change)
|
||||||
|
|
|
@ -31,5 +31,6 @@ ALLOWED_HOSTS = [
|
||||||
".ipv6onlyhosting.com",
|
".ipv6onlyhosting.com",
|
||||||
".ipv6onlyhosting.net",
|
".ipv6onlyhosting.net",
|
||||||
".digitalglarus.ch",
|
".digitalglarus.ch",
|
||||||
".hack4glarus.ch"
|
".hack4glarus.ch",
|
||||||
|
".xn--nglarus-n2a.ch"
|
||||||
]
|
]
|
||||||
|
|
|
@ -104,7 +104,7 @@ class VirtualMachineSerializer(serializers.Serializer):
|
||||||
disk_size += int(disk.size)
|
disk_size += int(disk.size)
|
||||||
return disk_size / 1024
|
return disk_size / 1024
|
||||||
|
|
||||||
def get_sdd_size(self, obj):
|
def get_ssd_size(self, obj):
|
||||||
template = obj.template
|
template = obj.template
|
||||||
disk_size = 0
|
disk_size = 0
|
||||||
for disk in template.disks:
|
for disk in template.disks:
|
||||||
|
|
|
@ -8,6 +8,7 @@ from .models import (
|
||||||
UngleichCustomerItem, UngleichHTMLOnly,
|
UngleichCustomerItem, UngleichHTMLOnly,
|
||||||
UngleichHeaderWithBackgroundImageSlider,
|
UngleichHeaderWithBackgroundImageSlider,
|
||||||
UngleichHeaderWithBackgroundVideoSliderItem,
|
UngleichHeaderWithBackgroundVideoSliderItem,
|
||||||
|
UngleichFooter
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,3 +296,18 @@ class UngleichHTMLPlugin(CMSPluginBase):
|
||||||
)
|
)
|
||||||
context['instance'] = instance
|
context['instance'] = instance
|
||||||
return context
|
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
|
||||||
|
|
44
ungleich_page/migrations/0018_ungleichfooter.py
Normal file
44
ungleich_page/migrations/0018_ungleichfooter.py
Normal file
|
@ -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',),
|
||||||
|
),
|
||||||
|
]
|
16
ungleich_page/migrations/0019_merge.py
Normal file
16
ungleich_page/migrations/0019_merge.py
Normal file
|
@ -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 = [
|
||||||
|
]
|
|
@ -169,3 +169,38 @@ class UngleichHTMLOnly(CMSPlugin):
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
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'
|
||||||
|
)
|
||||||
|
|
|
@ -19,13 +19,28 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-transparent .navbar-nav>li>a:hover,
|
.navbar-default .navbar-nav>li>a:focus,
|
||||||
.navbar-transparent .navbar-nav>li>a:focus,
|
.navbar-default .navbar-nav>li>a:hover,
|
||||||
.navbar-transparent .navbar-nav>li>a:focus:active {
|
.navbar-default .navbar-nav>li>a:active {
|
||||||
color: #fed136;
|
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) {
|
@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 {
|
.navbar-transparent {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,13 +57,13 @@
|
||||||
<!-- Start Navbar collapse-->
|
<!-- Start Navbar collapse-->
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li>
|
<li>
|
||||||
<a class="page-scroll" href="#services">Technische Details</a>
|
<a class="url-init" href="#services">Technische Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="page-scroll" href="#about">Wie funktioniert es?</a>
|
<a class="url-init" href="#about">Wie funktioniert es?</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="page-scroll" href="#contact">{% trans "CONTACT" %}</a>
|
<a class="url-init" href="#contact">{% trans "CONTACT" %}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- /.navbar-collapse -->
|
<!-- /.navbar-collapse -->
|
||||||
|
@ -312,7 +312,6 @@
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" type="text/javascript"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<!-- Custom Theme JavaScript -->
|
<!-- Custom Theme JavaScript -->
|
||||||
<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script>
|
|
||||||
<script src="{% static 'datacenterlight/js/main.js' %}"></script>
|
<script src="{% static 'datacenterlight/js/main.js' %}"></script>
|
||||||
|
|
||||||
<!-- Custom Fonts -->
|
<!-- Custom Fonts -->
|
||||||
|
|
47
ungleich_page/templates/ungleich_page/ungleich/_footer.html
Normal file
47
ungleich_page/templates/ungleich_page/ungleich/_footer.html
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<footer>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span class="copyright">Copyright © {{instance.copyright_label}} {% now "Y" %}</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<ul class="list-inline social-buttons">
|
||||||
|
{% if instance.twitter_url %}
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.twitter_url}}"><i class="fa fa-twitter"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if instance.github_url %}
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.github_url}}"><i class="fa fa-github"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if instance.linkedin_url %}
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.linkedin_url}}"><i class="fa fa-linkedin"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if instance.facebook_url %}
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.facebook_url}}"><i class="fa fa-facebook"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if instance.youtube_url %}
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.youtube_url}}"><i class="fa fa-youtube-play"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
{% if instance.link_text %}
|
||||||
|
<ul class="list-inline quicklinks">
|
||||||
|
<li>
|
||||||
|
<a href="{{instance.link_url}}">{{instance.link_text}}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
|
@ -41,7 +41,9 @@
|
||||||
{% placeholder 'Ungleich Page Contents' %}
|
{% placeholder 'Ungleich Page Contents' %}
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
|
{% placeholder 'Footer' or %}
|
||||||
{% include "ungleich_page/includes/_footer.html" %}
|
{% include "ungleich_page/includes/_footer.html" %}
|
||||||
|
{% endplaceholder %}
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript"></script>
|
<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript"></script>
|
||||||
|
|
Loading…
Reference in a new issue