Update to font-awesome 6.2

This commit is contained in:
Michael Howell 2022-09-18 15:20:32 -07:00
parent 5694a87ed5
commit 25f3c7438a
6 changed files with 17 additions and 16 deletions

4
Cargo.lock generated
View File

@ -329,9 +329,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]] [[package]]
name = "font-awesome-as-a-crate" name = "font-awesome-as-a-crate"
version = "0.2.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86afa981f309a5d0ddbcb682820e5d6066157f903d06b9fb2959707b958f6618" checksum = "932dcfbd51320af5f27f1ba02d2e567dec332cac7d2c221ba45d8e767264c4dc"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"

View File

@ -21,7 +21,7 @@ chrono = "0.4"
clap = { version = "3.0", features = ["cargo"] } clap = { version = "3.0", features = ["cargo"] }
clap_complete = "3.0" clap_complete = "3.0"
env_logger = "0.9.0" env_logger = "0.9.0"
font-awesome-as-a-crate = "0.2.0" font-awesome-as-a-crate = "0.3.0"
handlebars = "4.0" handlebars = "4.0"
lazy_static = "1.0" lazy_static = "1.0"
log = "0.4" log = "0.4"

View File

@ -30,12 +30,12 @@ The icons displayed will depend on the settings of how the book was generated.
| Icon | Description | | Icon | Description |
|------|-------------| |------|-------------|
| <i class="fa fa-bars"></i> | Opens and closes the chapter listing sidebar. | | <i class="fas fa-bars"></i> | Opens and closes the chapter listing sidebar. |
| <i class="fa fa-paint-brush"></i> | Opens a picker to choose a different color theme. | | <i class="fas fa-paintbrush"></i> | Opens a picker to choose a different color theme. |
| <i class="fa fa-search"></i> | Opens a search bar for searching within the book. | | <i class="fas fa-magnifying-glass"></i> | Opens a search bar for searching within the book. |
| <i class="fa fa-print"></i> | Instructs the web browser to print the entire book. | | <i class="fas fa-print"></i> | Instructs the web browser to print the entire book. |
| <i class="fa fa-github"></i> | Opens a link to the website that hosts the source code of the book. | | <i class="fab fa-github"></i> | Opens a link to the website that hosts the source code of the book. |
| <i class="fa fa-edit"></i> | Opens a page to directly edit the source of the page you are currently reading. | | <i class="fas fa-pencil"></i> | Opens a page to directly edit the source of the page you are currently reading. |
Tapping the menu bar will scroll the page to the top. Tapping the menu bar will scroll the page to the top.
@ -59,9 +59,9 @@ Code blocks may contain several different icons for interacting with them:
| Icon | Description | | Icon | Description |
|------|-------------| |------|-------------|
| <i class="fa fa-copy"></i> | Copies the code block into your local clipboard, to allow pasting into another application. | | <i class="fa fa-copy"></i> | Copies the code block into your local clipboard, to allow pasting into another application. |
| <i class="fa fa-play"></i> | For Rust code examples, this will execute the sample code and display the compiler output just below the example (see [playground]). | | <i class="fas fa-play"></i> | For Rust code examples, this will execute the sample code and display the compiler output just below the example (see [playground]). |
| <i class="fa fa-eye"></i> | For Rust code examples, this will toggle visibility of "hidden" lines. Sometimes, larger examples will hide lines which are not particularly relevant to what is being illustrated (see [hiding code lines]). | | <i class="fa fa-eye"></i> | For Rust code examples, this will toggle visibility of "hidden" lines. Sometimes, larger examples will hide lines which are not particularly relevant to what is being illustrated (see [hiding code lines]). |
| <i class="fa fa-history"></i> | For [editable code examples][editor], this will undo any changes you have made. | | <i class="fas fa-clock-rotate-left"></i> | For [editable code examples][editor], this will undo any changes you have made. |
Here's an example: Here's an example:

View File

@ -1,5 +1,6 @@
use font_awesome_as_a_crate as fa; use font_awesome_as_a_crate as fa;
use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError}; use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError};
use log::trace;
use std::str::FromStr; use std::str::FromStr;
pub fn fa_helper( pub fn fa_helper(

View File

@ -274,7 +274,7 @@ function playground_text(playground) {
undoChangesButton.className = 'reset-button'; undoChangesButton.className = 'reset-button';
undoChangesButton.title = 'Undo changes'; undoChangesButton.title = 'Undo changes';
undoChangesButton.setAttribute('aria-label', undoChangesButton.title); undoChangesButton.setAttribute('aria-label', undoChangesButton.title);
undoChangesButton.innerHTML += document.getElementById('fa-history').innerHTML; undoChangesButton.innerHTML += document.getElementById('fa-clock-rotate-left').innerHTML;
buttons.insertBefore(undoChangesButton, buttons.firstChild); buttons.insertBefore(undoChangesButton, buttons.firstChild);

View File

@ -118,7 +118,7 @@
{{fa "solid" "bars"}} {{fa "solid" "bars"}}
</button> </button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list"> <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
{{fa "solid" "paint-brush"}} {{fa "solid" "paintbrush"}}
</button> </button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">{{ theme_option "Light" }}</button></li> <li role="none"><button role="menuitem" class="theme" id="light">{{ theme_option "Light" }}</button></li>
@ -129,7 +129,7 @@
</ul> </ul>
{{#if search_enabled}} {{#if search_enabled}}
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar"> <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
{{fa "solid" "search"}} {{fa "solid" "magnifying-glass"}}
</button> </button>
{{/if}} {{/if}}
</div> </div>
@ -149,7 +149,7 @@
{{/if}} {{/if}}
{{#if git_repository_edit_url}} {{#if git_repository_edit_url}}
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit"> <a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i> {{fa "solid" "pencil" "git-edit-button"}}
</a> </a>
{{/if}} {{/if}}
@ -222,7 +222,7 @@
<template id=fa-eye-slash>{{fa "solid" "eye-slash"}}</template> <template id=fa-eye-slash>{{fa "solid" "eye-slash"}}</template>
<template id=fa-copy>{{fa "regular" "copy"}}</template> <template id=fa-copy>{{fa "regular" "copy"}}</template>
<template id=fa-play>{{fa "solid" "play"}}</template> <template id=fa-play>{{fa "solid" "play"}}</template>
<template id=fa-history>{{fa "solid" "history"}}</template> <template id=fa-clock-rotate-left>{{fa "solid" "clock-rotate-left"}}</template>
{{#if live_reload_endpoint}} {{#if live_reload_endpoint}}
<!-- Livereload script (if served using the cli tool) --> <!-- Livereload script (if served using the cli tool) -->