From 1e0d32c5d233d9a8cb87510d6f4ed7965d063219 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 11 Nov 2019 12:23:21 +0100 Subject: [PATCH] :art: Simplify --- .gitignore | 2 -- book.toml | 11 +++++++++++ custom.css | 17 +++++++++++++++++ scripts/ensure.sh | 42 ------------------------------------------ 4 files changed, 28 insertions(+), 44 deletions(-) create mode 100644 book.toml create mode 100644 custom.css diff --git a/.gitignore b/.gitignore index 250338ee..6e5a57c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ src book -book.toml -custom.css .d/ ast/ config.mk diff --git a/book.toml b/book.toml new file mode 100644 index 00000000..121cc395 --- /dev/null +++ b/book.toml @@ -0,0 +1,11 @@ +[book] +authors = ["Jérémie Astor"] +title = "Gwion" + +[output.html] +default-theme = "rust" +additional-css = ["custom.css"] + +[output.html.fold] +enable = true +level = 0 diff --git a/custom.css b/custom.css new file mode 100644 index 00000000..d5170b1c --- /dev/null +++ b/custom.css @@ -0,0 +1,17 @@ +.mdr { + color:var(--sidebar-active); + background-color:var(--sidebar-bg); + border: 5px solid var(--sidebar-fg); + padding: 10px; + margin-right: 20%; + margin-left: 20%; + moz-border-radius: 15px; + -webkit-border-radius: 15px; +} + +footer { + padding: 10px; + text-align: center; + font-size: small; + font-style: italic; +} diff --git a/scripts/ensure.sh b/scripts/ensure.sh index 82bd905f..29e353c0 100644 --- a/scripts/ensure.sh +++ b/scripts/ensure.sh @@ -1,46 +1,4 @@ #!/bin/sh -toml() { -cat < book.toml -[book] -authors = ["Jérémie Astor"] -title = "Gwion" - -[output.html] -default-theme = "rust" -additional-css = ["custom.css"] - -[output.html.fold] -enable = true -level = 0 -EOF -} - -css() { -cat < custom.css -.mdr { - color:var(--sidebar-active); - background-color:var(--sidebar-bg); - border: 5px solid var(--sidebar-fg); - padding: 10px; - margin-right: 20%; - margin-left: 20%; - moz-border-radius: 15px; - -webkit-border-radius: 15px; -} - -footer { - padding: 10px; - text-align: center; - font-size: small; - font-style: italic; -} -EOF -} - -[ -f book.toml ] || toml - -[ -f custom.css ] || css - [ -d src ] || sh scripts/mdr2mdbook.sh [ -f src/SUMMARY.md ] || sh scripts/summary.sh > src/SUMMARY.md -- 2.43.0