diff --git a/main.py b/main.py index abe2253..0963d2b 100644 --- a/main.py +++ b/main.py @@ -101,6 +101,11 @@ async def get_images(): return {"images": files} +@app.get("/images/{nom_image}") +async def get_image(nom_image: str): + return FileResponse(f"./resources/images/{nom_image}") + + @app.post("/images/") async def ajouter_image(file: UploadFile): """ diff --git a/styles/jevalideca/format_parameters.json b/styles/jevalideca/format_parameters.json index a6de3f3..eec22c9 100644 --- a/styles/jevalideca/format_parameters.json +++ b/styles/jevalideca/format_parameters.json @@ -27,6 +27,20 @@ "stilltime": 2, "extension": "pdf" }, + "lettre_prive": { + "linkcolor": "blue", + "tocdepth": 3, + "pdfengine": "lualatex", + "fontsize": 12, + "paperwidth": 2550, + "paperheight": 3300, + "ratio": 100, + "margin": 255, + "vmargin": 495, + "fps": 15, + "stilltime": 2, + "extension": "pdf" + }, "linkedin": { "linkcolor": "blue", "tocdepth": 2, diff --git a/styles/jevalideca/lettre_prive/cover.tex b/styles/jevalideca/lettre_prive/cover.tex new file mode 100644 index 0000000..187078c --- /dev/null +++ b/styles/jevalideca/lettre_prive/cover.tex @@ -0,0 +1,23 @@ +\newpage + +\thispagestyle{empty} + +\noindent Tu apprécies ? Laisse-moi un commentaire sur mes réseaux sociaux !\newline + +\leavevmode \newline + +\noindent Tous droits réservés\ \newline \the\year{}\ -\ François Pelletier + +\leavevmode \newline + +\noindent Visite mon site web au \url{https://jevalide.ca} et mes réseaux sociaux au \url{https://linktr.ee/jevalideca} + +\leavevmode \newline + +\noindent Publié le \today + +\leavevmode \newline + +\noindent Mise en page effectuée avec \LaTeX et mon logiciel Fabrique à documents + +\pagebreak diff --git a/styles/jevalideca/lettre_prive/fonds_lettre.pdf b/styles/jevalideca/lettre_prive/fonds_lettre.pdf new file mode 100644 index 0000000..a4d679f Binary files /dev/null and b/styles/jevalideca/lettre_prive/fonds_lettre.pdf differ diff --git a/styles/jevalideca/lettre_prive/fonds_lettre.png b/styles/jevalideca/lettre_prive/fonds_lettre.png new file mode 100644 index 0000000..f8bc9fb Binary files /dev/null and b/styles/jevalideca/lettre_prive/fonds_lettre.png differ diff --git a/styles/jevalideca/lettre_prive/fonds_lettre.svg b/styles/jevalideca/lettre_prive/fonds_lettre.svg new file mode 100644 index 0000000..3e24812 --- /dev/null +++ b/styles/jevalideca/lettre_prive/fonds_lettre.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/styles/jevalideca/lettre_prive/header.tex b/styles/jevalideca/lettre_prive/header.tex new file mode 100644 index 0000000..cc1dd88 --- /dev/null +++ b/styles/jevalideca/lettre_prive/header.tex @@ -0,0 +1,51 @@ +\usepackage[french]{babel} % Césure en français +\usepackage[autolanguage]{numprint} + +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} + +\usepackage{xcolor} + +\usepackage{listings} + +\lstset{ + basicstyle=\ttfamily, + numbers=left, + numberstyle=\footnotesize, + stepnumber=2, + numbersep=5pt, + backgroundcolor=\color{black!10}, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2, + captionpos=b, + breaklines=true, + breakatwhitespace=true, + breakautoindent=true, + linewidth=\textwidth +} + +\usepackage{wallpaper} +\makeatletter +\ULCornerWallPaper{1}{./styles/jevalideca/lettre/fonds_lettre.pdf} +\makeatother + +% Override default figure placement To be within the flow of the text rather +% than on it's own page. +\usepackage{float} +\makeatletter +\def\fps@figure{H} +\makeatother + +\usepackage{fontspec} + \setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf} + \setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf} + \setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf} + +\newcommand{\emoji}[1]{ + {\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}} +}