Skip to content

Commit 863935e

Browse files
authored
Merge pull request #2040 from jvns/glossary-tooltip
Show the glossary definition when a user hovers over some Git jargon
2 parents 0a811de + 6dff6aa commit 863935e

File tree

2,506 files changed

+25862
-24836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,506 files changed

+25862
-24836
lines changed

.github/workflows/update-git-version-and-manual-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
id: manual-pages
8181
if: steps.commit.outputs.result != '' || inputs.force-rebuild == true
8282
run: |
83-
git add -A external/docs &&
83+
git add -A external/docs static/js/glossary &&
8484
if test true = '${{ inputs.force-rebuild }}' && git diff-index --cached --quiet HEAD --
8585
then
8686
echo '::notice::A manual pages rebuild was requested but resulted in no changes' >&2

.github/workflows/update-translated-manual-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: |
6666
mkdir -p external/docs/sync &&
6767
git -C '${{ runner.temp }}/git-html-l10n' rev-parse HEAD >external/docs/sync/git-html-l10n.sha &&
68-
git add external/docs/sync/git-html-l10n.sha &&
68+
git add external/docs/sync/git-html-l10n.sha static/js/glossary &&
6969
7070
git add -A external/docs &&
7171
if test true = '${{ inputs.force-rebuild }}' && git diff-index --cached --quiet HEAD --

assets/sass/reference.scss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,51 @@ h3.plumbing {
5757
@include background-image-2x($baseurl + "images/icons/plumbing-sm", 17px, 14px, 2px 50%);
5858
}
5959

60+
.tooltip {
61+
position: absolute;
62+
/* invisible padding to make it easier to enter with the mouse */
63+
padding: 15px;
64+
visibility: hidden;
65+
66+
.tooltip-content {
67+
background: white;
68+
border: 1px solid #ccc;
69+
border-radius: 4px;
70+
padding: 10px;
71+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
72+
max-width: 300px;
73+
font-size: 14px;
74+
line-height: 1.4;
75+
}
76+
}
77+
78+
.tooltip.show {
79+
visibility: visible;
80+
}
81+
82+
.expand-icon {
83+
position: absolute;
84+
top: 8px;
85+
right: 8px;
86+
text-decoration: none;
87+
88+
img {
89+
width: 16px;
90+
height: 16px;
91+
opacity: 0.6;
92+
}
93+
94+
&:hover img {
95+
opacity: 1;
96+
}
97+
}
98+
99+
.hover-term {
100+
cursor: help;
101+
text-decoration: underline dotted;
102+
-webkit-text-decoration: underline dotted;
103+
}
104+
60105
// § section sign anchor links
61106
#content {
62107
h1>a.anchor,

external/docs/content/docs/CodingGuidelines.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@
13411341
<pre>Placeholders are spelled in lowercase and enclosed in
13421342
angle brackets surrounded by underscores:
13431343
_&lt;file&gt;_
1344-
_&lt;commit&gt;_</pre>
1344+
_<span class="hover-term" data-term="commit">&lt;commit&gt;</span>_</pre>
13451345
</div>
13461346
</div>
13471347
<div class="literalblock">
@@ -1371,7 +1371,7 @@
13711371
the content.
13721372
`--jobs &lt;n&gt;`
13731373
`--sort=&lt;key&gt;`
1374-
`&lt;directory&gt;/.git`
1374+
`<span class="hover-term" data-term="directory">&lt;directory&gt;</span>/.git`
13751375
`remote.&lt;name&gt;.mirror`
13761376
`ssh://[&lt;user&gt;@]&lt;host&gt;[:&lt;port&gt;]/&lt;path-to-git-repo&gt;`</pre>
13771377
</div>
@@ -1428,7 +1428,7 @@
14281428
<div class="literalblock">
14291429
<div class="content">
14301430
<pre>An optional parameter needs to be typeset with unconstrained pairs
1431-
[&lt;repository&gt;]</pre>
1431+
[<span class="hover-term" data-term="repository">&lt;repository&gt;</span>]</pre>
14321432
</div>
14331433
</div>
14341434
<div class="literalblock">
@@ -1478,14 +1478,14 @@
14781478
</div>
14791479
<div class="literalblock">
14801480
<div class="content">
1481-
<pre>[(-p &lt;parent&gt;)...]
1482-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
1481+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
1482+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
14831483
</div>
14841484
</div>
14851485
<div class="literalblock">
14861486
<div class="content">
1487-
<pre>git remote set-head &lt;name&gt; (-a|-d|&lt;branch&gt;)
1488-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
1487+
<pre>git remote set-head &lt;name&gt; (-a|-d|<span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
1488+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
14891489
brackets) be provided.)</pre>
14901490
</div>
14911491
</div>

