renderer: update BulletEntry

This commit is contained in:
Sina Atalay 2024-05-19 17:38:55 +03:00
parent 039c2bd74f
commit ff8f5de20d
13 changed files with 82 additions and 27 deletions

View File

@ -132,7 +132,9 @@ class LaTeXFile(TemplatedFile):
sections: list[tuple[str, list[str], str]] = []
for section in self.cv.sections:
section_beginning = self.template(
"SectionBeginning", section_title=section.title
"SectionBeginning",
section_title=section.title,
entry_type=section.entry_type,
)
entries: list[str] = []
for i, entry in enumerate(section.entries):
@ -143,10 +145,15 @@ class LaTeXFile(TemplatedFile):
section.entry_type,
entry=entry,
section_title=section.title,
entry_type=section.entry_type,
is_first_entry=is_first_entry,
)
)
section_ending = self.template("SectionEnding", section_title=section.title)
section_ending = self.template(
"SectionEnding",
section_title=section.title,
entry_type=section.entry_type,
)
sections.append((section_beginning, entries, section_ending))
return preamble, header, sections
@ -255,7 +262,9 @@ class MarkdownFile(TemplatedFile):
sections: list[tuple[str, list[str]]] = []
for section in self.cv.sections:
section_beginning = self.template(
"SectionBeginning", section_title=section.title
"SectionBeginning",
section_title=section.title,
entry_type=section.entry_type,
)
entries: list[str] = []
for i, entry in enumerate(section.entries):
@ -268,6 +277,7 @@ class MarkdownFile(TemplatedFile):
section.entry_type,
entry=entry,
section_title=section.title,
entry_type=section.entry_type,
is_first_entry=is_first_entry,
)
)

View File

@ -1,7 +1 @@
((* if not is_first_entry *))
\vspace{<<design.margins.entry_area.vertical_between>>}
((* endif *))
\begin{onecolentry}
\textbullet \hspace{3pt} <<entry.bullet>>
\end{onecolentry}
\item <<entry.bullet>>

View File

@ -122,6 +122,18 @@
\end{itemize}
} % new environment for highlights
\newenvironment{highlightsforbulletentries}{
\begin{itemize}[
topsep=<<design.margins.highlights_area.top>>,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
leftmargin=10pt
]
}{
\end{itemize}
} % new environment for highlights for bullet entries
\newenvironment{onecolentry}{
\begin{adjustwidth}{

View File

@ -1 +1,6 @@
\section{<<section_title>>}
((* if entry_type == "BulletEntry" *))
\begin{onecolentry}
\begin{highlightsforbulletentries}
((* endif *))

View File

@ -0,0 +1,4 @@
((* if entry_type == "BulletEntry" *))
\end{highlightsforbulletentries}
\end{onecolentry}
((* endif *))

View File

@ -1,7 +1 @@
((* if not is_first_entry *))
\vspace{<<design.margins.entry_area.vertical_between>>}
((* endif *))
\begin{onecolentry}
\textbullet \hspace{3pt} <<entry.bullet>>
\end{onecolentry}
\item <<entry.bullet>>

View File

@ -112,6 +112,18 @@
} % new environment for highlights
\newenvironment{highlightsforbulletentries}{
\begin{itemize}[
topsep=<<design.margins.highlights_area.top>>,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
leftmargin=10pt
]
}{
\end{itemize}
} % new environment for highlights for bullet entries
\newenvironment{onecolentry}{
\begin{adjustwidth}{
<<design.margins.entry_area.left_and_right>> + 0.00001 cm

View File

@ -1 +1,6 @@
\section{<<section_title>>}
((* if entry_type == "BulletEntry" *))
\begin{onecolentry}
\begin{highlightsforbulletentries}
((* endif *))

View File

@ -0,0 +1,4 @@
((* if entry_type == "BulletEntry" *))
\end{highlightsforbulletentries}
\end{onecolentry}
((* endif *))

View File

@ -1,7 +1 @@
((* if not is_first_entry *))
\vspace{<<design.margins.entry_area.vertical_between>>}
((* endif *))
\begin{onecolentry}
$\circ$ <<entry.bullet>>
\end{onecolentry}
\item <<entry.bullet>>

View File

@ -111,6 +111,18 @@
\end{itemize}
} % new environment for highlights
\newenvironment{highlightsforbulletentries}{
\begin{itemize}[
topsep=<<design.margins.highlights_area.top>>,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
leftmargin=10pt
]
}{
\end{itemize}
} % new environment for highlights for bullet entries
\newenvironment{onecolentry}{
\begin{adjustwidth}{

View File

@ -1 +1,6 @@
\section{<<section_title>>}
((* if entry_type == "BulletEntry" *))
\begin{onecolentry}
\begin{highlightsforbulletentries}
((* endif *))

View File

@ -0,0 +1,4 @@
((* if entry_type == "BulletEntry" *))
\end{highlightsforbulletentries}
\end{onecolentry}
((* endif *))