From 25f3c7438a40bf8293e95853cf7110459379facf Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sun, 18 Sep 2022 15:20:32 -0700 Subject: [PATCH] Update to font-awesome 6.2 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- guide/src/guide/reading.md | 16 ++++++++-------- .../html_handlebars/helpers/fontawesome.rs | 1 + src/theme/book.js | 2 +- src/theme/index.hbs | 8 ++++---- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd340cf7..e1e1bbe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-awesome-as-a-crate" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86afa981f309a5d0ddbcb682820e5d6066157f903d06b9fb2959707b958f6618" +checksum = "932dcfbd51320af5f27f1ba02d2e567dec332cac7d2c221ba45d8e767264c4dc" [[package]] name = "form_urlencoded" diff --git a/Cargo.toml b/Cargo.toml index 8438dae8..d523d462 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ chrono = "0.4" clap = { version = "3.0", features = ["cargo"] } clap_complete = "3.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" lazy_static = "1.0" log = "0.4" diff --git a/guide/src/guide/reading.md b/guide/src/guide/reading.md index cab3a865..5ee07b92 100644 --- a/guide/src/guide/reading.md +++ b/guide/src/guide/reading.md @@ -30,12 +30,12 @@ The icons displayed will depend on the settings of how the book was generated. | Icon | Description | |------|-------------| -| | Opens and closes the chapter listing sidebar. | -| | Opens a picker to choose a different color theme. | -| | Opens a search bar for searching within the book. | -| | Instructs the web browser to print the entire book. | -| | Opens a link to the website that hosts the source code of the book. | -| | Opens a page to directly edit the source of the page you are currently reading. | +| | Opens and closes the chapter listing sidebar. | +| | Opens a picker to choose a different color theme. | +| | Opens a search bar for searching within the book. | +| | Instructs the web browser to print the entire book. | +| | Opens a link to the website that hosts the source code of the book. | +| | 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. @@ -59,9 +59,9 @@ Code blocks may contain several different icons for interacting with them: | Icon | Description | |------|-------------| | | Copies the code block into your local clipboard, to allow pasting into another application. | -| | For Rust code examples, this will execute the sample code and display the compiler output just below the example (see [playground]). | +| | For Rust code examples, this will execute the sample code and display the compiler output just below the example (see [playground]). | | | 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]). | -| | For [editable code examples][editor], this will undo any changes you have made. | +| | For [editable code examples][editor], this will undo any changes you have made. | Here's an example: diff --git a/src/renderer/html_handlebars/helpers/fontawesome.rs b/src/renderer/html_handlebars/helpers/fontawesome.rs index 46967cb0..25c9b92e 100644 --- a/src/renderer/html_handlebars/helpers/fontawesome.rs +++ b/src/renderer/html_handlebars/helpers/fontawesome.rs @@ -1,5 +1,6 @@ use font_awesome_as_a_crate as fa; use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError}; +use log::trace; use std::str::FromStr; pub fn fa_helper( diff --git a/src/theme/book.js b/src/theme/book.js index dca39cc7..1453fcdc 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -274,7 +274,7 @@ function playground_text(playground) { undoChangesButton.className = 'reset-button'; undoChangesButton.title = 'Undo changes'; 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); diff --git a/src/theme/index.hbs b/src/theme/index.hbs index f62f0027..765d06c0 100644 --- a/src/theme/index.hbs +++ b/src/theme/index.hbs @@ -118,7 +118,7 @@ {{fa "solid" "bars"}} {{#if search_enabled}} {{/if}} @@ -149,7 +149,7 @@ {{/if}} {{#if git_repository_edit_url}} - + {{fa "solid" "pencil" "git-edit-button"}} {{/if}} @@ -222,7 +222,7 @@ - + {{#if live_reload_endpoint}}