external/docs/content/docs/CodingGuidelines/2.0.5.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,14 +515,14 @@
515515
</div>
516516
<div class="literalblock">
517517
<div class="content">
518-
<pre>[(-p &lt;parent&gt;)...]
519-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
518+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
519+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
520520
</div>
521521
</div>
522522
<div class="literalblock">
523523
<div class="content">
524-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
525-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
524+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
525+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
526526
brackets) be provided.)</pre>
527527
</div>
528528
</div>

external/docs/content/docs/CodingGuidelines/2.1.4.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,14 +742,14 @@
742742
</div>
743743
<div class="literalblock">
744744
<div class="content">
745-
<pre>[(-p &lt;parent&gt;)...]
746-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
745+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
746+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
747747
</div>
748748
</div>
749749
<div class="literalblock">
750750
<div class="content">
751-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
752-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
751+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
752+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
753753
brackets) be provided.)</pre>
754754
</div>
755755
</div>

external/docs/content/docs/CodingGuidelines/2.11.4.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,14 @@
840840
</div>
841841
<div class="literalblock">
842842
<div class="content">
843-
<pre>[(-p &lt;parent&gt;)...]
844-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
843+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
844+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
845845
</div>
846846
</div>
847847
<div class="literalblock">
848848
<div class="content">
849-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
850-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
849+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
850+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
851851
brackets) be provided.)</pre>
852852
</div>
853853
</div>

external/docs/content/docs/CodingGuidelines/2.13.7.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@
842842
</div>
843843
<div class="literalblock">
844844
<div class="content">
845-
<pre>[(-p &lt;parent&gt;)...]
846-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
845+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
846+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
847847
</div>
848848
</div>
849849
<div class="literalblock">
850850
<div class="content">
851-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
852-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
851+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
852+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
853853
brackets) be provided.)</pre>
854854
</div>
855855
</div>

external/docs/content/docs/CodingGuidelines/2.17.0.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,14 +859,14 @@
859859
</div>
860860
<div class="literalblock">
861861
<div class="content">
862-
<pre>[(-p &lt;parent&gt;)...]
863-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
862+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
863+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
864864
</div>
865865
</div>
866866
<div class="literalblock">
867867
<div class="content">
868-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
869-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
868+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
869+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
870870
brackets) be provided.)</pre>
871871
</div>
872872
</div>

external/docs/content/docs/CodingGuidelines/2.19.2.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,14 +852,14 @@
852852
</div>
853853
<div class="literalblock">
854854
<div class="content">
855-
<pre>[(-p &lt;parent&gt;)...]
856-
(Any number of option -p, each with one &lt;parent&gt; argument.)</pre>
855+
<pre>[(-p <span class="hover-term" data-term="parent">&lt;parent&gt;</span>)...]
856+
(Any number of option -p, each with one <span class="hover-term" data-term="parent">&lt;parent&gt;</span> argument.)</pre>
857857
</div>
858858
</div>
859859
<div class="literalblock">
860860
<div class="content">
861-
<pre>git remote set-head &lt;name&gt; (-a | -d | &lt;branch&gt;)
862-
(One and only one of "-a", "-d" or "&lt;branch&gt;" _must_ (no square
861+
<pre>git remote set-head &lt;name&gt; (-a | -d | <span class="hover-term" data-term="branch">&lt;branch&gt;</span>)
862+
(One and only one of "-a", "-d" or "<span class="hover-term" data-term="branch">&lt;branch&gt;</span>" _must_ (no square
863863
brackets) be provided.)</pre>
864864
</div>
865865
</div>

0 commit comments

Comments
 (0)