make apple-touch-icon AppIcon instead of SiteFavicon
This commit is contained in:
parent
457de7a8e5
commit
bed4ab8825
3 changed files with 8 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1525,7 +1525,7 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
|
|||
|
||||
[[package]]
|
||||
name = "site_icons"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"clap",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "site_icons"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
authors = ["Sam Denty <sam@samdenty.com>"]
|
||||
edition = "2018"
|
||||
license = "GPL-3.0"
|
||||
|
|
|
@ -130,9 +130,14 @@ impl Icons {
|
|||
)) {
|
||||
let elem = elem_ref.value();
|
||||
if let Some(href) = elem.attr("href").and_then(|href| url.join(&href).ok()) {
|
||||
let rel = elem.attr("rel").unwrap();
|
||||
self.add_icon(
|
||||
href,
|
||||
IconKind::SiteFavicon,
|
||||
if rel.contains("apple-touch-icon") {
|
||||
IconKind::AppIcon
|
||||
} else {
|
||||
IconKind::SiteFavicon
|
||||
},
|
||||
elem.attr("sizes").map(|sizes| sizes.into()),
|
||||
);
|
||||
|
||||
|
|
Reference in a new issue