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

Fix page breaks inside gigs. #3

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
5 changes: 4 additions & 1 deletion assets/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ section
.category
margin-left: 1in

.gig
break-inside: avoid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played with something similar, but now that I have added a projects array to my Test Double gig, it is being pushed off the front page.

I am going to hold off on a PR about this until this is merged or closed or we get a chance to pair on it.

I love the way cobbler works, but making a printable paged document from HTML ls always a headache.

I have some ideas, but I will express them in code when/if I have a chance to work on this.


.position
font-weight: $semibold-weight

Expand Down Expand Up @@ -104,7 +107,7 @@ section
text-align: left

.block
page-break-inside: avoid
break-inside: avoid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the skinny in preferring break-inside over page-break-inside? I just skimmed the spec, I am guessing you like it better because it is less specific to print media?


.degree
.field
Expand Down
49 changes: 25 additions & 24 deletions assets/template.pug
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,32 @@ mixin duration(start, end)
| #{mDuration.humanize()}

mixin gig(details, short)
.company
| #{details.company || details.organization} 
+link(details.website)
if details.position
.position= details.position
if details.positions
each position in details.positions
.position= position
if details.startDate
.time
if short
+duration(details.startDate, details.endDate)
else
=details.startDate.split('-')[0]
|  – 
if details.endDate
=details.endDate.split('-')[0]
.gig
.company
| #{details.company || details.organization} 
+link(details.website)
if details.position
.position= details.position
if details.positions
each position in details.positions
.position= position
if details.startDate
.time
if short
+duration(details.startDate, details.endDate)
else
| Present
if details.summary
p!= details.summary
if details.highlights
ul.highlights
each item in details.highlights
li= item
=details.startDate.split('-')[0]
|  – 
if details.endDate
=details.endDate.split('-')[0]
else
| Present
if details.summary
p!= details.summary
if details.highlights
ul.highlights
each item in details.highlights
li= item

doctype html
head
Expand Down