basi_css 0.2.22

CSS framework using tiny_http
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use tiny_http::{Header, Response};

pub fn serve_css() -> Response<std::io::Cursor<Vec<u8>>> {
    // Check if the request path matches "/style.css"
    let css = include_str!("../assets/basicss.css");

    // Create a response with a content-type of text/css
    let response = Response::from_string(css)
        .with_header(Header::from_bytes("Content-Type", "text/css").unwrap());

        response
}