add sb2nov theme

This commit is contained in:
Sina Atalay 2024-02-15 18:13:04 +01:00
parent 60ef29e59c
commit 0a4583dce0
12 changed files with 194 additions and 0 deletions

View File

View File

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Sourabh Bajaj
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,86 @@
%-------------------------
% Resume in Latex
% Author : Sourabh Bajaj
% License : MIT
%------------------------
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{tabularx}
\input{glyphtounicode}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}]
% Ensure that generate pdf is machine readable/ATS parsable
\pdfgentounicode=1
%-------------------------
% Custom commands
\newcommand{\resumeItem}[2]{
\item\small{
\textbf{#1}{: #2 \vspace{-2pt}}
}
}
% Just in case someone needs a heading that does not need to be in a list
\newcommand{\resumeHeading}[4]{
\begin{tabular*}{0.99\textwidth}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeSubheading}[4]{
\vspace{-1pt}\item
\begin{tabular*}{0.97\textwidth}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeSubSubheading}[2]{
\begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
\textit{\small#1} & \textit{\small #2} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}
\renewcommand{\labelitemii}{$\circ$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}

View File

View File

@ -0,0 +1,86 @@
from typing import Literal, Annotated
import pydantic
LaTeXDimension = Annotated[
str,
pydantic.Field(
pattern=r"\d+\.?\d* *(cm|in|pt|mm|ex|em)",
),
]
class Sb2novThemeOptions(pydantic.BaseModel):
""" """
model_config = pydantic.ConfigDict(extra="forbid")
theme: Literal["sb2nov"]
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
default="10pt",
title="Font Size",
description='The font size of the CV. The default value is "10pt".',
examples=["10pt", "11pt", "12pt"],
)
page_size: Literal["a4paper", "letterpaper"] = pydantic.Field(
default="a4paper",
title="Page Size",
description='The page size of the CV. The default value is "a4paper".',
examples=["a4paper", "letterpaper"],
)
color: (
Literal["blue"]
| Literal["black"]
| Literal["burgundy"]
| Literal["green"]
| Literal["grey"]
| Literal["orange"]
| Literal["purple"]
| Literal["red"]
) = pydantic.Field(
default="blue",
validate_default=True,
title="Primary Color",
description='The primary color of the CV. The default value is "blue".',
examples=[
"blue",
"black",
"burgundy",
"green",
"grey",
"orange",
"purple",
"red",
],
)
date_width: LaTeXDimension = pydantic.Field(
default="3.8 cm",
validate_default=True,
title="Date and Location Column Width",
description='The width of the date column. The default value is "3.8 cm".',
)
content_scale: float = pydantic.Field(
default=0.75,
title="Content Scale",
description=(
"The scale of the content with respect to the page size. The default value"
' is "0.75".'
),
)
show_only_years: bool = pydantic.Field(
default=False,
title="Show Only Years",
description=(
'If "True", only the years will be shown in the date column. The default'
' value is "False".'
),
)
disable_page_numbers: bool = pydantic.Field(
default=False,
title="Disable Page Numbers",
description=(
'If "True", the page numbers will be disabled. The default value is'
' "False".'
),
)