From b7c0b84274c17bf5392f90f1cbbc68905ccb1685 Mon Sep 17 00:00:00 2001 From: Philipp Matthias Schaefer Date: Thu, 25 Feb 2021 22:00:59 +0100 Subject: [PATCH] feat: add website icon/project avatar --- .gitignore | 2 ++ build_icon.sh | 3 +++ src/main.rs | 1 + src/static.rs | 5 +++++ src/static/hourglass_backup.svg | 18 ------------------ src/static/icon.svg | 32 ++++++++++++++++++++++++++++++++ src/static/index.html | 1 + 7 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 build_icon.sh delete mode 100644 src/static/hourglass_backup.svg create mode 100644 src/static/icon.svg diff --git a/.gitignore b/.gitignore index b83d222..262fd0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /target/ + +/icon.png diff --git a/build_icon.sh b/build_icon.sh new file mode 100644 index 0000000..4bb0807 --- /dev/null +++ b/build_icon.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +inkscape -o icon.png -w 200 -h 200 -b white src/static/icon.svg diff --git a/src/main.rs b/src/main.rs index 22699f6..a091aac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,6 +43,7 @@ fn main() -> Result<()> { r#static::js, r#static::checkmark, r#static::cross, + r#static::icon, r#static::hourglass, api::update]) .manage(config) diff --git a/src/static.rs b/src/static.rs index 8d772f5..670b331 100644 --- a/src/static.rs +++ b/src/static.rs @@ -32,6 +32,11 @@ pub fn hourglass() -> Svg<&'static str> { Svg(include_str!("static/hourglass.svg")) } +#[get("/icon.svg")] +pub fn icon() -> Svg<&'static str> { + Svg(include_str!("static/icon.svg")) +} + #[get("/legal.html")] pub fn legal() -> content::Html<&'static str> { content::Html(include_str!("static/legal.html")) diff --git a/src/static/hourglass_backup.svg b/src/static/hourglass_backup.svg deleted file mode 100644 index 1a6462a..0000000 --- a/src/static/hourglass_backup.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/src/static/icon.svg b/src/static/icon.svg new file mode 100644 index 0000000..b086dbe --- /dev/null +++ b/src/static/icon.svg @@ -0,0 +1,32 @@ + + + + diff --git a/src/static/index.html b/src/static/index.html index b7243ab..630a6b9 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -4,6 +4,7 @@ WebLDAPPasswd +