~mika/www.m1kadev.nl

54d875e671b33e7f5a281378dcba7d71c40ff005 — m1kadev 7 months ago 92b7153
colour redesign :))
A .gitignore => .gitignore +1 -0
@@ 0,0 1,1 @@
build
\ No newline at end of file

A build.exs => build.exs +50 -0
@@ 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()

R index.css => src/index.css +10 -2
@@ 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;

R index.html => src/index.html +1 -1
@@ 28,7 28,7 @@
                </div>
                <div id="lynx">
                    <a href="https://github.com/m1kadev">
                        <img src="/assets/github-mark-white.svg" width="32" height="32">
                        <img src="/static/github-mark-white.svg" width="32" height="32">
                    </a>
                </div>
            </footer>

R assets/github-mark-white.svg => static/github-mark-white.svg +0 -0