diff --git a/README.rst b/README.rst index 36fd154..d0f7672 100644 --- a/README.rst +++ b/README.rst @@ -7,12 +7,17 @@ This plugin allows you to add configurable lower thirds ("Bauchbinden" in German) to your pretalx instance. Most likely this will be used in (for example) a Browser Source inside `OBS Studio`_. +It currently contains two selectable themes, a general one, which colours +are automatically determined from the event and track colours set inside +pretalx, and one specifically for `rC3 2021 NOWHERE`_. + .. image:: img/lower_thirds.png :width: 400 :alt: Screenshot of the lower third output. There's currently a talk running. -The colours will be automatically determined from the event and track -colours set inside pretalx. +.. image:: img/lower_thirds_rc3.png + :width: 400 + :alt: Screenshot of the rc3 2021 theme. You can also add a configurable third line to the lower thirds, for example to hint your audience to vote for the talks. To make this easier, @@ -53,6 +58,16 @@ Copyright 2021 Franziska 'kuns' Kunsmann Released under the terms of the Apache License 2.0 +Contained Fonts +--------------- + +"Changa-SemiBold.ttf" by The Changa Project Authors (https://github.com/eliheuer/changa-vf) +Open Font License 1.1 (http://scripts.sil.org/OFL) + +"SpaceMono-Regular.ttf" by Google Inc. +Open Font License 1.1 (http://scripts.sil.org/OFL) + .. _pretalx: https://github.com/pretalx/pretalx .. _pretalx development setup: https://docs.pretalx.org/en/latest/developer/setup.html .. _OBS Studio: https://obsproject.com/ +.. _rC3 2021 NOWHERE: https://events.ccc.de/2021/10/13/remote-chaos-experience/ \ No newline at end of file diff --git a/img/lower_thirds_rc3.png b/img/lower_thirds_rc3.png new file mode 100644 index 0000000..036b3dc Binary files /dev/null and b/img/lower_thirds_rc3.png differ diff --git a/pretalx_broadcast_tools/forms.py b/pretalx_broadcast_tools/forms.py index 6e017bf..3615287 100644 --- a/pretalx_broadcast_tools/forms.py +++ b/pretalx_broadcast_tools/forms.py @@ -1,9 +1,15 @@ +from django.forms import ChoiceField, RadioSelect from django.utils.translation import gettext_lazy as _ from hierarkey.forms import HierarkeyForm from i18nfield.forms import I18nFormField, I18nFormMixin, I18nTextInput class BroadcastToolsSettingsForm(I18nFormMixin, HierarkeyForm): + lower_thirds_theme = ChoiceField( + choices=(('default', 'default'), ('rc3-2021', 'rc3-2021')), + label=_('Theme'), + widget=RadioSelect, + ) lower_thirds_no_talk_info = I18nFormField( help_text=_( "Will be shown as talk title if there's currently no talk running." diff --git a/pretalx_broadcast_tools/static/pretalx_broadcast_tools/Changa-SemiBold.ttf b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/Changa-SemiBold.ttf new file mode 100644 index 0000000..a540f31 Binary files /dev/null and b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/Changa-SemiBold.ttf differ diff --git a/pretalx_broadcast_tools/static/pretalx_broadcast_tools/SpaceMono-Regular.ttf b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/SpaceMono-Regular.ttf new file mode 100644 index 0000000..28d7ff7 Binary files /dev/null and b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/SpaceMono-Regular.ttf differ diff --git a/pretalx_broadcast_tools/static/pretalx_broadcast_tools/frontend_rc3.css b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/frontend_rc3.css new file mode 100644 index 0000000..c971bd0 --- /dev/null +++ b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/frontend_rc3.css @@ -0,0 +1,71 @@ +@font-face { + font-family: 'Changa'; + src: url('Changa-SemiBold.ttf') format('truetype'); +} + +@font-face { + font-family: 'Space Mono'; + src: url('SpaceMono-Regular.ttf') format('truetype'); +} + +body { + background-color: transparent; + margin: 0; + padding: 0; +} + +p { + margin: 0; +} + +#l3box { + width: 1020px; + position: absolute; + bottom: 80px; + left: 50%; + margin-left: -2010px; + color: white; + background-color: transparent !important; + border:1px solid #ccc !important; + border-bottom: none !important; + animation: slide 0.7s forwards; + animation-delay: 2s; +} + +#l3title { + font-family: 'Changa'; + text-transform: lowercase; + line-height: 45px; + font-size: 30px; + letter-spacing: 110%; + color: #4c4c4c; + text-align: center; + background-color: white; + padding: 10px 5px; +} + +#l3speaker, #l3info_line { + font-family: 'Space Mono', monospace; + font-size: 27px; + margin: 0; + color: white; + background-color: rgba(0,0,0,0.75); +} + +#l3speaker { + padding: 10px 20px; +} + +#l3info_line { + border-top: 1px solid #ccc; + font-size: 14px; + line-height: 36px; + padding: 0 20px; + text-align: right; +} + +@keyframes slide { + 100% { + margin-left: -510px; + } +} diff --git a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/lower_thirds.html b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/lower_thirds.html index 68c3b41..a6ddce2 100644 --- a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/lower_thirds.html +++ b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/lower_thirds.html @@ -9,7 +9,7 @@ {% endcompress %} - + {% if request.event and request.event.custom_css %} {% endif %} diff --git a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html index 43d26ee..f9517c8 100644 --- a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html +++ b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html @@ -10,6 +10,7 @@ + {% bootstrap_field form.lower_thirds_theme layout='event' %} {% bootstrap_field form.lower_thirds_no_talk_info layout='event' %} {% bootstrap_field form.lower_thirds_info_string layout='event' %}
diff --git a/pretalx_broadcast_tools/views.py b/pretalx_broadcast_tools/views.py index b4cdd2c..3216beb 100644 --- a/pretalx_broadcast_tools/views.py +++ b/pretalx_broadcast_tools/views.py @@ -2,6 +2,7 @@ import datetime as dt import pytz from django.http import JsonResponse +from django.templatetags.static import static from django.views.generic import FormView from django.views.generic.base import TemplateView from pretalx.agenda.views.schedule import ScheduleMixin @@ -11,9 +12,18 @@ from pretalx.schedule.exporters import ScheduleData from .forms import BroadcastToolsSettingsForm +THEME_CSS = { + 'default': 'frontend.css', + 'rc3-2021': 'frontend_rc3.css'} + + class BroadcastToolsLowerThirdsView(TemplateView): template_name = "pretalx_broadcast_tools/lower_thirds.html" + def css_url(self): + css = THEME_CSS.get(self.request.event.settings.lower_thirds_theme) + return static(f"pretalx_broadcast_tools/{css}") + class BroadcastToolsOrgaView(PermissionRequired, FormView): form_class = BroadcastToolsSettingsForm