Skip to content

Commit 5ca6dad

Browse files
authored
Merge pull request #565 from rust-lang/logos
feat(logos): add logos route
2 parents 9ebd9d6 + a2e50c0 commit 5ca6dad

28 files changed

+12
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ fn index() -> Template {
9494
Template::render(page, &context)
9595
}
9696

97+
#[get("/logos/<file..>", rank = 1)]
98+
fn logos(file: PathBuf) -> Option<NamedFile> {
99+
NamedFile::open(Path::new("static/logos").join(file)).ok()
100+
}
101+
97102
#[get("/static/<file..>", rank = 1)]
98103
fn files(file: PathBuf) -> Option<NamedFile> {
99104
NamedFile::open(Path::new("static/").join(file)).ok()
@@ -266,7 +271,7 @@ fn main() {
266271
.attach(Template::fairing())
267272
.mount(
268273
"/",
269-
routes![index, category, governance, team, production, subject, files],
274+
routes![index, category, governance, team, production, subject, files, logos],
270275
)
271276
.catch(catchers![not_found, catch_error])
272277
.launch();

static/logos/cargo.png

56.9 KB
Loading

static/logos/error.png

12.7 KB
Loading

static/logos/favicon.ico

22.7 KB
Binary file not shown.

static/logos/forkme.svg

Lines changed: 1 addition & 0 deletions
Loading

static/logos/forkme_es_es.svg

Lines changed: 1 addition & 0 deletions
Loading

static/logos/forkme_it_it.svg

Lines changed: 1 addition & 0 deletions
Loading

static/logos/forkme_ko_kr.svg

Lines changed: 1 addition & 0 deletions
Loading

static/logos/forkme_zh_cn.svg

Lines changed: 1 addition & 0 deletions
Loading
5.62 KB
Loading
3.07 KB
Loading

static/logos/rust-logo-128x128.png

12.9 KB
Loading

static/logos/rust-logo-16x16-blk.png

328 Bytes
Loading

static/logos/rust-logo-16x16.png

370 Bytes
Loading
4.44 KB
Loading
5.46 KB
Loading

static/logos/rust-logo-256x256.png

32.9 KB
Loading

static/logos/rust-logo-32x32-blk.png

626 Bytes
Loading

static/logos/rust-logo-32x32.png

1.93 KB
Loading

static/logos/rust-logo-48x48-blk.png

985 Bytes
Loading
6.49 KB
Loading

static/logos/rust-logo-512x512.png

83.8 KB
Loading

static/logos/rust-logo-64x64-blk.png

1.3 KB
Loading

static/logos/rust-logo-64x64.png

4.85 KB
Loading

static/logos/rust-logo-all-blk.ico

263 KB
Binary file not shown.

static/logos/rust-logo-blk.svg

Lines changed: 1 addition & 0 deletions
Loading

static/logos/rust-logo-large-blk.ico

248 KB
Binary file not shown.

static/logos/rust-logo-small-blk.ico

14.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)