diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-09 20:10:19 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-09 20:10:19 +0200 |
commit | b4472b41214eeeacce071df41bf0f782e1f16d6d (patch) | |
tree | efb666792785ba98c177990cfc349cdb9d6a56c7 /src/router.rs | |
parent | e44658641b75076b702e690df166820c1d133f24 (diff) | |
download | macroblog.rs-b4472b41214eeeacce071df41bf0f782e1f16d6d.tar.gz macroblog.rs-b4472b41214eeeacce071df41bf0f782e1f16d6d.tar.bz2 macroblog.rs-b4472b41214eeeacce071df41bf0f782e1f16d6d.zip |
feat: Move from pico to custom css
Use css from my current blog, which is a lot smaller. The text itself
looks good but the code still breaks the page.
Metrics:
- hyper: 16.37 KB / 16.47 KB transferred
- 1 request
Diffstat (limited to 'src/router.rs')
-rw-r--r-- | src/router.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/router.rs b/src/router.rs index 0bba091..35fdf3e 100644 --- a/src/router.rs +++ b/src/router.rs @@ -1,4 +1,4 @@ -use regex::{Regex}; +use regex::Regex; const ACTION_REGEX: &str = r"/{0,1}(?P<action>\w*)/(?P<id>.+)"; @@ -14,14 +14,15 @@ impl Router { let caps = re.captures(path); let action = match caps { Some(ref value) => &value["action"], - None => "index" + None => "index", }; match action { - "posts" => Router::Post { page: caps.unwrap()["id"].to_string() }, + "posts" => Router::Post { + page: caps.unwrap()["id"].to_string(), + }, "index" => Router::Index, - _ => Router::NotFound + _ => Router::NotFound, } } } - |