diff options
| author | msi | 2025-11-15 11:54:05 -0300 |
|---|---|---|
| committer | msi | 2025-11-15 11:54:05 -0300 |
| commit | c722f8281d0f19080f19928a69de950c1472cf94 (patch) | |
| tree | b0ec41168c1b7f6d51f9d283e47f574c4eb70f0d /web/template | |
| parent | d2e15101190f6ade30fd37b466d94cef85a2189f (diff) | |
| download | templates-c722f8281d0f19080f19928a69de950c1472cf94.tar.gz | |
Add post script and remove default styles
Diffstat (limited to 'web/template')
| -rw-r--r-- | web/template/Makefile | 6 | ||||
| -rw-r--r-- | web/template/assets/css/styles.css | 11 | ||||
| -rw-r--r-- | web/template/cargo-generate.toml | 3 | ||||
| -rw-r--r-- | web/template/post-script.rhai | 2 | ||||
| -rw-r--r-- | web/template/templates/layout.jinja | 2 |
5 files changed, 9 insertions, 15 deletions
diff --git a/web/template/Makefile b/web/template/Makefile index 447ab66..e5b32df 100644 --- a/web/template/Makefile +++ b/web/template/Makefile @@ -2,16 +2,16 @@ SASS ?= sass PNPM ?= pnpm CUSTOM_BOOTSTRAP_SCSS := vendor/custom-bootstrap/scss/custom.scss -CUSTOM_CSS_OUT := assets/css/custom.css +CUSTOM_CSS_OUT := assets/css/styles.css VENDOR_FOLDER := vendor/custom-bootstrap .PHONY: css watch-css install install: - $(SASS) -C $(VENDOR_FOLDER) install + $(PNPM) -C $(VENDOR_FOLDER) install css: - $(SASS) $(CUSTOM_BOOTSTRAP_SCSS) $(CUSTOM_CSS_OUT) + $(SASS) -q $(CUSTOM_BOOTSTRAP_SCSS) $(CUSTOM_CSS_OUT) watch-css: $(SASS) --watch $(CUSTOM_BOOTSTRAP_SCSS):$(CUSTOM_CSS_OUT) diff --git a/web/template/assets/css/styles.css b/web/template/assets/css/styles.css deleted file mode 100644 index 629c8d2..0000000 --- a/web/template/assets/css/styles.css +++ /dev/null @@ -1,11 +0,0 @@ -html { - -webkit-text-size-adjust: 100%; - padding-bottom: 4em; -} -body { - font-family: sans-serif; - line-height: 1.5em; - max-width: 40em; - padding: 0 2%; - margin: auto; -} diff --git a/web/template/cargo-generate.toml b/web/template/cargo-generate.toml index 85f8eed..5d05eeb 100644 --- a/web/template/cargo-generate.toml +++ b/web/template/cargo-generate.toml @@ -4,3 +4,6 @@ exclude = ["templates/*"] [placeholders] project-description = { type = "string", prompt = "Short description of the project", default = "An example generated using the simple template" } + +[hooks] +post = ["post-script.rhai"] diff --git a/web/template/post-script.rhai b/web/template/post-script.rhai new file mode 100644 index 0000000..88fdfcd --- /dev/null +++ b/web/template/post-script.rhai @@ -0,0 +1,2 @@ +system::command("git", ["init"]); +system::command("git", ["submodule", "add", "https://github.com/ijanc/custom-bootstrap", "vendor/custom-bootstrap"]); diff --git a/web/template/templates/layout.jinja b/web/template/templates/layout.jinja index ee06493..1d62c4c 100644 --- a/web/template/templates/layout.jinja +++ b/web/template/templates/layout.jinja @@ -16,7 +16,7 @@ <li><a href="/validation">Validation</a></li> </ul> </nav> - <h1><h1>Hello, World web =]</h1> + <h1>Hello, World web =]</h1> <p>Template form https://ijanc.org</p> {% block body %}{% endblock %} </body> |