Modify title/head in moderncv (\moderncvstyle{classic})

moderncvtitles

Hi I produced the following output with moderncv:
enter image description here

but, I would like the following one:

enter image description here

Would you be so nice to tell me what I can modify in my code please? Otherwise, could you propose another solution to reach the desired layout please?

\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[11pt,a4paper,sans]{moderncv} 
\moderncvstyle{classic}
\moderncvcolor{blue2} 
\usepackage{etoolbox} 
\usepackage[scale=0.8]{geometry}

\usepackage{selinput}
\SelectInputMappings{%
  adieresis={ä},
  eacute={é},
  Lcaron={Ľ},
}

\usepackage[symbol,bottom]{footmisc}



\makeatletter
\renewcommand*{\makecvtitle}{
\recomputecvlengths
\def\phonesdetails{}
\collectionloop{phones}{
\protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}
\def\socialsdetails{}
\collectionloop{socials}{
\protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}
\newbox{\makecvtitledetailsbox}
\savebox{\makecvtitledetailsbox}{
\addressfont\color{color2}
\begin{tabular}{p{0.25\linewidth}p{0.25\linewidth}}
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet
& 
\phonesdetails 
\\
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}
&   
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}
\\
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}
&\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}
 \socialsdetails
 \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}
\end{tabular}}
\newbox{\makecvtitlepicturebox}
\savebox{\makecvtitlepicturebox}{
\ifthenelse{\isundefined{\@photo}}
 {
    \@initializelength{\makecvtitlepicturewidth}
    \settowidth{\makecvtitlepicturewidth}{0pt}
  }
  {
   \setlength\fboxrule{\@photoframewidth}
   \ifdim\@photoframewidth=0pt
     \setlength{\fboxsep}{0pt}\fi
   {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}
    \@initializelength{\makecvtitlepicturewidth}
    \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}
  }
{\raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}
\\[-.35em]
\ifthenelse{\equal{\@title}{}}{}{\\[1em]\null\hfill\titlestyle{\@title}}\\[0.5em]
\usebox{\makecvtitledetailsbox}
\hfill\usebox{\makecvtitlepicturebox}
    \parbox[b]{\textwidth-\makecvtitlepicturewidth}{}
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%
\par}%
\makeatother


\title{super mega manager of all R\&D departments, with many years of experience in e-commerce, administration and HR}
\name{John}{Doe}
\address{Street St., 167}{8888 Town}{Country}
\phone{+1~(234)~567~890}
\email{[email protected]}  
\social[linkedin][www.linkedin.com/in/marc.zuck/]{marc the manager} 
\photo[150pt][0pt]{pictures/picture} 



\let\originalrecomputecvlengths\recomputecvlengths
\renewcommand*{\recomputecvlengths}{
\originalrecomputecvlengths
\setlength{\quotewidth}{0.8\textwidth}}

\usepackage{ragged2e} 
\renewcommand*{\quotefont}{\large\slshape\justifying}
\renewcommand{\quotestyle}[1]{\quotefont\color{color1}#1}

\quote{this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote}

\begin{document}

\makecvtitle % Print the CV title

\end{document}

Anyone who can help here please ?

Best Answer

This approach uses minipages to organize header elements.

a

% !TeX TS-program = pdflatex

\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[11pt,a4paper,sans]{moderncv} 
\moderncvstyle{classic}
\moderncvcolor{blue} 

\usepackage[scale=0.8]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{ragged2e} 

\usepackage{showframe} % show margin <<<<<<<<<<<<<<<<<<<<<

\makeatletter
\renewcommand*{\makecvhead}{% changed <<<<<<<<<<<<<<<<<<<<<<
    \recomputecvlengths
    \def\phonesdetails{}
    \collectionloop{phones}{
    \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}
    \def\socialsdetails{}
    \collectionloop{socials}{
    \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}
    \newlength{\leftside}
    \setlength{\leftside}{0.95\textwidth-\@photowidth}
    \begin{minipage}{\leftside}{%
        \raggedright\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}
        \vspace*{2em}\\
        \titlestyle{\@title}
        \vspace*{2em}\\ 
        \addressfont\color{color2}
        \begin{tabular}{p{0.5\leftside}p{0.45\leftside}}
            \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet
            & 
            \phonesdetails 
            \\
            \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}
            &   
            \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}
            \\
            \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}
            &\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}
            \socialsdetails
            \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}
        \end{tabular}           
    \end{minipage}\hfill
    \begin{minipage}{%
            \@photowidth}{\includegraphics[width=\@photowidth]{\@photo}}
    \end{minipage}\vspace*{2em}\\
    \ifthenelse{\isundefined{\@quote}}%
        {}%
        {\begin{minipage}{%
                \quotewidth}\centering\quotestyle{\@quote}
        \end{minipage}\vspace*{2em}\\
        }%
}% end makecvhead
\makeatother

\title{super mega manager of all R\&D departments, with many years of experience in e-commerce, administration and HR}
\name{John}{Doe}
\address{Street St., 167}{8888 Town}{Country}
\phone{+1~(234)~567~890}
\email{[email protected]}  
\social[linkedin][www.linkedin.com/in/marc.zuck/]{marc the manager} 
\photo[150pt][0pt]{picture} 

\renewcommand*{\recomputecvheadlengths}{%
\setlength{\quotewidth}{0.8\textwidth}}
\renewcommand*{\quotefont}{\large\slshape\justifying}
\renewcommand{\quotestyle}[1]{\quotefont\color{color1}#1}

\quote{This is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote, this is a very long quote}


\begin{document}    

\makecvtitle

Some other text

\end{document}

If the photo is not present, use \photo[0pt][0pt]{picture}