Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Start using Font Awesome icons #1007
Conversation
harding
added some commits
Aug 10, 2015
|
I haven't tested and reviewed the PR yet, but I agree this can be a good idea. Perhaps this can be loaded only on the pages using it to avoid unnecessary blocking CSS and bandwidth consumption on mobiles? I think this adds a few hundred kb at worst? Some of our icons looked more appropriate in the context I think (like the miners icon), but if fontawesome saves us time, that's really not a huge issue IMO. |
|
@saivann I justed tested on the preview site linked above, and the CSS is always loaded but the icons are only loaded when used. (See screenshots below.) According to Firefox, the CSS is 26 KB. Since that should be cached on first load, I think it's low enough to keep as a default addition to every page. However, if you want, I'm entirely happy to make adding it to a page's HTML a setting in the YAML header. Let me know which you prefer. Load of page (no cache) that uses Font Awesome icons: Load of page (no cache) that doesn't use the icons: |
|
@harding That's actually more optimized than I expected. Agreed, thanks! |
|
@saivann Cool, thanks! Let me know when you've had a chance to test and I'll schedule the merge (but there's no rush). @crwatkins has already tested on iOS and didn't see any problems. |
|
@harding Mining alternative suggestion: |
|
SIL OFL is not a free license, despite its wide acceptance. :( |
|
@ChainQuery I think that's a reasonable icon. I chose the puzzle icon because proof-of-work is sometimes described as analogous to a "scratch-off puzzle" (particularly by Andrew Miller, IIRC). I don't have any strong opinion here, so if someone else wants to suggest one or the other (or a third option), just say so. @luke-jr yes, its GPL incompatibility is mentioned in the Licensing section of the OP. |
saivann
and 1 other
commented on an outdated diff
Aug 21, 2015
| @@ -8,6 +8,11 @@ | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
| <title>{% capture title %}{% translate title %}{% endcapture %}{% if title != '' %}{{ title }}{% else %}{{ page.title }}{% endif %}</title> | ||
| {% capture metadescription %}{% translate metadescription %}{% endcapture %}{% if metadescription != '' %}<meta name="description" content="{{ metadescription }}">{% endif %} | ||
| + | ||
| +{% comment %}<!-- load Font Awesome but hide it if JS is disabled -->{% endcomment %} | ||
| +<link rel="stylesheet" href="/css/font-awesome-4.4.0/css/font-awesome.min.css"> | ||
| +<noscript><style>.fa { display: none !important; }</style></noscript> |
saivann
Contributor
|
saivann
commented on an outdated diff
Aug 21, 2015
| @@ -39,62 +39,62 @@ breadcrumbs: | ||
| </div> | ||
| <div> | ||
| <div> | ||
| - <h2 id="contracts"><img src="/img/icons/ico_contract.svg" class="titleicon" alt="Icon">Contracts</h2> | ||
| + <h2 id="contracts"><span class="fa fa-sitemap fa-lg fa-rotate-270"></span> Contracts</h2> | ||
| <p><a href="/en/developer-guide#contracts">Contracts Guide</a></p> | ||
| <div class="resourcesext"> |
saivann
Contributor
|
|
@harding I noticed that the main icons now have a smaller font-size than the rest of the content. If we want to at least make them equally proemient, it's possible to set the Otherwise I have verified that the added files are identical to those in the fontawesome repository. The changes work fine here (IE8,10, FF3.5,39, OP12, Android 2.3.6). Except for the few comments above, LGTM up to 819b356. Thanks! |
|
@ChainQuery Thanks for the alternative suggestion! As far as I'm concerned, I kind of like both icons equally, I guess miners aren't so easily depicted by common icons... |
saivann
added
the
Merge Scheduled
label
Aug 22, 2015
|
Commit 073e3f1 LGTM, Thanks! |




harding commentedAug 10, 2015
Preview: http://dg0.dtrt.org/en/developer-documentation
This pull request adds the Font Awesome iconic font to the site (available on all pages) and uses it for the Developer Documentation main page as a demo.
Although I think our current icons are fine, I need additional icons for some new pages I hope to add and I would prefer to reuse existing work rather than create my own. Font Awesome has the following
benefits:
Licensing
Font Awesome freely licensed under the SIL Open Font License, an OSI approved license and which the FSF considers a free license but not GPL-compatible. IANAL, but I don't see any conflicts with our MIT-licensed content nor the small amount of non-freely-licensed content we have.
Note: the Font Awesome license page says it is "GPL friendly". They have an issue that goes into detail about why they're not fully GPL compatible.
Compatibility
Font source
In this PR are the files from this ZIP archive unchanged, plus a COPYING file I added with the text from this License page.
Side-by-side example
On the left side is the page as currently displayed on Bitcoin.org; on the right side is the preview page with all of the images from Font Awesome: