summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bfh-ci/beamerouterthemeBFH-sidebar.sty
blob: 6fbaa195347d54f0d1c4e236ebb60443a35efd5f (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
%% This is file `beamerouterthemeBFH-sidebar.sty' version 2.2.1 (2024-03-11),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
%%  Copyright (C) 2021–2024 by
%%      Marei Peischl <marei@peitex.de>
%%      Andreas Habegger <andreas.habegger@bfh.ch>
%%
%% ============================================================================
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008/05/04 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainers of this work are
%%   Marei Peischl <bfh-ci@peitex.de>
%%   Andreas Habegger <andreas.habegger@bfh.ch>
%%
%% The development respository can be found at
%% https://gitlab.ti.bfh.ch/bfh-latex/bfh-ci/
%% Please use the issue tracker for feedback!
%%
%% ============================================================================
%%
\ProvidesPackage{beamerouterthemeBFH-sidebar}[2024-03-11 v2.2.1 BFH-CI beamer outer theme sidebar variant, CI of Bern University of Applied Sciences]

\mode<presentation>
\useoutertheme{BFH}
\useoutertheme[height=0pt,width=20mm,right]{sidebar}

\ExplSyntaxOn

\box_new:N \g__ptxcd_sidebar_logo_box

\defbeamertemplate*{logo~in~sidebar}{BFH-sidebar}{
	\box_if_empty:NT \g__ptxcd_sidebar_logo_box {
		\cs_if_exist:NT \__ptxcd_set_logobox_A:N {
		\__ptxcd_set_logobox_A:N \g__ptxcd_sidebar_logo_box
		\box_gresize_to_wd:Nn \g__ptxcd_sidebar_logo_box {.06\paperwidth}
		}
	}
	\makebox[\beamer@sidebarwidth][c]{%
		\box_use:N \g__ptxcd_sidebar_logo_box
	}
}
\ExplSyntaxOff

\defbeamertemplate*{title in sidebar}{BFH-sidebar}{
	{\usebeamerfont{title in sidebar}%
			\vskip1.5em%
			\hskip3pt%
			\usebeamercolor[fg]{title in sidebar}%
			\insertshorttitle[width=18mm,center,respectlinebreaks]\par%
			\vskip1.25em%
		}%
}

\defbeamertemplate*{author in sidebar}{BFH-sidebar}{
	{
			\hskip3pt%
			\usebeamercolor[fg]{author in sidebar}%
			\usebeamerfont{author in sidebar}%
			\insertshortauthor[width=18mm,center,respectlinebreaks]\par%
			\vskip1.25em%
		}%
}

\defbeamertemplate*{sidebar right}{BFH-sidebar}
{
	\rule{1.5pt}{\paperheight}%
	\begin{beamercolorbox}[wd=\dimexpr\beamer@sidebarwidth-1.5pt\relax,vmode]{sidebar}
		\vbox to \paperheight{
			\vskip\baselineskip
			\usebeamertemplate*{title in sidebar}
			\usebeamertemplate*{author in sidebar}
			\usebeamertemplate*{logo in sidebar}
			\vskip20pt%
			\insertverticalnavigation{15mm}%
			\par
			\vskip\fill
			\usebeamertemplate*{version in sidebar}\par
			\vskip .1\paperheight
			\null
		}
	\end{beamercolorbox}
}

\defbeamertemplate*{version in sidebar}{BFH-sidebar}{
	\ifx\insertversion\@empty
	\else
		\hskip3pt%
		\insertversion\par
		\vskip1.25em%
	\fi
}

\mode<all>

\endinput