portal cms apphook and various fixes
parent
5ceb2af5a1
commit
1a3a3f06b5
@ -0,0 +1,11 @@
|
||||
from cms.app_base import CMSApp
|
||||
from cms.apphook_pool import apphook_pool
|
||||
|
||||
|
||||
@apphook_pool.register
|
||||
class PortalApphook(CMSApp):
|
||||
name = 'Portal'
|
||||
app_name = 'portal'
|
||||
|
||||
def get_urls(self, page=None, language=None, **kwargs):
|
||||
return ['portal.urls']
|
||||
@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.11 on 2018-03-23 10:12
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import image_cropping.fields
|
||||
import project.utils
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
|
||||
('cms', '0018_pagenode'),
|
||||
('project', '0005_auto_20180322_1612'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='IntroImage',
|
||||
fields=[
|
||||
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_introimage', serialize=False, to='cms.CMSPlugin')),
|
||||
('cropping', image_cropping.fields.ImageRatioField('image', '1000x1000', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping')),
|
||||
('image', project.utils.CroppableFilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'verbose_name_plural': 'intro Bilder',
|
||||
'verbose_name': 'Intro Bild',
|
||||
},
|
||||
bases=('cms.cmsplugin',),
|
||||
),
|
||||
]
|
||||
@ -1,8 +1,15 @@
|
||||
{% load menu_tags %}
|
||||
{% load i18n cms_tags menu_tags %}
|
||||
|
||||
{% for child in children %}
|
||||
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}"
|
||||
class="header__button header__button--light data_id_{{ forloop.counter0 }}">
|
||||
{{ child.get_menu_title }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% page_url 'portal' as portal_url %}
|
||||
{% if portal_url %}
|
||||
<a href="{{ portal_url }}"
|
||||
class="header__button header__button--light data_id_{{ children|length|add:1 }}">
|
||||
{% trans 'Login' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
@ -1,5 +1,9 @@
|
||||
{% extends 'project/content.html' %}
|
||||
|
||||
{% block extra_meta %}
|
||||
<meta name="robots" content="noindex, nofollow"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_main %}
|
||||
{% include 'project/newsletter/subscription_form.html' %}
|
||||
{% endblock %}
|
||||
@ -0,0 +1,5 @@
|
||||
{% load thumbnail %}
|
||||
|
||||
{% thumbnail instance.image 1600x800 box=instance.cropping crop detail as thumb %}
|
||||
<div class="content__intro__image scroll reveal reveal_animation" data-ease-multiplier="-2"
|
||||
style="background-image: url({{ thumb.url }})"></div>
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="section__title reveal_self reveal reveal_animation">
|
||||
<div class="section__title__main">
|
||||
<div class="section__title__content scroll" data-scroll-mod="horizontal"
|
||||
data-ease-multiplier="5"></div>
|
||||
data-ease-multiplier="5">{{ section_title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue