Skip to content

Commit bba0aee

Browse files
authored
Merge pull request #4 from cucapra/width-badge
Use a "badge" display style for the base width in instruction listings
2 parents 26fe21e + 0db78a1 commit bba0aee

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/extensions/extension.njk

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ eleventyComputed:
1818
<li data-name="{{ inst.name | lower }}">
1919
<a href="/instructions/{{ inst.name }}/">{{ inst.name }}</a>
2020
{{ inst.longName }}
21-
{% if inst.base == 64 %}
22-
<span class="meta">Base width: {{ inst.base }}</span>
21+
{% if inst.base != 32 %}
22+
<span class="base-width" title="This instruction is only present in the {{inst.base}}-bit version of the ISA.">{{ inst.base }}</span>
2323
{% endif %}
2424
</li>
2525
{% endfor %}
@@ -32,6 +32,15 @@ li { margin: 6px 0; }
3232
a { text-decoration: none; color: #0366d6; }
3333
a:hover { text-decoration: underline; }
3434
small { color: #555; margin-left: 8px; }
35-
.meta { display: block; color: #555; margin-top: 2px; }
35+
.base-width {
36+
display: inline-block;
37+
color: white;
38+
background: #6699d6;
39+
border-radius: 6px;
40+
font-size: 80%;
41+
font-weight: bold;
42+
padding: 1px 3px;
43+
margin-left: 3px;
44+
}
3645
</style>
3746

0 commit comments

Comments
 (0)