Change the default font + other little things

This commit is contained in:
Greg Burri 2020-05-12 23:14:42 +02:00
parent dcf7523ccf
commit 3ebbe8172b
16 changed files with 48 additions and 28 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ target
**/*.rs.bk **/*.rs.bk
backend/data/recipes.sqlite backend/data/recipes.sqlite
/deploy-to-pi.ps1 /deploy-to-pi.ps1
style.css.map

11
backend/build.rs Normal file
View file

@ -0,0 +1,11 @@
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=style.scss");
Command::new("sass")
.arg("./style.scss")
.arg("./static/style.css")
.output()
.expect("Unable to compile SASS file, install SASS, see https://sass-lang.com/");
}

View file

@ -45,4 +45,8 @@ impl Connection {
|row| Ok(dbg!("test")) |row| Ok(dbg!("test"))
) )
} }
pub fn get_all_recipes() {
}
} }

View file

@ -27,7 +27,7 @@ pub struct Request {
fn main_page(query: Query<Request>) -> HttpResponse { fn main_page(query: Query<Request>) -> HttpResponse {
let main_template = MainTemplate { test: &"*** test 2 ***" }; let main_template = MainTemplate { test: &"*** test ***" };
let s = main_template.render().unwrap(); let s = main_template.render().unwrap();
HttpResponse::Ok().content_type("text/html").body(s) HttpResponse::Ok().content_type("text/html").body(s)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,23 +0,0 @@
@font-face{font-family: Roobert; font-weight:400; src:url(Roobert-Regular.woff2) format("woff2"); }
@font-face{font-family:Roobert; font-weight:600; src:url(Roobert-SemiBold.woff2) format("woff2"); }
@font-face{font-family:Roobert; font-weight:700; src:url(Roobert-Bold.woff2) format("woff2"); }
* {
margin: 50px;
padding: 0px;
}
body {
font-size: 18px;
font-family: Roobert, Helvetica Neue, Helvetica, Arial, sans-serif;
text-shadow: 2px 2px 2px rgb(0, 0, 0);
text-align: center;
line-height: 18px;
color: rgb(255, 255, 255);
background-color: rgb(24, 24, 27);
margin: 0px;
}
img {
border: 0px;
}

24
backend/style.scss Normal file
View file

@ -0,0 +1,24 @@
@font-face{font-family: Fira Code; font-weight:200; src:url(FiraCode-Light.woff2) format("woff2"); }
@font-face{font-family: Fira Code; font-weight:400; src:url(FiraCode-Regular.woff2) format("woff2"); }
@font-face{font-family: Fira Code; font-weight:600; src:url(FiraCode-SemiBold.woff2) format("woff2"); }
@font-face{font-family: Fira Code; font-weight:700; src:url(FiraCode-Bold.woff2) format("woff2"); }
* {
margin: 50px;
padding: 0px;
}
body {
font-size: 18px;
font-family: Fira Code, Helvetica Neue, Helvetica, Arial, sans-serif;
text-shadow: 2px 2px 2px rgb(0, 0, 0);
text-align: center;
line-height: 18px;
color: rgb(255, 255, 255);
background-color: rgb(24, 24, 27);
margin: 0px;
}
img {
border: 0px;
}

View file

@ -12,5 +12,6 @@
<h1>{{ test }}</h1> <h1>{{ test }}</h1>
</div> </div>
<p>Text to test the new font.</p> <p>Text to test the new font.</p>
<p>=> [|1, 2, 3|] <-</p>
</body> </body>
</html> </html>

View file

@ -31,13 +31,15 @@ function Copy-SSH([string]$source, [string]$destination)
cargo build --target arm-unknown-linux-gnueabihf --release cargo build --target arm-unknown-linux-gnueabihf --release
# $a = Invoke-Expression ($ssh_command + "ls") Invoke-SSH "sudo systemctl stop recipes"
Invoke-SSH("sudo systemctl stop recipes")
Copy-SSH -source "./target/arm-unknown-linux-gnueabihf/release/recipes" -destination "~/recipes/" Copy-SSH -source "./target/arm-unknown-linux-gnueabihf/release/recipes" -destination "~/recipes/"
Invoke-SSH "rm -rf recipes/static"
Copy-SSH -source "./backend/static/" -destination "~/recipes/" Copy-SSH -source "./backend/static/" -destination "~/recipes/"
Invoke-SSH("chmod u+x recipes/recipes") Invoke-SSH "chmod u+x recipes/recipes"
Invoke-SSH("sudo systemctl start recipes") Invoke-SSH "strip recipes/recipes"
Invoke-SSH "sudo systemctl start recipes"
Write-Output "Deployment finished" Write-Output "Deployment finished"