% Test for 4-row February layout.
%
% A 4-row February occurs when February has exactly 28 days (non-leap year)
% and the 1st falls on the week-start day (Monday for monday-first).
%
% 2027: Feb 1 is Monday, non-leap year -> 4 rows (monday-first)
%
% This example renders February 2027 in three layouts to verify
% that the grid height adjusts correctly for the 4-row case.

\documentclass[
  year = 2027,
  language = english,
  eventsCsv = ./data/four-row-test-2027.csv,
  imageFolder = ./photos/,
]{wallcalendar}

\makeatletter

\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont{TeX Gyre Pagella}

% === February (4-row month, monday-first) ==================================

\SetPhoto[bleed=3mm, file={obscure-crop}]{February}

\SetQuote[xOffset=0pt, yOffset=-15mm]{February}{%
\raggedleft\setlength{\parskip}{10pt}\Large\color{black!85}%
Four-row February test.\\
Feb 1, 2027 is a Monday (non-leap year).
}

\SetCalendar[]{February}

\SetEvents{February}{%
\semicolonEndTikzCalendar%
\parseMonthMarksNote%
}{%
\raggedright
\parseMonthEvents%
}

% === March (normal 5-row month for comparison) =============================

\SetPhoto[bleed=3mm, file={obscure-crop}]{March}

\SetQuote[xOffset=0pt, yOffset=-15mm]{March}{%
\raggedleft\setlength{\parskip}{10pt}\Large\color{black!85}%
Normal 5-row month for comparison.
}

\SetCalendar[]{March}

\SetEvents{March}{%
\semicolonEndTikzCalendar%
\parseMonthMarksNote%
}{%
\raggedright
\parseMonthEvents%
}

\makeatother

\begin{document}

% Full page layout
\MonthPage[layout=full page, put photo=full page]{February}

% Small landscape layout
\MonthPage[layout=small landscape, put photo=full width]{February}

% Photo and notes layout
\MonthPage[layout=photo and notes, put photo=full page]{February}

% Normal month for comparison
\MonthPage[layout=small landscape, put photo=full width]{March}

\end{document}
