1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-11-24 06:11:02 +00:00

include rc3 2021 theme

This commit is contained in:
Daniel Havlik 2021-12-25 03:23:34 +01:00
parent c6441cb280
commit 506c8b135f
9 changed files with 106 additions and 3 deletions

View file

@ -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/

BIN
img/lower_thirds_rc3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -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."

View file

@ -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;
}
}

View file

@ -9,7 +9,7 @@
<script src="{% static "vendored/jquery-3.1.1.js" %}"></script>
{% endcompress %}
<script src="{% static "pretalx_broadcast_tools/update.js" %}"></script>
<link rel="stylesheet" href="{% static "pretalx_broadcast_tools/frontend.css" %}" />
<link rel="stylesheet" href="{{ view.css_url }}" />
{% if request.event and request.event.custom_css %}
<link rel="stylesheet" type="text/css" href="{{ request.event.custom_css.url }}"/>
{% endif %}

View file

@ -10,6 +10,7 @@
<legend>
{% translate "Set up lower thirds" %}
</legend>
{% 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' %}
<p>

View file

@ -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