\documentclass{article}
\usepackage[czech]{babel}
\usepackage{geometry}
\geometry{a4paper, margin=2cm}
\usepackage{enumitem}
\usepackage{parskip}
\usepackage{nopageno}
\usepackage{xcolor}
\usepackage[enable]{darkmode}
\usepackage{mdframed}
\usepackage{lmodern}
\usepackage[fixed]{fontawesome5}
\usepackage{lipsum}

\usepackage{titlesec}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}

\definecolor{WPP}{HTML}{00FFFF} %cyan
\definecolor{WPP}{HTML}{0066CC} %blue
\definecolor{WPP}{HTML}{C9A12A} %gold
\definecolor{WPP}{HTML}{EC2B2B} %red

\setlist[itemize]{label=\textcolor{WPP}{$\hookrightarrow$}} %\textbullet \faGreaterThan

\definecolor{DP}{HTML}{293133}

\NewDocumentCommand{\wextbf}{m}{%
	{\subsection*{\vspace{-6pt}\hspace{-7pt}\noindent\colorbox{WPP}{\color{DP}{#1}}}}
}

\NewDocumentCommand{\textbw}{m}{%
	{\color{WPP}{#1}}
}

\NewDocumentCommand{\wemph}{m}{%
	{\color{WPP}\emph{#1}}
}

\NewDocumentCommand{\mysection}{m m}{%
	\setlength\fboxsep{4pt} % spacing around box contents
	\section*{\colorbox{DP}{\makebox[\dimexpr\textwidth-2\fboxsep\relax]{\color{WPP}#1\hfill#2}}}\vspace{-3pt}
}

\NewDocumentCommand{\waybox}{m m}{%
\begin{mdframed}[backgroundcolor=DP,%
	linecolor=WPP,%
	linewidth=2pt,%
	innertopmargin=5pt,%
	innerbottommargin=5pt,%
	innerleftmargin=5pt,%
	innerrightmargin=5pt]\color{white}%
	\wextbf{#1}\par%
	#2%
\end{mdframed}%
}

\NewDocumentCommand{\wayitem}{m m}{%
\begin{itemize}[leftmargin=*]\setlength\itemsep{#2}%
	#1%
\end{itemize}%
}

\NewDocumentCommand{\wtem}{m}{%
\item \textbw{#1} --%
}

\begin{document}\fontsize{10pt}{10pt}\selectfont\setlength\parindent{0em}
	\mysection{Section1}{template darkmode with block function}
	\waybox{Subsection1}{
	\lipsum[1]}
	\waybox{Subsection2}{
		Some basically random text, but with emphasis \wemph{here} amd \wemph{there}.
		\wayitem{
		\wtem{Item1} something something
		\wtem{Item2} something else
		}{-4pt}}
	\mysection{Section2}{}
	\waybox{Another subsection}{
	\lipsum[2]
	\wayitem{
	\wtem{Something} something
	\wtem{Else} else
	}{-4pt}}
\end{document}
