~mika/www.m1kadev.nl

d4b54390acc81617f55d893319395643e8650d06 — m1ka 3 months ago f96a730
update issue padding
3 files changed, 14 insertions(+), 10 deletions(-)

M kethel/lib/pages.ex
M kethel/main.exs
M styles/base.css
M kethel/lib/pages.ex => kethel/lib/pages.ex +2 -2
@@ 61,14 61,14 @@ defmodule Pages do
    IO.puts("[COMPILED] #{pages.project_root}/pages#{page_path}.fxg -> #{output_path}")
  end

  @doc "Invokes the fxg compiler, a la `fxg -`, piping `data` into the process stdin, and reading the stdout. "
  # doc "Invokes the fxg compiler, a la `fxg -`, piping `data` into the process stdin, and reading the stdout. "
  @spec invoke_fxg(binary()) :: binary()
  defp invoke_fxg(data) do
    {:ok, res} = Rambo.run("fxg", ["-"], in: data)
    res.out
  end

  @doc "Invokes the fxg compiler, a la `fxg -`, piping `data` into the process stdin, and reading the stdout. "
  # doc "Invokes the fxg compiler, a la `fxg -`, piping `data` into the process stdin, and reading the stdout. "
  @spec invoke_hmn(binary()) :: binary()
  defp invoke_hmn(data) do
    {:ok, res} = Rambo.run("npx", ["html-minifier-next", "--preset", "conservative"], in: data)

M kethel/main.exs => kethel/main.exs +11 -3
@@ 25,6 25,7 @@ if folder != nil do
    Task.await_many([styles_task, pages_task, scripts_task, thoughts_task], :infinity)

  collection_time_end = System.monotonic_time(:millisecond)
  delta_r = collection_time_end - collection_time_start

  compilation_time_start = System.monotonic_time(:millisecond)



@@ 33,7 34,7 @@ if folder != nil do
  scripts_compile_task = Task.async(fn -> Scripts.compile(scripts) end)
  thoughts_compile_task = Task.async(fn -> Thoughts.compile(thoughts) end)

  [pages_time, styles_time, scripts_time, thoughts_time, statics] =
  [pages_time, styles_time, scripts_time, thoughts_time, _] =
    Task.await_many(
      [
        pages_compile_task,


@@ 61,8 62,6 @@ if folder != nil do

  IO.puts("[COMPILED] #{project_root}/build/rss.xml")

  IO.puts("[COMPILED] #{project_root}/build/info.txt")

  IO.puts("Finalising...")

  File.cp!("#{project_root}/favicon.ico", "#{project_root}/build/favicon.ico")


@@ 78,6 77,15 @@ if folder != nil do
  IO.puts(:stderr, "Styles (compile)           | #{styles_time}ms")
  IO.puts(:stderr, "Scripts (compile)          | #{scripts_time}ms")
  IO.puts(:stderr, "Thoughts (compile)         | #{thoughts_time}ms")
  IO.puts(:stderr, String.duplicate("-", 35))

  delta_c = compilation_time_end - compilation_time_start
  ratio = (delta_r / delta_c) |> Float.to_string()

  IO.puts(
    :stderr,
    "www.m1kadev.nl compiled in #{(delta_c + delta_r) / 1000} seconds (ratio #{ratio |> binary_part(0, min(5, byte_size(ratio)))})"
  )
else
  IO.puts(:stderr, "The root project folder should be provided on the command line")
end

M styles/base.css => styles/base.css +1 -5
@@ 113,12 113,7 @@ p {
    flex-grow: 1;
}

footer {
    width: min(100vw, 450px);
}

footer>#build-info {
    width: min(100vw, 450px);
    padding: .5rem;
}



@@ 180,6 175,7 @@ img#codeberg {

    footer {
        width: initial;
        padding: .1rem;
    }

    footer>#build-info {