Crates.io | octicons |
lib.rs | octicons |
version | 0.2.0 |
source | src |
created_at | 2017-11-09 19:24:07.580362 |
updated_at | 2023-09-22 19:02:54.015806 |
description | A scalable set of icons handcrafted with <3 by GitHub ported for use in Rust. |
homepage | |
repository | |
max_upload_size | |
id | 38767 |
size | 97,862 |
This is a library that will let you easily include svg octicons in your rust server side templates. The icons and their path data are exposed as static variables. Clone the statics and use the builder functions to configure the icon's attributes.
Add this to your Cargo.toml
octicons = "0.1"
Add the crate to your main.rs
or lib.rs
extern crate octicons;
Use the static structs in your server side templates
format!("{}",
octicons::ARROW_DOWN.clone()
.xmlns(Some("http://www.w3.org/2000/svg"))
.width(32)
.height(32)
.fill(Some("#ff0"))
.aria_label(Some("hi"))
.class(Some("right left"))
);
Crate documentation can be found at docs.rs/octicons/
If you have access to publish this repository, these are the steps to publishing. If you need access, contact #design-systems.
Before publishing This package relies on the data from octicons. To update to the most recent version, you'll need to run make prepare
cargo package --allow-dirty
Allow including the svg files needed by the build.rscargo publish
This will build the crate and publish it to crate.io.git push && git push --tags
Push all these changes to origin.(c) 2012-2017 GitHub, Inc.
When using the GitHub logos, be sure to follow the GitHub logo guidelines.
Font License: SIL OFL 1.1
Applies to all font files and SVG files
Code License: MIT
Applies to all other files