Skip to content

Commit 401324a

Browse files
committed
switch to octicons and load from sprite
1 parent 9f7463a commit 401324a

File tree

7 files changed

+54
-18
lines changed

7 files changed

+54
-18
lines changed

src/css/doc.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@
698698
border: none;
699699
color: inherit;
700700
outline: none;
701-
padding: 0;
701+
padding: 0.025rem 0 0;
702702
font-size: inherit;
703703
line-height: inherit;
704704
width: 1em;
@@ -710,6 +710,7 @@
710710
}
711711

712712
.code-toolbox .copy-button svg {
713+
fill: currentColor;
713714
width: inherit;
714715
height: inherit;
715716
}

src/css/header.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ body {
188188
display: block;
189189
}
190190

191+
.navbar-item .icon svg {
192+
fill: currentColor;
193+
width: inherit;
194+
height: inherit;
195+
}
196+
191197
.navbar-link {
192198
padding-right: 2.5em;
193199
}

src/img/octicons.svg

Lines changed: 39 additions & 0 deletions
Loading

src/js/07-copy-to-clipboard.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,12 @@
2424
;(copy = document.createElement('button')).className = 'copy-button'
2525
copy.setAttribute('title', 'Copy to clipboard')
2626
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
27-
svg.setAttribute('class', 'copy-icon')
2827
svg.setAttribute('aria-hidden', 'true')
29-
svg.setAttribute('data-prefix', 'far')
30-
svg.setAttribute('data-icon', 'copy')
31-
svg.setAttribute('data-version', '5.10.2')
28+
svg.setAttribute('class', 'copy-icon')
3229
svg.setAttribute('role', 'img')
33-
svg.setAttribute('viewBox', '0 0 448 512')
34-
var path = document.createElementNS('http://www.w3.org/2000/svg', 'path')
35-
path.setAttribute('fill', 'currentColor')
36-
path.setAttribute(
37-
'd',
38-
'M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z' // eslint-disable-line max-len
39-
)
40-
svg.appendChild(path)
30+
var use = document.createElementNS('http://www.w3.org/2000/svg', 'use')
31+
use.setAttribute('href', window.uiRootPath + '/img/octicons.svg#clippy-16')
32+
svg.appendChild(use)
4133
copy.appendChild(svg)
4234
;(toast = document.createElement('span')).className = 'copy-toast'
4335
toast.appendChild(document.createTextNode('Copied!'))

src/partials/footer-content.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
<div class="footer-legal">
1515
<p>Except where noted, the content on this site is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.</p>
16-
<p>The UI for this site is based on the default Antora UI and is licensed under the MPL-2.0 license. Several icons are from <a href="https://fontawesome.com/license/free" target="_blank" rel="noopener">Font Awesome</a> and are licensed under the CC BY 4.0 license.</p>
16+
<p>The UI for this site is based on the default Antora UI and is licensed under the MPL-2.0 license. Several icons are imported from <a href="https://primer.style/octicons/" target="_blank" rel="noopener">Octicons</a> and are licensed under the MIT license.</p>
1717
<p>AsciiDoc is a Trademark of the Eclipse Foundation, Inc.</p>
1818
</div>
1919
<div class="footer-thanks">

src/partials/footer-scripts.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<script>window.uiRootPath = '{{{uiRootPath}}}'</script>
12
<script src="{{{uiRootPath}}}/js/site.js"></script>
23
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
34
{{#with (resolvePage page.relativeSrcPath model=false)}}

src/partials/header-content.hbs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@
8383
--}}
8484
<a class="navbar-item" href="https://github.com/asciidoctor" target="_blank" rel="noopener">
8585
<span class="icon">
86-
<!-- Font Awesome Free 5.15.1 by @fontawesome - License: https://fontawesome.com/license/free -->
87-
<svg aria-hidden="true" data-prefix="fab" data-icon="github" data-version="5.0.0" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
88-
<path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>
89-
</svg>
86+
<svg xmlns="http://www.w3.org/2000/svg"><use href="{{{uiRootPath}}}/img/octicons.svg#mark-github"></use></svg>
9087
</span>
9188
</a>
9289
</div>

0 commit comments

Comments
 (0)