-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.tex.jinja2
88 lines (80 loc) · 2.81 KB
/
template.tex.jinja2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
\batchmode
\documentclass[final]{beamer}
%% 7.5 display V1 640x384
%% \usepackage[size=custom,width=6.49,height=10.83,scale=0.4,debug]{beamerposter}
%% 7.5 display V2 800x480
\usepackage[size=custom,width=8.12,height=13.54,scale=0.4,debug]{beamerposter}
\mode<presentation>{\usetheme{seriinfodisplay}}
\setbeamersize{text margin left = .5cm, text margin right = 0.5cm}
\usepackage{xunicode}
\usepackage{ucs}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{fontawesome5}
\usepackage[german]{babel}
\usepackage[weather,clock]{ifsym}
\usepackage[german,calc]{datetime2}
\input{calendarweek} % https://ctan.org/pkg/calendarweek?lang=de
\setsansfont[Ligatures={Common}]{Roboto Medium} %% (ref:latex_template_font)
\begin{document}
\DTMsavenow{now}
\begin{frame}{}
%% Date
\begin{block}{}
\begin{columns}[T,onlytextwidth]
\begin{column}{.3\textwidth}
{\VERYHuge \DTMordinal{\the\day} }
\vfill
\end{column}
\begin{column}{.6\textwidth}
\DTMweekdayname{\DTMfetchdow{now}}\\
\DTMmonthname{\DTMfetchmonth{now}}\\
KW\calendarweek{\day}{\month}{\year}
\end{column}
\end{columns}
\end{block}
%% Current Weather
\begin{block}{}
\begin{columns}[c,onlytextwidth]
\begin{column}{.3\textwidth}
{\VeryHuge \jvar{ weather_icons[weather['status']] }}
\vfill
\end{column}
\begin{column}{.7\textwidth}
\large
\begin{tabular}{c l}
\jvar{ thermometer_icons[weather['thermometer']] } & \normalsize \jvar{ weather['temp']|int }°C \\
\faSun &\normalsize\jvar{ weather['sunrise_ts'].strftime('%H:%M') }
- \jvar{ weather['sunset_ts'].strftime('%H:%M') }
\end{tabular}
\end{column}
\end{columns}
\end{block}
%% 4x Forecast
\begin{block}{}
\begin{tabular}{c c c c}
\code{ for fc in weather['forecast'] }
\Huge \jvar{weather_icons[fc['status']]} \jvar{ '&' if not loop.last }
\code{ endfor } \\
\code{ for fc in weather['forecast'] }
\small \jvar{fc['temp']|int}°C \jvar{ '&' if not loop.last }
\code{ endfor } \\
\code{ for fc in weather['forecast'] }
\small \jvar{ fc['start_ts'].strftime('%H:%M') } \jvar{ '&' if not loop.last }
\code{ endfor }
\end{tabular}
\end{block}
%% Calendar Events
\begin{block}{}
\begin{tabular}{l p{4cm}}
\code{ for event in events | selectattr("ts", "none") | sort(attribute="title") }
\jvar{ event.ts or '\\faCalendar' } & \small \jvar{ event.title|truncate(23, False, '…', 0) } \\
\code{ endfor }
\code{ for event in events | selectattr("ts") | sort(attribute="ts") }
\jvar{ event.ts or '\\faCalendar' } & \small \jvar{ event.title|truncate(23, False, '…', 0) } \\
\code{ endfor }
\end{tabular}
\end{block}
\vfill
\end{frame}
\end{document}