diff --git a/tex/categories.tex b/tex/categories.tex new file mode 100644 index 0000000..ef058f3 --- /dev/null +++ b/tex/categories.tex @@ -0,0 +1,36 @@ +% © 2022,2023 TNG Technology Consulting +% +% SPDX-License-Identifier: Apache-2.0 +% +\newcommand{\Category}[4]{% + % Card value and icon + \node[text width=(\cardwidth-2*\textpadding)*1cm,below right,inner sep=0, align=left] at (0.1*\cardwidth,#1*\cardheight)% + {% + \includegraphics[width=1cm]{#2} + };% + \node[text width=(\cardwidth-2*\textpadding)*1cm,below right,inner sep=0, align=left] at (0.3*\cardwidth,#1*\cardheight-0.03*\cardheight)% + {% + {\textfontsize{\textbf{#3}}} + };% + \node[text width=(\cardwidth-2*\textpadding)*1cm,below right,inner sep=0, align=right] at (0.1*\cardwidth,#1*\cardheight-0.08*\cardheight)% + {% + {\detailsfontsize{#4}} + };% +}% +% +\begin{tikzpicture}% + \begin{scope}[xshift=0, yshift=0, local bounding box=scopeAinner]% + \clip [rounded corners=0] (0, 0) rectangle ++(\cardwidth,\cardheight);% + % + \Frame + \Category{0.96}{\IconAccessSecrets}{\CategoryAccessSecrets}{Threats related to IAM and secrets management} + \Category{0.75}{\IconDelivery}{\CategoryDelivery}{Build and ship software, and its supply chain} + \Category{0.55}{\IconRecovery}{\CategoryRecovery}{Backup and restore} + \Category{0.375}{\IconMonitoring}{\CategoryMonitoring}{Logs, alerts and traceability} + \Category{0.2}{\IconResources}{\CategoryResources}{Threats to resources and their configuration} + % \CoverTitle + % \CoverVersion + % \CoverLogo + % \CoverLicense + \end{scope}% +\end{tikzpicture}\\% diff --git a/tex/lib/constants.tex b/tex/lib/constants.tex index 4a2a324..16bc5f5 100644 --- a/tex/lib/constants.tex +++ b/tex/lib/constants.tex @@ -20,6 +20,7 @@ \definecolor{ColorTNG}{HTML}{2C6AA8}% % % Fonts +\newcommand{\detailsfontsize}{\large}% \newcommand{\textfontsize}{\Large}% \newcommand{\summaryfontsize}{\huge}% \newcommand{\valuefontsize}{\Huge}% diff --git a/tex/lib/layout.tex b/tex/lib/layout.tex index 8482041..07e91d4 100644 --- a/tex/lib/layout.tex +++ b/tex/lib/layout.tex @@ -41,6 +41,14 @@ {\ifthenelse{\equal{#1}{A}}{ace}% {}}}}}}}}}}}}}}% % +% +\newcommand{\Frame}{% + % Outer bounding box + \draw[rounded corners=0] (0,0) rectangle (\cardwidth,\cardheight);% + % Inner bounding box + \draw[rounded corners=\cardroundingradius] (0.04*\cardwidth,0.02*\cardheight) rectangle (0.96*\cardwidth,0.98*\cardheight);% +}% +% % Card background \newcommand{\Background}[2]{% % Background fill @@ -50,10 +58,7 @@ {% \rotatebox{45}{\resizebox{!}{10cm}{\Huge \textbf{\color{#1!55} #2}}}% };% - % Outer bounding box - \draw[rounded corners=0] (0,0) rectangle (\cardwidth,\cardheight);% - % Inner bounding box - \draw[rounded corners=\cardroundingradius] (0.04*\cardwidth,0.02*\cardheight) rectangle (0.96*\cardwidth,0.98*\cardheight);% + \Frame }% % % Card category & values diff --git a/tex/single_pages.tex b/tex/single_pages.tex index ab0f58b..bcb1806 100644 --- a/tex/single_pages.tex +++ b/tex/single_pages.tex @@ -11,5 +11,6 @@ $ $\\% \input{lib/layout.tex}% \input{coversheet.tex}% +\input{categories.tex}% \input{../cards.tex}% \end{document}%