From 54d875e671b33e7f5a281378dcba7d71c40ff005 Mon Sep 17 00:00:00 2001 From: m1kadev <67912368+m1kadev@users.noreply.github.com> Date: Fri, 5 Dec 2025 02:13:21 +0100 Subject: [PATCH] colour redesign :)) --- .gitignore | 1 + build.exs | 50 ++++++++++++++++++++++++ index.css => src/index.css | 12 +++++- index.html => src/index.html | 2 +- {assets => static}/github-mark-white.svg | 0 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 build.exs rename index.css => src/index.css (62%) rename index.html => src/index.html (94%) rename {assets => static}/github-mark-white.svg (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c795b054e5ade51b7031abab1581a5b7e2d2f5ba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/build.exs b/build.exs new file mode 100644 index 0000000000000000000000000000000000000000..e375b690ec3268caf9054a3225ef0d6687ba9912 --- /dev/null +++ b/build.exs @@ -0,0 +1,50 @@ +defmodule Builders do + def html(input_path) do + output_path = String.replace_prefix(input_path, "src", "build") + + System.cmd("html-minifier-next", [ + "--preset", + "comprehensive", + "-o", + output_path, + input_path + ]) + end + + def css(input_path) do + output_path = String.replace_prefix(input_path, "src", "build") + + System.cmd("lightningcss", [ + "-m", + "-o", + output_path, + input_path + ]) + end + + # TODO: js support :) +end + +File.rm_rf("build") + +case File.mkdir("build") do + :ok -> {} + _ -> raise "Couldn't create build folder" +end + +case File.mkdir("build/static") do + :ok -> {} + _ -> raise "Couldn't create build/static folder" +end + +Path.wildcard("src/**/*.html") +|> Task.async_stream(fn file -> Builders.html(file) end) +|> Enum.to_list() + +Path.wildcard("src/**/*.css") +|> Task.async_stream(fn file -> Builders.css(file) end) +|> Enum.to_list() + +Path.wildcard("static/**/*") +|> Task.async_stream(fn file -> File.cp(file, "build/" <> file) end) +|> Enum.to_list() diff --git a/index.css b/src/index.css similarity index 62% rename from index.css rename to src/index.css index 219b7f02e4884bbe33a179445ea96eb8170d1785..f01dffa364dc6ab9398fe8e4976fbdb53caf7f80 100644 --- a/index.css +++ b/src/index.css @@ -1,6 +1,12 @@ +@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); + +:root { + --bg-colour: #32174D; +} + body, html { - background-color: #101010; + background-color: var(--bg-colour); margin: 0px; } @@ -16,6 +22,8 @@ h3 { h1 { margin: 0px; + font-family: "Avenir Next Condensed"; + font-weight: normal; } #title { @@ -26,7 +34,7 @@ h1 { } #content { - font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + font-family: "Avenir Next"; color: #E0E0E0; position: absolute; top: 0px; diff --git a/index.html b/src/index.html similarity index 94% rename from index.html rename to src/index.html index 6c69d08a45f0104ff036c35063177d687ad753e8..6191518b12cf68e1886ca38b4d4a6067c663a7bd 100644 --- a/index.html +++ b/src/index.html @@ -28,7 +28,7 @@
- +
diff --git a/assets/github-mark-white.svg b/static/github-mark-white.svg similarity index 100% rename from assets/github-mark-white.svg rename to static/github-mark-white.svg