color!
This commit is contained in:
parent
d1d9358335
commit
02d641f711
|
@ -2,8 +2,20 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Nom Nom GC</title>
|
||||
<style>{{> css}}</style>
|
||||
</head>
|
||||
<body>
|
||||
Hello world
|
||||
<nav>
|
||||
<ul>
|
||||
<li><h1>Nom Nom GC</h1></li>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/projects">Projects</a></li>
|
||||
<li><a href="/login">Login</a></li>
|
||||
</nav>
|
||||
<main>
|
||||
<div id="main-container">
|
||||
Hello world
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
body {
|
||||
background-color: #F9FA57;
|
||||
color: black;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
#login {
|
||||
|
||||
}
|
||||
|
||||
a {
|
||||
color: #C800E4;
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
nav {
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
background-color: white;
|
||||
box-shadow: 10px 15px #C800E4;
|
||||
}
|
||||
|
||||
nav > ul {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
list-style-type: none;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#main-container {
|
||||
background-color: white;
|
||||
box-shadow: 10px 15px #C800E4;
|
||||
width: 85%;
|
||||
padding: 2em;
|
||||
margin: 1em;
|
||||
}
|
|
@ -4,11 +4,11 @@ use std::path::PathBuf;
|
|||
|
||||
pub fn landing_page() -> Result<String, RenderError> {
|
||||
let mut hb = handlebars::Handlebars::new();
|
||||
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
path = path.join("src/templates/landing.hbs");
|
||||
let p: &str = path.to_str().unwrap();
|
||||
println!("{}", p);
|
||||
hb.register_template_file("landing", p)?;
|
||||
let rootpath = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let landing_path = rootpath.join("src/templates/landing.hbs");
|
||||
let css = rootpath.join("src/templates/main.css");
|
||||
hb.register_template_file("landing", landing_path.to_str().unwrap())?;
|
||||
hb.register_template_file("css", css.to_str().unwrap())?;
|
||||
let data = json!({
|
||||
});
|
||||
hb.render("landing", &data)
|
||||
|
|
Loading…
Reference in New Issue