complex.sty 7 KB
Newer Older
Alija Sabic's avatar
Alija Sabic committed
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
106
107
108
109
110
111
112
113
114
115
116
117
118
% Color Theme %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Font Theme %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Outer Theme %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ------------------------------------------------------------------------------------------------------------------- %
% Navigation Symbols
% ------------------------------------------------------------------------------------------------------------------- %
\defbeamertemplate{navigation symbols}{complex}{}%
% ------------------------------------------------------------------------------------------------------------------- %
% Logo
% ------------------------------------------------------------------------------------------------------------------- %
\defbeamertemplate{logo}{complex}{%
    \placetikzbackground[overlay,remember picture]{=1}{%
        \node[anchor=north east,fill=white,inner sep=2mm] at ($(current page.north east)+(-0.025\paperwidth,-0.05\paperheight)$) {%
            \includegraphics[width=\beamer@fhtw@logowidth]{\beamer@fhtw@logofile}};%
        }%
}
% ------------------------------------------------------------------------------------------------------------------- %
% Background
% ------------------------------------------------------------------------------------------------------------------- %
\defbeamertemplate{background}{complex}{%
    \placetikzbackground{=1}{%
        \def\gridsize{\beamer@fhtw@gridsize}%
        \pgfmathsetmacro\aratio{\paperheight/\paperwidth}%
        \pgfmathsetmacro\rwidth{\paperwidth/\gridsize/1cm}%
        
        \pgfmathsetmacro\sgridsize{round(\gridsize*\aratio)}%
        \pgfmathsetmacro\rheight{\paperheight/\sgridsize/1cm}%

        \pgfmathdeclarerandomlist{colors}{%
            {tw-green}%
            {tw-blue}%
            {tw-gray}%
        }%

        \foreach \x in {0,1,...,\gridsize} {%
            \foreach \y in {0,1,...,\gridsize} {%
                \pgfmathrandomitem{\randomcolor}{colors}%
                \fill[color=\randomcolor,draw=white,line width=0.5mm] (\x * \rwidth, \y * \rheight) rectangle ++(\rwidth,\rheight);%
            }%
        }%
    }%
    \placetikzbackground{>1}{%
        \coordinate (start) at ($(current page.south west)+(0.1,0.1)$);%
        \coordinate (end)   at ($(current page.north east)+(-0.1,-0.1)$);%

        \def\gridsize{\beamer@fhtw@gridsize}%
        \pgfmathsetmacro\aratio{\paperheight/\paperwidth}%
        \pgfmathsetmacro\rwidth{\paperwidth/\gridsize/1cm}%
        
        \pgfmathsetmacro\sgridsize{round(\gridsize*\aratio)}%
        \pgfmathsetmacro\rheight{\paperheight/\sgridsize/1cm}%

        \pgfmathdeclarerandomlist{colors}{%
            {tw-green}%
            {tw-blue}%
            {tw-gray}%
        }%

        \foreach \x in {0,1,...,\gridsize} {%
            \foreach \y in {0,1,...,\gridsize} {%
                \pgfmathrandomitem{\randomcolor}{colors}%
                \fill[color=\randomcolor,draw=white,line width=0.5mm] (\x * \rwidth, \y * \rheight) rectangle ++(\rwidth,\rheight);%
            }%
        }%

        % Frame
        \draw[draw=none,fill=white,line width=0.2mm,anchor=north west] (start) rectangle (end);%
    }%
}
% ------------------------------------------------------------------------------------------------------------------- %
% Title Page
% ------------------------------------------------------------------------------------------------------------------- %
\defbeamertemplate{title page}{complex}{%
    \begin{tikzpicture}[%
        base/.style={text width=0.85\textwidth,anchor=north west,align=left}%
    ]%
        \useasboundingbox (0,0) rectangle(\paperwidth,\paperheight);%
        \pgfmathsetmacro\residualwidth{\paperwidth-\beamer@fhtw@logowidth*2}%

        \shadowedtext[text=black,draw=\beamer@fhtw@frames,anchor=south west][text=white,anchor=south west][0.75mm]{($(current page.north west)+(0.025\paperwidth,-0.325\paperheight)$)}{\residualwidth}{\usebeamerfont{title}\inserttitle}%
        \shadowedtext[text=black,draw=\beamer@fhtw@frames][text=white][0.75mm]{($(current page.north west)+(0.025\paperwidth,-0.3\paperheight)+(0,-1em)$)}{\residualwidth}{\usebeamerfont{subtitle}\insertshortsubtitle}%

        \shadowedtext[text=black,draw=\beamer@fhtw@frames][text=white][0.75mm]{($(current page.south west)+(0.025\paperwidth,0.275\paperheight)$)}{0.9\paperwidth}{\usebeamerfont{author}\insertauthor}%
        \shadowedtext[text=black,draw=\beamer@fhtw@frames][text=white][0.75mm]{($(current page.south west)+(0.025\paperwidth,0.275\paperheight)-(0,2em)$)}{0.9\paperwidth}{\usebeamerfont{mail}\insertmail}%
        \shadowedtext[text=black,draw=\beamer@fhtw@frames][text=white][0.75mm]{($(current page.south west)+(0.025\paperwidth,0.275\paperheight)-(0,4.1em)$)}{0.5\paperwidth}{\usebeamerfont{institute}\insertinstitute}%
        \shadowedtext[text=black,draw=\beamer@fhtw@frames][text=white][0.75mm]{($(current page.south west)+(0.55\paperwidth,0.275\paperheight)-(0,4.1em)$)}{0.375\paperwidth}{\usebeamerfont{date}\insertdate}%
    \end{tikzpicture}%
    \insertlogo%
}%
% ------------------------------------------------------------------------------------------------------------------- %
% Sidebar Canvas
% ------------------------------------------------------------------------------------------------------------------- %
% \defbeamertemplate{sidebar canvas \beamer@fhtw@sidebarside}{complex}{}
\beamer@fhtw@reusestyle{complex}{sidebar canvas \beamer@fhtw@sidebarside}{fhtw}
% ------------------------------------------------------------------------------------------------------------------- %
% Sidebar Sections
% ------------------------------------------------------------------------------------------------------------------- %
% \defbeamertemplate{section in sidebar}{complex}{}
\beamer@fhtw@reusestyle{complex}{section in sidebar}{fhtw}
% \defbeamertemplate{subsection in sidebar}{complex}{}
\beamer@fhtw@reusestyle{complex}{subsection in sidebar}{fhtw}
% \defbeamertemplate{subsubsection in sidebar}{complex}{}
\beamer@fhtw@reusestyle{complex}{subsubsection in sidebar}{fhtw}
% \defbeamertemplate{section in sidebar shaded}{complex}{}
\beamer@fhtw@reusestyle{complex}{section in sidebar shaded}{fhtw}
% \defbeamertemplate{subsection in sidebar shaded}{complex}{}
\beamer@fhtw@reusestyle{complex}{subsection in sidebar shaded}{fhtw}
% \defbeamertemplate{subsubsection in sidebar shaded}{complex}{}
\beamer@fhtw@reusestyle{complex}{subsubsection in sidebar shaded}{fhtw}
% ------------------------------------------------------------------------------------------------------------------- %
% Sidebar
% ------------------------------------------------------------------------------------------------------------------- %
% \defbeamertemplate{sidebar \beamer@fhtw@sidebarside}{complex}{}
\beamer@fhtw@reusestyle{complex}{sidebar \beamer@fhtw@sidebarside}{fhtw}

% Inner Theme %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%