add video to timetable
This commit is contained in:
26
src/project/migrations/0011_auto_20211104_1608.py
Normal file
26
src/project/migrations/0011_auto_20211104_1608.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.21 on 2021-11-04 16:08
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import djangocms_text_ckeditor.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project', '0010_auto_20200325_1611'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='timetable',
|
||||
name='video_cta',
|
||||
field=djangocms_text_ckeditor.fields.HTMLField(blank=True, null=True, verbose_name='Video CTA'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='timetable',
|
||||
name='video_vimeo_id',
|
||||
field=models.IntegerField(blank=True, help_text='e.g. https://vimeo.com/<b>131766159</b>', null=True, verbose_name='Video Vimeo ID'),
|
||||
),
|
||||
]
|
||||
@@ -265,6 +265,8 @@ class Timetable(CMSPlugin):
|
||||
introduction = HTMLField(verbose_name='Intro', configuration='CKEDITOR_SETTINGS_INPUT')
|
||||
outro = HTMLField(verbose_name='Outro', configuration='CKEDITOR_SETTINGS_INPUT', blank=True, null=True)
|
||||
cta = HTMLField(verbose_name='CTA', configuration='CKEDITOR_SETTINGS_INPUT', blank=True, null=True)
|
||||
video_vimeo_id = models.IntegerField(verbose_name='Video Vimeo ID', blank=True, null=True, help_text='e.g. https://vimeo.com/<b>131766159</b>')
|
||||
video_cta = HTMLField(verbose_name='Video CTA', configuration='CKEDITOR_SETTINGS_INPUT', blank=True, null=True)
|
||||
|
||||
class Meta(CMSPlugin.Meta):
|
||||
verbose_name = 'Timetable'
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{% load i18n cms_tags thumbnail util_tags %}
|
||||
|
||||
<div id="timetable" data-active="0" data-last="{{ instance.child_plugin_instances|length }}">
|
||||
{% if instance.video_vimeo_id and instance.video_cta %}
|
||||
<div class="timetable__button" data-video-vimeo-id="{{ instance.video_vimeo_id }}">
|
||||
<a href="#video" class="button button--white">
|
||||
<span class="button__icon">{% include 'project/assets/play.svg' %}</span>
|
||||
<span class="button__text">{{ instance.video_cta }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="timetable__clock__frame">
|
||||
<div class="timetable__clock__main">
|
||||
<div class="timetable__start reveal reveal_animation data_delay_8"></div>
|
||||
|
||||
Reference in New Issue
Block a user