From e05687262f83f6b140580c87ff0191b591283b5d Mon Sep 17 00:00:00 2001 From: realaravinth Date: Tue, 2 Nov 2021 12:00:32 +0530 Subject: [PATCH] - run build script when CSS file is changed - typeset posts document --- build.rs | 2 +- templates/main.css | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index eeedabe..e31dab0 100644 --- a/build.rs +++ b/build.rs @@ -23,5 +23,5 @@ fn main() { .expect("error in git command, is git installed?"); let git_hash = String::from_utf8(output.stdout).unwrap(); println!("cargo:rustc-env=GIT_HASH={}", git_hash); - println!("cargo:rerun-if-changed=src/schema2.graphql"); + println!("cargo:rerun-if-changed=src/schema2.graphql,templates/main.css"); } diff --git a/templates/main.css b/templates/main.css index 85197a2..bcbc85c 100644 --- a/templates/main.css +++ b/templates/main.css @@ -3,6 +3,36 @@ padding: 0; } +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Times New Roman", Times, serif; +} + +a { + color: rgb(0, 86, 179); + text-decoration: none; +} + +a:visited { + color: rgb(0, 86, 179); +} + +a:hover { + text-decoration: underline; +} + +html { + color: #333; + font-family: Georgia, "Times New Roman", Times, serif; + /* font-size: 1.25rem; */ + font-size: 18px; + line-height: 1.55rem; +} + body { width: 100%; display: flex; @@ -10,7 +40,7 @@ body { } main { - width: 60%; + width: 35em; margin: auto; display: flex; flex-direction: column; @@ -23,9 +53,19 @@ p { img { margin: auto; max-width: 80%; + display: block; +} + +code { + font-family: monospace; + font-size: 15px; } @media screen and (max-width: 1200px) { + html { + font-size: 1rem; + line-height: 1.34rem; + } main { width: 90%; }