|
| 1 | +% dfetch cover page |
| 2 | +% |
| 3 | +% \input{dfetch_cover} is called from latex_elements['maketitle'] in conf.py. |
| 4 | +% |
| 5 | +% Prerequisites (declared in the preamble via latex_elements): |
| 6 | +% packages : tikz, xcolor, fontspec, graphicx |
| 7 | +% colours : dfetchCoverTop, dfetchCoverDark, dfetchCoverBottom, |
| 8 | +% dfetchCoverAccent, dfetchCoverLight |
| 9 | +% fontface : \PoiretOne (\newfontface from fontspec) |
| 10 | +% |
| 11 | +\begin{titlepage} |
| 12 | +\thispagestyle{empty} |
| 13 | +\begin{tikzpicture}[remember picture, overlay] |
| 14 | + |
| 15 | + % ------------------------------------------------------------------ % |
| 16 | + % BACKGROUND SECTIONS % |
| 17 | + % ------------------------------------------------------------------ % |
| 18 | + |
| 19 | + % Top 60 % — Slate Dark (#3a6682, --accent-dark) |
| 20 | + \fill[dfetchCoverTop] |
| 21 | + (current page.north west) rectangle |
| 22 | + ([yshift=0.4\paperheight]current page.south east); |
| 23 | + |
| 24 | + % Middle 20 % — Near Black (#1c1917, --text) |
| 25 | + \fill[dfetchCoverDark] |
| 26 | + ([yshift=0.2\paperheight]current page.south west) rectangle |
| 27 | + ([yshift=0.4\paperheight]current page.south east); |
| 28 | + |
| 29 | + % Bottom 20 % — Amber Orange (#c2620a, --primary) |
| 30 | + \fill[dfetchCoverBottom] |
| 31 | + (current page.south west) rectangle |
| 32 | + ([yshift=0.2\paperheight]current page.south east); |
| 33 | + |
| 34 | + % ------------------------------------------------------------------ % |
| 35 | + % TOP SECTION: GRID PATTERN % |
| 36 | + % ------------------------------------------------------------------ % |
| 37 | + \begin{scope} |
| 38 | + \clip (current page.north west) rectangle |
| 39 | + ([yshift=0.4\paperheight]current page.south east); |
| 40 | + |
| 41 | + % Vertical lines |
| 42 | + \foreach \i in {1,2,...,14}{ |
| 43 | + \pgfmathsetmacro{\xfrac}{\i/15} |
| 44 | + \draw[dfetchCoverAccent!60!dfetchCoverTop, line width=0.3pt, opacity=0.30] |
| 45 | + ([xshift=\xfrac\paperwidth]current page.south west) -- |
| 46 | + ([xshift=\xfrac\paperwidth]current page.north west); |
| 47 | + } |
| 48 | + |
| 49 | + % Horizontal lines |
| 50 | + \foreach \i in {1,2,...,8}{ |
| 51 | + \pgfmathsetmacro{\yfrac}{0.4 + \i * 0.075} |
| 52 | + \draw[dfetchCoverAccent!60!dfetchCoverTop, line width=0.3pt, opacity=0.30] |
| 53 | + ([yshift=\yfrac\paperheight]current page.south west) -- |
| 54 | + ([yshift=\yfrac\paperheight]current page.south east); |
| 55 | + } |
| 56 | + |
| 57 | + % Sparse node dots at grid intersections |
| 58 | + \foreach \xi in {1,3,5,7,9,11,13}{ |
| 59 | + \foreach \yi in {1,3,5,7}{ |
| 60 | + \pgfmathsetmacro{\xdot}{\xi/15} |
| 61 | + \pgfmathsetmacro{\ydot}{0.4 + \yi * 0.075} |
| 62 | + \fill[dfetchCoverLight, opacity=0.22] |
| 63 | + ([xshift=\xdot\paperwidth, yshift=\ydot\paperheight]current page.south west) |
| 64 | + circle (1.5pt); |
| 65 | + } |
| 66 | + } |
| 67 | + \end{scope} |
| 68 | + |
| 69 | + % ------------------------------------------------------------------ % |
| 70 | + % TOP SECTION: LOGO (off-centre, right side of blue area) % |
| 71 | + % ------------------------------------------------------------------ % |
| 72 | + \node[anchor=center, opacity=0.90] |
| 73 | + at ([xshift=0.70\paperwidth, yshift=0.65\paperheight]current page.south west) |
| 74 | + {\includegraphics[width=0.35\paperwidth]{dfetch_logo.png}}; |
| 75 | + |
| 76 | + % ------------------------------------------------------------------ % |
| 77 | + % ACCENT RULE (Amber Orange, top edge of middle band) % |
| 78 | + % ------------------------------------------------------------------ % |
| 79 | + \draw[dfetchCoverBottom, line width=2.5pt] |
| 80 | + ([yshift=0.4\paperheight]current page.south west) -- |
| 81 | + ([yshift=0.4\paperheight]current page.south east); |
| 82 | + |
| 83 | + % ------------------------------------------------------------------ % |
| 84 | + % MIDDLE BAND: TITLE BLOCK % |
| 85 | + % ------------------------------------------------------------------ % |
| 86 | + |
| 87 | + % "User Manual" eyebrow |
| 88 | + \node[anchor=base west, text=dfetchCoverAccent, |
| 89 | + font={\sffamily\itshape\fontsize{10}{12}\selectfont}, |
| 90 | + inner sep=0pt] |
| 91 | + at ([xshift=1.4cm, yshift=0.375\paperheight]current page.south west) |
| 92 | + {User Manual}; |
| 93 | + |
| 94 | + % Main title — Poiret One |
| 95 | + \node[anchor=base west, text=dfetchCoverLight, |
| 96 | + font={\PoiretOne\fontsize{30}{34}\selectfont}, |
| 97 | + inner sep=0pt] |
| 98 | + at ([xshift=1.4cm, yshift=0.318\paperheight]current page.south west) |
| 99 | + {DFetch}; |
| 100 | + |
| 101 | + % Subtitle |
| 102 | + \node[anchor=base west, text=dfetchCoverAccent, |
| 103 | + font={\sffamily\fontsize{13}{16}\selectfont}, |
| 104 | + inner sep=0pt] |
| 105 | + at ([xshift=1.4cm, yshift=0.263\paperheight]current page.south west) |
| 106 | + {Vendor dependencies without the pain.}; |
| 107 | + |
| 108 | + % Thin amber accent rule under subtitle |
| 109 | + \draw[dfetchCoverBottom, line width=1.5pt] |
| 110 | + ([xshift=1.4cm, yshift=0.238\paperheight]current page.south west) -- |
| 111 | + ([xshift=0.60\paperwidth, yshift=0.238\paperheight]current page.south west); |
| 112 | + |
| 113 | + % ------------------------------------------------------------------ % |
| 114 | + % BOTTOM SECTION: DOTTED PATTERN % |
| 115 | + % ------------------------------------------------------------------ % |
| 116 | + \begin{scope} |
| 117 | + \clip (current page.south west) rectangle |
| 118 | + ([yshift=0.2\paperheight]current page.south east); |
| 119 | + \foreach \xi in {1,2,...,19}{ |
| 120 | + \foreach \yi in {1,2,3,4}{ |
| 121 | + \pgfmathsetmacro{\xdot}{\xi/20} |
| 122 | + \pgfmathsetmacro{\ydot}{\yi * 0.038} |
| 123 | + \fill[dfetchCoverLight, opacity=0.15] |
| 124 | + ([xshift=\xdot\paperwidth, yshift=\ydot\paperheight]current page.south west) |
| 125 | + circle (1.2pt); |
| 126 | + } |
| 127 | + } |
| 128 | + \end{scope} |
| 129 | + |
| 130 | + % ------------------------------------------------------------------ % |
| 131 | + % BOTTOM SECTION: FOOTER % |
| 132 | + % ------------------------------------------------------------------ % |
| 133 | + \node[anchor=south west, text=dfetchCoverLight, |
| 134 | + font={\sffamily\fontsize{10}{12}\selectfont}, |
| 135 | + inner sep=0pt] |
| 136 | + at ([xshift=1.4cm, yshift=0.9cm]current page.south west) |
| 137 | + {dfetch-org $\cdot$ \py@release}; |
| 138 | + |
| 139 | + \node[anchor=south east, text=dfetchCoverLight, |
| 140 | + font={\sffamily\fontsize{10}{12}\selectfont}, |
| 141 | + inner sep=0pt] |
| 142 | + at ([xshift=-1.4cm, yshift=0.9cm]current page.south east) |
| 143 | + {User Manual}; |
| 144 | + |
| 145 | +\end{tikzpicture} |
| 146 | +\null |
| 147 | +\end{titlepage} |
0 commit comments