header btn target accepts id, navbar optional lang dropdown
This commit is contained in:
parent
b3742ed3f7
commit
b252211a69
6 changed files with 60 additions and 11 deletions
20
ungleich_page/migrations/0020_auto_20180320_0216.py
Normal file
20
ungleich_page/migrations/0020_auto_20180320_0216.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.4 on 2018-03-19 20:46
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ungleich_page', '0019_merge'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='ungleichheaderwithbackgroundvideoslideritem',
|
||||
name='btn_link',
|
||||
field=models.CharField(blank=True, help_text='Url or #id to navigate on click. If this field is left empty, no button would be displayed.', max_length=100, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -125,9 +125,12 @@ class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin):
|
|||
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_link = models.CharField(
|
||||
max_length=100, blank=True, null=True,
|
||||
help_text=(
|
||||
'Url or #id to navigate on click. If this field is left empty, no '
|
||||
'button would be displayed.'
|
||||
)
|
||||
)
|
||||
btn_text = models.CharField(
|
||||
blank=True, null=True, max_length=50,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@
|
|||
{% endif %}
|
||||
{% if instance.btn_link %}
|
||||
{% trans "Learn More" as default_btn_text %}
|
||||
<a class="btn btn-trans" href="{{ instance.btn_link }}">{{ instance.btn_text|default:default_btn_text }}</a>
|
||||
<a class="btn btn-trans page-scroll url" href="{{ instance.btn_link }}">{{ instance.btn_text|default:default_btn_text }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue