\documentclass{book}

\usepackage[explicit]{titlesec}

\usepackage[margin = 2cm]{geometry}
\usepackage{enumitem}
\usepackage{tikz}
\usepackage[table]{xcolor}
\usepackage{color}
\usepackage{array,tabularx}

\usepackage{varwidth}
\usepackage[most,breakable,skins,theorems]{tcolorbox}
\usepackage{fontawesome5}
\usepackage{pifont}

\usepackage{fancyhdr,fancyvrb}
\usepackage{tocloft}
%图片相关宏包
\usepackage{graphicx} % 用于插入图片
\usepackage{caption} % 用于添加标题
\usepackage{subcaption} % 使用子图
%正文Times New Roman字体的宏包
\usepackage{times}
\usepackage{fontspec}
\setmainfont{Times New Roman}
%表格相关宏包
\usepackage{etoolbox}
\usepackage{longtable}
\usepackage{multirow}
%结尾的glossary
\usepackage{multicol}
%插入空白页命令宏包
\usepackage{afterpage}
%文本对齐方式
\usepackage{ragged2e}


\newcommand{\blacksquare}{\textcolor{black}{\rule{4pt}{4pt}}} % 定义黑色小正方形
%%==================================%%
%%          全局基本配置             %%
%%==================================%%
\setlength{\parskip}{1ex} % 设置段落间距为2ex
%%==================================%%
%%            全局目录设置           %%
%%==================================%%
\renewcommand{\contentsname}{
	\begin{center}\textbf{Table of Contents}  \end{center}%
}
%%%%%%%%%%%%%目录中章节的样式%%%%%%%%%
% 设置目录中章节的格式
\renewcommand{\cftchapfont}{\Large\bfseries}
\renewcommand{\cftchappresnum}{Chapter } % 添加 "Chapter " 前缀
% 设置章节编号后的附加文本为一个破折号和空格
\renewcommand{\cftchapaftersnumb}{\space\space\space\space\space - \space}
\setlength{\cftchapnumwidth}{5em} % 编号宽度，根据需要调整

%%%%%%%%section与subsection目录的样式%%%%
\renewcommand{\cftsecfont}{\bfseries}%设置section字体加粗
\setlength{\cftsecindent}{1.5cm}
\setlength{\cftsubsecindent}{2cm} % 设置子章节标题的缩进为1cm 
\setlength{\cftbeforesecskip}{10pt} % 设置章节与章节之间的间距为12pt
\setlength{\cftbeforesubsecskip}{10pt} % 设置章节与子章节之间的间距为5pt
\setlength{\cftsubsecnumwidth}{2em} % % 设置子章节编号的宽度为2em
\addtocontents{toc}{\protect\setcounter{secnumdepth}{0}}%将section与subsection前的编号删除


%%==================================%%
%%            全局页脚设置           %%
%%==================================%%
%设置页眉为空
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt} % 将页眉横线的宽度设置为0，从而删除横线
\rhead{} % 清空页眉右侧内容
\lhead{} % 清空页眉左侧内容
\cfoot{} % 页脚中间显示页码
% 设置页脚的样式
\fancyfoot[RO,LE]{\scriptsize \copyright zzz}
\fancyfoot[LO,RE]{\scriptsize \leftmark ~ \thepage}
\setlength{\skip\footins}{0.5cm}%脚注与正文之间的间距
\renewcommand{\footnotesize}{}%脚注字体大小

%%==================================%%
%%            参考文献设置           %%
%%==================================%%
% 参考文献，有引入文献时放开！
%\addbibresource[location=local]{reference.bib} 
%设置目录显示等级：3 表示显示 \chapter、\section 和 \subsection 级别的章节。
\setcounter{tocdepth}{3}
%%==================================%%
%%             章节样式              %%
%%==================================%%
\makeatletter
\def\@chapter@description{}
\def\@chapter@objectives{}
%全局章节样式
\titleformat{name = \chapter}{}{}{0em}
{%
    \setlist[itemize]{noitemsep, leftmargin=*, label=}
   \thispagestyle{empty} % 去除页眉页脚
  \begin{tikzpicture}[remember picture, overlay, every node/.style={inner sep = 0pt, outer sep = 0pt}]
    \node[anchor = north west] at ([shift = {(2cm, -2.5cm)}]current page.north west) {\includegraphics[width = .3\textwidth, height = \textheight]{example-image}};
    \fill[gray!50] ([shift = {(3.76cm + .2\textwidth, -2.5cm)}]current page.north west) rectangle ++ (.7\textwidth, -4cm);
    \node[anchor = south west, inner sep = 10pt, scale = 2, font = \bfseries,text width=0.25\textwidth] at ([shift = {(4cm + .2\textwidth, -6.5cm)}]current page.north west) {#1};
    \fill[gray!90] ([shift = {(-2, -2.5)}]current page.north east) rectangle ++ (-1.5, -4);
    \node[rotate = 90, font=\bfseries\Large] (description) at ([shift = {(-2.75, -4.5)}]current page.north east) {\chaptername\ \thechapter};
    \node[anchor = north west, inner sep = 10pt](description) at ([shift = {(4.4cm + .2\textwidth, -6.5cm)}]current page.north west) {
		\parbox{\dimexpr .6\textwidth - 10pt\relax}{
			\begin{justify}
			\setlength{\parskip}{2ex} % 设置段落间距为1ex
			\parindent=2em
			% \raggedright
			\@chapter@description % 章节描述内容
		    \end{justify}
		  }
		};
		\fill[shading=radial, left color=startcolor, right color=stopcolor] ([shift = {(.3, -.5cm)}]description.south west) rectangle ++ (.65\textwidth, -0.8cm);
		\node[anchor = west, inner sep = 10pt, scale = 1, font = \bfseries] at ([shift = {(.2, -.95cm)}]description.south west) {\Large Objectives};
		\node[anchor = west, inner sep = 10pt, scale = 1, font = \bfseries] at ([shift = {(.1, -1.8cm)}]description.south west) {In this chapter,you will learn to:};
		\node[anchor = north west, inner sep = 10pt] at ([shift = {(.1, -1.7cm)}]description.south west) {
		  \begin{minipage}{\dimexpr .8\textwidth - 10pt\relax}
			\parindent=2em
			\@chapter@objectives
		  \end{minipage}
		};
  \end{tikzpicture}
}
\newcommand{\icon}[1]{\raisebox{-0.5ex}{\includegraphics[height=1em]{#1}}}
\NewDocumentEnvironment{fancychapter}{m+m+b}{%
  \def\@chapter@objectives{#3}
  \def\@chapter@description{#2}
  \chapter{#1}
  \newpage
}{}
\makeatother
% 定义渐变色
\definecolor{startcolor}{RGB}{128,128,128} % 起始颜色为黑色
\definecolor{stopcolor}{RGB}{245,245,245} % 结束颜色为白色
%%==================================%%
%%           section样式            %%
%%==================================%%
\titleformat{\section}
{\LARGE\bfseries}
{}
{0pt}
{
\vspace{-1em}
  \begin{tikzpicture}[baseline=(current bounding box.north),draw=none]
    % 定义渐变的宽度和高度
    \path[clip] (-5pt,-10pt) rectangle (\textwidth,1em);
    % 绘制从灰色到白色的水平渐变
    \fill[top color=gray!90, bottom color=gray!10] (-5pt,-10pt) rectangle (\textwidth,35pt);
    % 放置标题文本
    \node[anchor=center, text width=\textwidth, align=center, text=black, inner sep=0pt] at (0.5\textwidth,3pt) {\textbf{\LARGE #1}};
  \end{tikzpicture}
  \vspace{-1.5em}
}
%%==================================%%
%%          subsection样式          %%
%%==================================%%
\titleformat{\subsection}
{\large\bfseries}
{}
{0pt}
{
\vspace{-1em}
  \begin{tikzpicture}[baseline=(current bounding box.north),draw=none]
    % 定义渐变的宽度和高度
    \path[clip] (-5pt,-10pt) rectangle (\textwidth,1em);
    % 绘制从灰色到白色的水平渐变
    \fill[left color=gray!80, right color=white] (-5pt,-10pt) rectangle (\textwidth,20pt);
    % 放置标题文本
    \node[anchor=west, text width=\textwidth, text=black, inner sep=0pt] at (1pt,1pt) {\textbf{\large #1}};
  \end{tikzpicture}
  \vspace{-1.5em}
}



%%==================================%%
%%        图书封面基础信息           %%
%%==================================%%
\title{111}
\author{11}
\date{\today}

\makeatletter
\renewcommand{\verbatim@font}{\addtolength{\parindent}{1cm}\setmainfont{Courier New}\selectfont\fontsize{9pt}{9pt}\selectfont}
\makeatother



\begin{document}

%%==================================%%
%%             封    面             %%
%%==================================%%
% 自动生成封面，无需改动
\maketitle
%%==================================%%
%%             目    录             %%
%%==================================%%
\frontmatter
\pagestyle{empty}
\pagenumbering{gobble}
\tableofcontents
\pagestyle{fancy}
\thispagestyle{empty}
\clearpage
\setcounter{page}{1} %new page
\mainmatter


%%==================================%%
%%             章节内容             %%
%%==================================%%
\begin{fancychapter}{zzz}{
	zzz
	}
	{
	 \begin{itemize}
	 \item zzz
	\end{itemize}
	}
	\end{fancychapter}
	\newpage
	zzzz
	\newpage
	aaaaa
	\newpage
	54581
	\newpage
	54581
	\section{zzzz}
	\subsection{321}
	54581
	\newpage
\begin{Verbatim}
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
	dasdasdasddasdasd
	dasdasdasddasdasdda
	dasdasdasd
	dasdasdasd
	asdsadadasdasdas
	dasdasdasd
\end{Verbatim}
\begin{verbatim}
	dasdasdasd
\end{verbatim}
	\newpage
	54581
	\newpage
	54581

	\newpage
	54581
	\newpage
	54581
	\newpage
	54581
	\newpage
	54581
	\newpage
	54581
	\newpage
	54581




\end{document}