Skip to content

Commit

Permalink
Merge pull request #14 from kudrykv/dotted
Browse files Browse the repository at this point in the history
Dotted
  • Loading branch information
kudrykv committed Nov 25, 2021
2 parents 6904162 + 6ac5d8f commit c5cb61a
Show file tree
Hide file tree
Showing 33 changed files with 322 additions and 213 deletions.
2 changes: 1 addition & 1 deletion app/components/cal/day.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (d Day) Breadcrumb(prefix string, leaf string, shorten bool) string {
header.NewIntItem(d.Time.Year()),
header.NewTextItem("Q" + strconv.Itoa(int(math.Ceil(float64(d.Time.Month())/3.)))),
header.NewMonthItem(d.Time.Month()).Shorten(shorten),
header.NewTextItem(wpref + "Week " + strconv.Itoa(wn)),
header.NewTextItem("Week " + strconv.Itoa(wn)).RefPrefix(wpref),
}

if len(leaf) > 0 {
Expand Down
6 changes: 5 additions & 1 deletion app/components/note/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ func (n Note) Breadcrumb() string {
}.Table(true)
}

func (n Note) PrevNext() header.Items {
func (n Note) PrevNext(notes int) header.Items {
items := header.Items{}

if n.Number > 1 {
items = append(items, header.NewTextItem("Note "+strconv.Itoa(n.Number-1)))
}

if n.Number < notes {
items = append(items, header.NewTextItem("Note "+strconv.Itoa(n.Number+1)))
}

return items
}

Expand Down
8 changes: 5 additions & 3 deletions app/compose/notes_indexed.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NotesIndexed(cfg config.Config, tpls []string) (page.Modules, error) {
"HeadingMOS": indexPage.HeadingMOS(idx+1, len(index.Pages)),
"SideQuarters": year.SideQuarters(0),
"SideMonths": year.SideMonths(0),
"Extra": index.PrevNext(idx),
"Extra": index.PrevNext(idx).WithTopRightCorner(cfg.ClearTopRightCorner),
"Extra2": extra2(cfg.ClearTopRightCorner, false, true, nil, 0),
},
})
Expand All @@ -39,8 +39,10 @@ func NotesIndexed(cfg config.Config, tpls []string) (page.Modules, error) {
"HeadingMOS": nt.HeadingMOS(idxPage),
"SideQuarters": year.SideQuarters(0),
"SideMonths": year.SideMonths(0),
"Extra": nt.PrevNext().WithTopRightCorner(cfg.ClearTopRightCorner),
"Extra2": extra2(cfg.ClearTopRightCorner, false, false, nil, idxPage+1),
"Extra": nt.
PrevNext(cfg.Layout.Numbers.NotesOnPage * cfg.Layout.Numbers.NotesIndexPages).
WithTopRightCorner(cfg.ClearTopRightCorner),
"Extra2": extra2(cfg.ClearTopRightCorner, false, false, nil, idxPage+1),
},
})
}
Expand Down
6 changes: 6 additions & 0 deletions app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ type Config struct {

Year int `env:"PLANNER_YEAR"`
WeekStart time.Weekday
Dotted bool
CalAfterSchedule bool
ClearTopRightCorner bool
AMPMTime bool
AddLastHalfHour bool

Pages Pages

Expand Down Expand Up @@ -83,6 +86,9 @@ type Numbers struct {
IndexMeetingNotes int
NotesIndexPages int
NotesOnPage int
DotHeightFull int
DotWidthFull int
DotWidthTwoThirds int
}

type Paper struct {
Expand Down
4 changes: 4 additions & 0 deletions app/config/lengths.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ type Lengths struct {
LineHeightButLine string
TwoColSep string
TriColSep string
FiveColSep string
MonthlyCellHeight string
NotesIndexCellHeight string
HeaderResizeBox string
HeaderSideCellHeight string
HeaderSideQuartersWidth string
HeaderSideMonthsWidth string
QuarterlySpring string
MonthlySpring string
DailySpring string
}
24 changes: 16 additions & 8 deletions cfg/base.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
weekstart: 1
ampmtime: false
dotted: true
calafterschedule: false
addlasthalfhour: true

layout:
paper:
Expand All @@ -18,20 +21,23 @@ layout:

numbers:
arraystretch: 1.5
quarterlylines: 12
quarterlylines: 36
weeklylines: 11
dailytodos: 15
dailynotes: 18
dailytodos: 8
dailynotes: 25
dailypersonal: 6
dailybottomhour: 6
dailytophour: 22
dailybottomhour: 7
dailytophour: 23
dailydiarygoals: 10
dailydiarygrateful: 10
dailydiarybest: 11
dailydiarylog: 35
dailydiarygrateful: 4
dailydiarybest: 4
dailydiarylog: 24
todolinesintodopage: 10
notesindexpages: 3
notesonpage: 35
dotheightfull: 36
dotwidthfull: 30
dotwidthtwothirds: 20

lengths:
tabcolsep: 3.5pt
Expand All @@ -40,11 +46,13 @@ layout:
lineheightbutline: \dimexpr5mm-.4pt
twocolsep: 5pt
tricolsep: 5pt
fivecolsep: 5pt
monthlycellheight: 55pt
notesindexcellheight: 1.37cm
headerresizebox: 6mm
headersidequarterswidth: 4cm
headersidemonthswidth: 14.5cm
dailyspring: \textcolor{white}{.}

colors:
gray: gray
Expand Down
25 changes: 24 additions & 1 deletion cfg/rm2.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,33 @@ layout:

margin:
top: .3cm
bottom: 0.7cm
bottom: 0.6cm
left: 1.4cm
right: 0.3cm

numbers:
quarterlylines: 38
weeklylines: 11
dailybottomhour: 6
dailytophour: 23
dailytodos: 8
dailynotes: 27
dailydiarygrateful: 4
dailydiarybest: 4
dailydiarylog: 26
notesindexpages: 3
notesonpage: 38
dotheightfull: 38
dotwidthtwothirds: 19
dotwidthfull: 29

lengths:
tabcolsep: 3.5pt
linethicknessdefault: .4pt
linethicknessthick: .8pt
lineheightbutline: \dimexpr5mm-.4pt
twocolsep: 5pt
tricolsep: 5pt
monthlycellheight: 55pt
notesindexcellheight: 1.45cm
quarterlyspring: \textcolor{white}{..}
7 changes: 7 additions & 0 deletions cfg/rm2.breadcrumb.default.dailycal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
calafterschedule: true
addlasthalfhour: true

layout:
numbers:
dailybottomhour: 8
dailytophour: 20
25 changes: 0 additions & 25 deletions cfg/rm2.breadcrumb.default.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +0,0 @@
layout:
numbers:
arraystretch: 1.5
quarterlylines: 12
weeklylines: 11
dailytodos: 15
dailynotes: 20
dailybottomhour: 6
dailytophour: 23
dailydiarygoals: 10
dailydiarygrateful: 11
dailydiarybest: 12
dailydiarylog: 37
todolinesintodopage: 11

lengths:
tabcolsep: 3.5pt
linethicknessdefault: .4pt
linethicknessthick: .8pt
lineheightbutline: \dimexpr5mm-.4pt
twocolsep: 5pt
tricolsep: 5pt
monthlycellheight: 55pt
notesindexcellheight: 1.45cm

11 changes: 11 additions & 0 deletions cfg/rm2.mos.default.dailycal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
calafterschedule: true

layout:
numbers:
dailybottomhour: 8
dailytophour: 20

lengths:
headersidecellheight: "[1.35ex]"
headersidequarterswidth: 4cm
headersidemonthswidth: 15.25cm
10 changes: 5 additions & 5 deletions cfg/rm2.mos.default.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
addlasthalfhour: false

layout:
numbers:
dailytodos: 5
dailynotes: 18
dailypersonal: 10
dailybottomhour: 8
dailytophour: 21
dailybottomhour: 6
dailytophour: 23
dailynotes: 26

lengths:
headersidecellheight: "[1.35ex]"
Expand Down
19 changes: 0 additions & 19 deletions cfg/rm2_ddvk.base.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
cleartoprightcorner: false

layout:
paper:
width: 15.6cm
height: 20.9cm

reversemargins: true
marginparwidth: 1cm
marginparsep: 4.5mm

margin:
top: .3cm
bottom: 0.7cm
left: 1.4cm
right: 0.3cm

numbers:
notesindexpages: 3
notesonpage: 38
9 changes: 0 additions & 9 deletions cfg/rm2_ddvk_lh.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@ cleartoprightcorner: false

layout:
paper:
width: 15.6cm
height: 20.9cm

reversemargins: false
marginparwidth: 1cm
marginparsep: 4.5mm

margin:
top: .3cm
bottom: 0.7cm
left: 0.3cm
right: 1.4cm

numbers:
notesindexpages: 3
notesonpage: 38
7 changes: 7 additions & 0 deletions cfg/sn_a5x.breadcrumb.default.dailycal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
calafterschedule: true
addlasthalfhour: true

layout:
numbers:
dailybottomhour: 9
dailytophour: 20
3 changes: 3 additions & 0 deletions cfg/sn_a5x.breadcrumb.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ layout:
reversemargins: true
marginparwidth: .8cm
marginparsep: 3mm

lengths:
quarterlyspring: \textcolor{white}{.}
7 changes: 7 additions & 0 deletions cfg/sn_a5x.mos.default.dailycal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
calafterschedule: true
addlasthalfhour: true

layout:
numbers:
dailybottomhour: 9
dailytophour: 20
15 changes: 9 additions & 6 deletions cfg/sn_a5x.mos.default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
addlasthalfhour: false

layout:
paper:

marginparwidth: .8cm
marginparsep: .25cm
reversemargins: true
Expand All @@ -9,12 +10,14 @@ layout:
left: 1cm

numbers:
dailybottomhour: 9
dailytophour: 20
dailytodos: 5
dailynotes: 18
dailypersonal: 8
weeklylines: 10
dailynotes: 24
dotwidthtwothirds: 19
dotwidthfull: 29

lengths:
headersidequarterswidth: 4cm
headersidemonthswidth: 14.35cm
quarterlyspring: \myDummyQ
monthlyspring: \vskip.5mm
dailyspring: \textcolor{white}{..}
Loading

0 comments on commit c5cb61a

Please sign in to comment.