Skip to content

Commit

Permalink
Added summary card explaining the categories
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophNiehoff committed Mar 1, 2023
1 parent 5ef2a4e commit de41233
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
36 changes: 36 additions & 0 deletions tex/categories.tex
Original file line number Diff line number Diff line change
@@ -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}\\%
1 change: 1 addition & 0 deletions tex/lib/constants.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
\definecolor{ColorTNG}{HTML}{2C6AA8}%
%
% Fonts
\newcommand{\detailsfontsize}{\large}%
\newcommand{\textfontsize}{\Large}%
\newcommand{\summaryfontsize}{\huge}%
\newcommand{\valuefontsize}{\Huge}%
13 changes: 9 additions & 4 deletions tex/lib/layout.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tex/single_pages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
$ $\\%
\input{lib/layout.tex}%
\input{coversheet.tex}%
\input{categories.tex}%
\input{../cards.tex}%
\end{document}%

0 comments on commit de41233

Please sign in to comment.