Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Icons Collections for Seed
Seed is an awesome framework to develop single page applications.
This package provides build.rs
to generate icons to use with Seed.
It does not provide you with icons themselves (you stil have to reference
CSS / JS files from your index.html), but it gives you a module for each icon and it can help you with downloading resources.
Use Font-Awesome collection
Add to [dependencies]
In your Cargo.toml:
= "0.3.1"
Import icon
For example regular check-circle could be imported next way:
use check_circle;
Render icon
There are three methods in icon module: i
, i_c
, i_s
and i_sc
i
- just renders iconi_c
- renders icon with a list of custom classesi_s
- renders icon with stylei_sc
- renders icon with style and classes
For example call i_s
function could be used like that:
use ;
use check_circle;
use *;
Or i_c
with custom CSS:
i_c
In this case you'd need also to provide CSS somewhere:
}
Add resources
You might want to download resources with icons by yourself, or
you can use seed-icons-gen
crate for that.
Add build dependency
In [build-dependencies]
add following:
= "0.2.0"
Add build.rs
If you already have build.rs
, you just need to modify it
to do the same as the following one:
When your crate would be built, that would download font-awesome
folder inside of static
folder.
You might want to add .gitignore
file in static folder:
font-awesome
, because you'd probably will not want to keep all those resources in your VCS.
Link stylesheets
If you've downloaded resources as explained before, then
you can link them in index.html
like that:
Roadmap
- add material icons https://material.io/resources/icons/?style=baseline
- add feather-icons collection https://github.com/feathericons/feather