|
1 | 1 | \ProvidesFile{pharo-titlepage.sty} |
2 | 2 | [2017/05/10 0.1 title page design for SBA booklets] |
3 | 3 |
|
| 4 | +% default titlepage appearance |
| 5 | +\newcommand\pharotitle@maketitle{\horizontitle} |
| 6 | + |
4 | 7 | \DeclareOption{maketitle}{% |
5 | | - \renewcommand{\maketitle}{\pharotitle}} |
| 8 | + \renewcommand{\maketitle}{\pharotitle@maketitle}} |
| 9 | +\DeclareOption{foggy}{% |
| 10 | + \renewcommand\pharotitle@maketitle{\foggytitle}} |
| 11 | +\DeclareOption{horizon}{% |
| 12 | + \renewcommand\pharotitle@maketitle{\horizontitle}} |
6 | 13 | \ProcessOptions |
7 | 14 |
|
8 | 15 | \RequirePackage{xcolor} |
9 | 16 | \RequirePackage{tikz} |
10 | 17 | \usetikzlibrary{calc} |
| 18 | +\usetikzlibrary{shadings} |
11 | 19 | \usetikzlibrary{svg.path} |
12 | 20 |
|
13 | 21 | % fixup TikZ page coordinates for memoir stock & trimming |
|
40 | 48 | \definecolor{BeaconRed}{HTML}{ED1C24} |
41 | 49 |
|
42 | 50 | \definecolor{LightShade}{HTML}{EEEEEE} |
| 51 | +\definecolor{Shade}{HTML}{88AACC} |
| 52 | + |
| 53 | +\colorlet{top}{LightShade} |
| 54 | +\colorlet{mid}{LightShade} |
| 55 | +\colorlet{bot}{PharoBlue} |
43 | 56 |
|
44 | 57 | \pgfdeclarelayer{background} |
45 | 58 | \pgfsetlayers{background,main} |
46 | 59 |
|
47 | | -\newcommand\pharotitle{ |
| 60 | +\newcommand\horizontitle{ |
48 | 61 | \thispagestyle{empty} |
49 | 62 |
|
50 | 63 | \begin{tikzpicture}[remember picture,overlay,line width=0mm] |
|
108 | 121 | \newpage |
109 | 122 | } |
110 | 123 |
|
111 | | -\newcommand\pharobeacon@tikz{ |
| 124 | +\newcommand\foggytitle{ |
| 125 | + \thispagestyle{empty} |
| 126 | + |
| 127 | + \begin{tikzpicture}[remember picture,overlay,line width=0mm] |
| 128 | + \coordinate (left) at (current page.west); |
| 129 | + \coordinate (right) at (current page.east); |
| 130 | + \coordinate (top) at (current page.north); |
| 131 | + \coordinate (center) at (current page.center); |
| 132 | + \coordinate (bottom) at (current page.south); |
| 133 | + |
| 134 | + \coordinate (stocktopleft) at ([left=\trimedge,above=\trimtop]current page.north west); |
| 135 | + \coordinate (stockbottomright) at ([right=\stockwidth,below=\stockheight]stocktopleft); |
| 136 | + |
| 137 | + \coordinate (horizon) at ($ (center)!.618!(top) $); |
| 138 | + \coordinate (depths) at ($ (center)!.618!(bottom) $); |
| 139 | + |
| 140 | + \newcommand\beaconscaling{(.618\paperheight/120pt)} % golden ratio factor & approx. height of beacon tower |
| 141 | + \coordinate (beacon) at ($ (depths -| left) + (-9.75,-2.5) $); |
| 142 | + |
| 143 | + \node[anchor=north east] at ($ (horizon -| right) + (-.1\pagewidth,0cm) $) { |
| 144 | + \begin{varwidth}{.6\pagewidth}% |
| 145 | + \flushright \fontsize{50pt}{60pt}\sffamily |
| 146 | + \@title |
| 147 | + \end{varwidth} |
| 148 | + }; |
| 149 | + |
| 150 | + \node[anchor=south east] at ($ (depths -| right) + (-.1\pagewidth,1cm) $) { |
| 151 | + \begin{varwidth}{.8\pagewidth}% |
| 152 | + \flushright \HUGE\sffamily |
| 153 | + \@author |
| 154 | + \end{varwidth} |
| 155 | + }; |
| 156 | + |
| 157 | + \node[anchor=north east] at ($ (depths -| right) + (-.1\pagewidth,-.5cm) $) { |
| 158 | + \begin{varwidth}{.8\pagewidth}% |
| 159 | + \flushright \huge\sffamily\color{PharoDarkBlue}% |
| 160 | + \ifx\@empty\@series\else\@series\titlebreak\fi |
| 161 | + \@date |
| 162 | + \end{varwidth} |
| 163 | + }; |
| 164 | + |
| 165 | + \begin{pgfonlayer}{background} |
| 166 | + \shade[ |
| 167 | + upper left = Shade, upper right = Shade!25!PharoBlue, |
| 168 | + lower left = LightShade!75!PharoBlue, lower right = LightShade |
| 169 | + ] (stocktopleft) rectangle (depths -| stockbottomright); |
| 170 | + \shade[ |
| 171 | + upper left = LightShade!75!PharoBlue, upper right = LightShade, |
| 172 | + lower left = PharoDarkBlue!75!Shade, lower right = PharoBlue |
| 173 | + ] (depths -| stocktopleft) rectangle (stockbottomright); |
| 174 | + |
| 175 | + \begin{scope}[ |
| 176 | + transform canvas={shift=(beacon)}, |
| 177 | + scale=\beaconscaling] |
| 178 | + |
| 179 | + \pharobeacon@tikz[PharoBlue!75!PharoDarkBlue!75!Shade] |
| 180 | + |
| 181 | + \end{scope} |
| 182 | + \end{pgfonlayer} |
| 183 | + \end{tikzpicture} |
| 184 | + \newpage |
| 185 | +} |
| 186 | + |
| 187 | +\newcommand\pharobeacon@tikz[1][PharoBlue]{ |
| 188 | + % vertical gradient along tower |
| 189 | + \pgfdeclareverticalshading{column}{100bp}{ |
| 190 | + color(0)=(#1); |
| 191 | + color(40)=(#1); |
| 192 | + color(75)=(PharoRed); |
| 193 | + color(100)=(PharoRed)} |
| 194 | + |
112 | 195 | % beacon fire |
113 | 196 | \shade[bottom color=BeaconRed, top color=BeaconOrange] svg { |
114 | 197 | m 68.58,118.36 0,-14.22 22.72,0 0,15.14 -11.16,2.74 -11.56,-3.66 |
|
0 commit comments