Skip to content

Commit

Permalink
Update to font-awesome 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Sep 18, 2022
1 parent 5694a87 commit 25f3c74
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions guide/src/guide/reading.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ The icons displayed will depend on the settings of how the book was generated.

| Icon | Description |
|------|-------------|
| <i class="fa 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="fa fa-search"></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="fa 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-bars"></i> | Opens and closes the chapter listing sidebar. |
| <i class="fas fa-paintbrush"></i> | Opens a picker to choose a different color theme. |
| <i class="fas fa-magnifying-glass"></i> | Opens a search bar for searching within the book. |
| <i class="fas fa-print"></i> | Instructs the web browser to print the entire book. |
| <i class="fab fa-github"></i> | Opens a link to the website that hosts the source code of the book. |
| <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.

Expand All @@ -59,9 +59,9 @@ Code blocks may contain several different icons for interacting with them:
| 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-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-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:

Expand Down
1 change: 1 addition & 0 deletions src/renderer/html_handlebars/helpers/fontawesome.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions src/theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
{{fa "solid" "bars"}}
</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">
{{fa "solid" "paint-brush"}}
{{fa "solid" "paintbrush"}}
</button>
<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>
Expand All @@ -129,7 +129,7 @@
</ul>
{{#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">
{{fa "solid" "search"}}
{{fa "solid" "magnifying-glass"}}
</button>
{{/if}}
</div>
Expand All @@ -149,7 +149,7 @@
{{/if}}
{{#if git_repository_edit_url}}
<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>
{{/if}}

Expand Down Expand Up @@ -222,7 +222,7 @@
<template id=fa-eye-slash>{{fa "solid" "eye-slash"}}</template>
<template id=fa-copy>{{fa "regular" "copy"}}</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}}
<!-- Livereload script (if served using the cli tool) -->
Expand Down

0 comments on commit 25f3c74

Please sign in to comment.