Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make dot colors configurable #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type RenderBlock struct {
type Colors struct {
Gray string
LightGray string
Dots string
}

type Layout struct {
Expand Down
1 change: 1 addition & 0 deletions cfg/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ layout:
colors:
gray: gray
lightgray: gray!50
dots: gray
5 changes: 3 additions & 2 deletions tpls/macro.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
\newcommand{\myDailySpring}{ {{- $lengths.DailySpring -}} }
\newcommand{\myColorGray}{ {{- .Cfg.Layout.Colors.Gray -}} }
\newcommand{\myColorLightGray}{ {{- .Cfg.Layout.Colors.LightGray -}} }
\newcommand{\myColorDots}{ {{- .Cfg.Layout.Colors.Dots -}} }

\newcommand{\myLinePlain}{\hrule width \linewidth height \myLenLineThicknessDefault}
\newcommand{\myLineThick}{\hrule width \linewidth height \myLenLineThicknessThick}
Expand All @@ -76,7 +77,7 @@
\newcommand{\myTodo}{\myLineHeightButLine$\square$\myLinePlain}
\newcommand{\myTodoLineGray}{\myLineHeightButLine$\square$\myLineGray}

\newcommand{\myDotGrid}[2]{\leavevmode\multido{\dC=0mm+5mm}{#1}{\multido{\dR=0mm+5mm}{#2}{\put(\dR,\dC){\circle*{0.1}}}}}
\newcommand{\myDotGrid}[2]{\leavevmode\multido{\dC=0mm+5mm}{#1}{\multido{\dR=0mm+5mm}{#2}{\put(\dR,\dC){\color{\myColorDots}\circle*{0.1}}}}}

\newcommand{\myMash}[3][]{
{{- if $.Cfg.Dotted -}} \vskip\myLenLineHeightButLine#1\myDotGrid{#2}{#3} {{- else -}} \Repeat{#2}{\myLineGrayVskipTop} {{- end -}}
Expand All @@ -88,4 +89,4 @@
\else
\dimexpr\pagegoal-\pagetotal-\lineskip-9.4pt\relax
\fi%
}
}