Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 14 additions & 6 deletions assets/sass/print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
}

footer {
padding: 0;
margin-top: 0;
display: none;
}

aside, .sidebar-btn, #search-container, #reference-version, #dark-mode-button, .site-source {
Expand All @@ -50,7 +49,8 @@
border: 1px solid black;
display: block;
gap: 0;
margin-bottom: 0;
margin-bottom: 8px;
padding: 8px;

.item {
background: none;
Expand All @@ -64,12 +64,14 @@
background: none;
line-height: inherit;
padding: 1px;
display: block;
margin-bottom: 2px;
}
}
}
.commit-reference {
background: none;
border-left: 0.5px;
border-left: 1px solid black;

dl {
gap: inherit;
Expand Down Expand Up @@ -113,8 +115,9 @@

.cheat-sheet {
/* Multi-column layout */
column-count: 6;
column-count: 4;
column-gap: 1em;
margin-top: 20px;

h1 {
column-span: all;
Expand All @@ -136,10 +139,15 @@
margin-top: 2px;
}
}

/* Manual column break controls */
.print-break-before {
break-before: column;
}
}
}

div#main .pdf-link img {
float: right;
height: 36px;
}
}
12 changes: 6 additions & 6 deletions content/cheat-sheet/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h3>Commit all unstaged changes:</h3>
</div>
</section>

<section>
<section class="print-break-before">
Copy link
Member Author

Choose a reason for hiding this comment

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

Nice!

<h2 id="move-between-branches">Move Between Branches</h2>
<div class="item">
<h3>Switch branches:</h3>
Expand Down Expand Up @@ -181,7 +181,7 @@ <h3>Show a summary of a diff:</h3>
<code>git show &lt;commit&gt; --stat</code>
</div>
</section>
<section class="commit-reference">
<section class="commit-reference print-break-before">
<h2 id="ways-to-refer-to-a-commit">Ways to refer to a commit</h2>
<p class="intro">
Every time we say <code>&lt;commit&gt;</code>, you can use any of these:
Expand Down Expand Up @@ -236,7 +236,7 @@ <h3>'Stash' all staged and unstaged changes:</h3>
</div>
</section>

<section>
<section class="print-break-before">
<h2 id="edit-history">Edit History</h2>
<div class="item">
<h3>"Undo" the most recent commit (keep your working directory the same):</h3>
Expand Down Expand Up @@ -285,7 +285,7 @@ <h3>Show who last changed each line of a file:</h3>
</div>
</section>

<section>
<section class="print-break-before">
<h2 id="combine-diverged-branches">Combine Diverged Branches</h2>
<div class="item">
<h3>Combine with rebase:</h3>
Expand Down Expand Up @@ -695,7 +695,7 @@ <h2 id="add-a-remote">Add a Remote</h2>
</div>
</section>

<section>
<section class="print-break-before">
<h2 id="push-your-changes">Push Your Changes</h2>
<div class="item">
<h3>Push the <code>main</code> branch to the remote <code>origin</code>:</h3>
Expand Down Expand Up @@ -757,7 +757,7 @@ <h3>See all possible config options:</h3>
</div>
</section>

<section>
<section class="print-break-before">
<h2 id="important-files">Important Files</h2>
<div class="item">
<h3>Local git config:</h3>
Expand Down
Loading