mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2025-04-28 22:50:59 +00:00
include rc3 2021 theme
This commit is contained in:
parent
c6441cb280
commit
506c8b135f
9 changed files with 106 additions and 3 deletions
|
@ -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."
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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 %}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue