M => +2 -2
@@ 1,4 1,4 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/base.css">
<script src="/static/ldbuilddata.js" defer></script>
\ No newline at end of file
<link rel="stylesheet" href="/styles/base.css">
<script src="/scripts/ldbuilddata.js" defer></script>
\ No newline at end of file
M build.exs => build.exs +20 -16
@@ 64,7 64,7 @@ defmodule Builders do
end
def css(input_path) do
- output_path = String.replace_prefix(input_path, "src", "build")
+ output_path = "build/" <> input_path
{_, 0} =
System.cmd("lightningcss", [
@@ 76,7 76,7 @@ defmodule Builders do
end
def js(input_path) do
- output_path = String.replace_prefix(input_path, "src", "build")
+ output_path = "build/" <> input_path
{_, 0} =
System.cmd("uglifyjs", [
@@ 131,13 131,14 @@ defmodule Builders do
defp _fxg(input_path, template, bricks) do
output_path =
- String.replace_prefix(input_path, "src", "build")
+ String.replace_prefix(input_path, "pages", "build")
|> String.replace_suffix("fxg", "html")
{content, 0} = System.cmd("fxg", [input_path])
output = Mustache.render(template, Map.merge(%{fxg_content: content}, bricks))
- File.write(output_path, output)
+ IO.inspect(output_path)
+ :ok = File.write(output_path, output)
end
def thought(path, unix) do
@@ 184,10 185,7 @@ end
File.rm_rf("build")
-case File.mkdir_p("build/static") do
- :ok -> {}
- _ -> raise "Couldn't create the build file structure (/build/static)"
-end
+File.mkdir_p!("build")
bricks =
Path.wildcard("bricks/*.html")
@@ 195,20 193,26 @@ bricks =
{:ok, main_template} = File.read("templates/base.html")
-Path.wildcard("src/**/*.css")
-|> Task.async_stream(fn file -> Builders.css(file) end)
+Path.wildcard("pages/**/*.fxg")
+|> Task.async_stream(fn file -> Builders.fxg(file, main_template, bricks) end)
|> Enum.to_list()
-Path.wildcard("src/**/*.js")
-|> Task.async_stream(fn file -> Builders.js(file) end)
+File.mkdir_p!("build/static")
+
+Path.wildcard("static/**/*")
+|> Task.async_stream(fn file -> File.cp(file, "build/" <> file) end)
|> Enum.to_list()
-Path.wildcard("src/**/*.fxg")
-|> Task.async_stream(fn file -> Builders.fxg(file, main_template, bricks) end)
+File.mkdir_p!("build/scripts")
+
+Path.wildcard("scripts/**/*.js")
+|> Task.async_stream(fn file -> Builders.js(file) end)
|> Enum.to_list()
-Path.wildcard("static/**/*")
-|> Task.async_stream(fn file -> File.cp(file, "build/" <> file) end)
+File.mkdir_p!("build/styles")
+
+Path.wildcard("styles/**/*.css")
+|> Task.async_stream(fn file -> Builders.css(file) end)
|> Enum.to_list()
File.mkdir_p("build/pastes")
R src/colophon.fxg => pages/colophon.fxg +0 -0
A pages/colophon.html => pages/colophon.html +52 -0
@@ 0,0 1,52 @@
+<!DOCTYPE html>
+<html lang="en-GB">
+
+<head>
+
+ <meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="stylesheet" href="/styles/base.css">
+<script src="/scripts/ldbuilddata.js" defer></script>
+
+ <script src="/static/highlight.min.js"></script>
+<script defer>hljs.highlightAll();</script>
+<link rel="stylesheet" href="/static/arta.min.css">
+
+ <title>home - m1kadev</title>
+</head>
+
+<body>
+ <div id="content">
+ <main>
+ <h1>colophon</h1> <h2>about</h2> you're looking at a <a href="https://en.wiktionary.org/wiki/beautiful#English">beautiful</a> site, with <a href="https://caddyserver.com/">caddy</a> as its backend. all source pages are written in my own markup language, <a href="https://github.com/m1kadev/fxg">fxg</a>. site generation is done by a homebrewn <a href="https://github.com/m1kadev/www.m1kadev.nl/blob/main/build.exs">elixir script</a>. all code (including <a href="https://github.com/m1kadev/fxg">fxg</a>) is licenced under the MIT licence.
+ <hr>
+ <footer>
+ <div id="metadata">
+ <p>Deployed from commit <code><span class="from-commit-short"></span></code>, on <span class="build-date"></span> </p>
+ </div>
+ <div id="lynx">
+ <a href="https://github.com/m1kadev">
+ <img src="/static/github-mark-white.svg" width="32" height="32" alt="GitHub logo">
+ </a>
+ </div>
+</footer>
+ </main>
+ </div>
+
+ <div id="mark">
+ <h3>.nl</h3>
+ <h1>m1kadev</h1>
+ <nav>
+ <hr>
+ <a href="/">home</a>
+ <a href="/projects.html">projects</a>
+ <a href="/thoughts/">thoughts</a>
+ <a href="/pastes/">pastes</a>
+ <hr>
+ <a href="/colophon.html">colophon</a>
+ </nav>
+</div>
+
+</body>
+
+</html><
\ No newline at end of file
R src/index.fxg => pages/index.fxg +0 -0
A pages/index.html => pages/index.html +53 -0
@@ 0,0 1,53 @@
+<!DOCTYPE html>
+<html lang="en-GB">
+
+<head>
+
+ <meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="stylesheet" href="/styles/base.css">
+<script src="/scripts/ldbuilddata.js" defer></script>
+
+ <script src="/static/highlight.min.js"></script>
+<script defer>hljs.highlightAll();</script>
+<link rel="stylesheet" href="/static/arta.min.css">
+
+ <title>home - m1kadev</title>
+</head>
+
+<body>
+ <div id="content">
+ <main>
+ <h1>haii :3 i'm mika</h1> haiii!!! i'm mika (also <em>m1ka</em>, <em>m1kadev</em>). i'm a (mostly backend) developer from <a href="https://en.wikipedia.org/wiki/Nederland">The Netherlands</a>. i'm also a big fan of making drinks & cooking. <br/><h3>about me</h3> i do VWO (dutch A-levels) phyiscs in the greater rotterdam area. i've been working on <a href="https://www.github.com/m1kadev/fxg">fxg</a>, a markup language written in <a href="https://rust-lang.org/">Rust</a>. also, i've been playing around with functional programming (mostly in <a href="https://elixir-lang.org">Elixir</a>). <br/>Together with 3 other friends, we run <a href="https://dupunkto.org/">{du}punkto</a> <br/><h3>contact</h3>feel free to reach out to me! you can reach me at m1kadev on <a href="https://discord.com/">discord</a>, or on my email address at <br/><pre><code class="language-rust">format!("{2}@{0}.{1}", "dupunkto", "org", "mika")
+</code></pre><small>this code is to filter out all non-<code>format!</code> users</small>
+ <hr>
+ <footer>
+ <div id="metadata">
+ <p>Deployed from commit <code><span class="from-commit-short"></span></code>, on <span class="build-date"></span> </p>
+ </div>
+ <div id="lynx">
+ <a href="https://github.com/m1kadev">
+ <img src="/static/github-mark-white.svg" width="32" height="32" alt="GitHub logo">
+ </a>
+ </div>
+</footer>
+ </main>
+ </div>
+
+ <div id="mark">
+ <h3>.nl</h3>
+ <h1>m1kadev</h1>
+ <nav>
+ <hr>
+ <a href="/">home</a>
+ <a href="/projects.html">projects</a>
+ <a href="/thoughts/">thoughts</a>
+ <a href="/pastes/">pastes</a>
+ <hr>
+ <a href="/colophon.html">colophon</a>
+ </nav>
+</div>
+
+</body>
+
+</html><
\ No newline at end of file
R src/projects.fxg => pages/projects.fxg +0 -0
A pages/projects.html => pages/projects.html +52 -0
@@ 0,0 1,52 @@
+<!DOCTYPE html>
+<html lang="en-GB">
+
+<head>
+
+ <meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="stylesheet" href="/styles/base.css">
+<script src="/scripts/ldbuilddata.js" defer></script>
+
+ <script src="/static/highlight.min.js"></script>
+<script defer>hljs.highlightAll();</script>
+<link rel="stylesheet" href="/static/arta.min.css">
+
+ <title>home - m1kadev</title>
+</head>
+
+<body>
+ <div id="content">
+ <main>
+ <h1>projects</h1> <h3>fxg</h3> <a href="https://github.com/m1kadev/fxg">fxg</a> is my own markup language, written in <a href="https://rust-lang.org/">Rust</a>. it aims to maximise readability in text form, and tries to only have one way to write markup (unlike Markdown). you can view <a href="https://github.com/m1kadev/www.m1kadev.nl/blob/main/src/projects.fxg">the source</a> of this page, if you'd like to see for yourself. <br/><h3>m1kadev.nl</h3>the site you're on right now! the <a href="https://github.com/m1kadev/www.m1kadev.nl/blob/main/build.exs">generator</a> for this site is written in elixir. all code for the generator (besides <a href="https://hexdocs.pm/tzdata/readme.html">Tzdata</a>, for the build timestamp) is written by me.
+ <hr>
+ <footer>
+ <div id="metadata">
+ <p>Deployed from commit <code><span class="from-commit-short"></span></code>, on <span class="build-date"></span> </p>
+ </div>
+ <div id="lynx">
+ <a href="https://github.com/m1kadev">
+ <img src="/static/github-mark-white.svg" width="32" height="32" alt="GitHub logo">
+ </a>
+ </div>
+</footer>
+ </main>
+ </div>
+
+ <div id="mark">
+ <h3>.nl</h3>
+ <h1>m1kadev</h1>
+ <nav>
+ <hr>
+ <a href="/">home</a>
+ <a href="/projects.html">projects</a>
+ <a href="/thoughts/">thoughts</a>
+ <a href="/pastes/">pastes</a>
+ <hr>
+ <a href="/colophon.html">colophon</a>
+ </nav>
+</div>
+
+</body>
+
+</html><
\ No newline at end of file
R static/ldbuilddata.js => scripts/ldbuilddata.js +0 -0
R static/base.css => styles/base.css +0 -0
A styles/index.css => styles/index.css +15 -0
@@ 0,0 1,15 @@
+#motd {
+ position: absolute;
+ color: var(--txt-colour);
+ width: 100vw;
+ font-family: "Space Grotesk", sans-serif;
+}
+
+#motd>h2 {
+ position: relative;
+ float: right;
+ writing-mode: vertical-lr;
+ text-decoration: none;
+ margin: 0;
+ padding: .5em;
+}<
\ No newline at end of file
M templates/base.html => templates/base.html +0 -2
@@ 7,8 7,6 @@
{{ &highlight }}
- <script src="/static/rust.min.js"></script>
-
<title>home - m1kadev</title>
</head>
A templates/pages/index.html => templates/pages/index.html +32 -0
@@ 0,0 1,32 @@
+<!DOCTYPE html>
+<html lang="en-GB">
+
+<head>
+
+ {{ &base_header }}
+
+ {{ &highlight }}
+
+ <script src="/static/rs.min.js"></script>
+ <link rel="stylesheet" href="/styles/index.css">
+
+ <title>home - m1kadev</title>
+</head>
+
+<body>
+ <div id="motd">
+ <h2></h2>
+ </div>
+ <div id="content">
+ <main>
+ {{ &fxg_content }}
+ <hr>
+ {{ &footer }}
+ </main>
+ </div>
+
+ {{ &navbar }}
+
+</body>
+
+</html><
\ No newline at end of file