WIP: add css from stasis

This commit is contained in:
2025-05-09 18:03:43 -07:00
parent 3190c9388d
commit 73a5cd7122
15 changed files with 1146 additions and 6 deletions

10
templates/app.html.heex Normal file
View File

@@ -0,0 +1,10 @@
<section>
<h2>Hi, I'm Catalin Mititiuc</h2>
<p>
Experienced in full-stack web development with Elixir and JavaScript.
</p>
<p>Hiring? Reach me by <a href="mailto:webdevcat@proton.me">email</a>.</p>
</section>
<%= @inner_content %>

9
templates/blog.html.heex Normal file
View File

@@ -0,0 +1,9 @@
<section>
<h2><a href="/posts/">Web Log</a></h2>
<p>Elixir, JavaScript, SVG, Containers, Git, Linux</p>
<p>
Questions, comments, feedback? <a href="mailto:webdevcat@proton.me">Contact the author</a>.
</p>
</section>
<%= @inner_content %>

40
templates/home.html.heex Normal file
View File

@@ -0,0 +1,40 @@
<h2>Wares</h2>
<section>
<h3>
<a href="/apps/btroops/">BTroops</a>
<a class="app-source-code-link" href="/git/btroops/">
View Source Code
</a>
</h3>
<p>A virtual implementation of FASA's 1989 wargame, Battletroops, for
the browser. Suitable for single-player solo play or two-player hotseat.</p>
<p>Runs entirely on the client after the initial download from the
server. Built with HTML5, SVG and JavaScript. Uses Node.js, Esbuild and
Docker for building and running dev/test servers.</p>
</section>
<section>
<h3>
<a href="https://hex.pm/packages/pandoc">Pandoc</a>
<a class="app-source-code-link" href="/git/pandoc/">
View Source Code
</a>
</h3>
<p>
A Hex package for installing and invoking <a href="https://pandoc.org/">Pandoc</a>
("a universal document converter"), fashioned after Phoenix's
<a href="https://hex.pm/packages/esbuild">Esbuild</a>
and <a href="https://hex.pm/packages/tailwind">Tailwind</a>
packages. Also included is a file system watcher, so that converted
documents are updated as soon as content changes are saved.
</p>
</section>
<%= StasisWeb.PostHTML.index(%{posts: @posts}) %>
<h4 style="text-align: center;">
<.link href={~p"/posts"} method="get">View more posts</.link>
</h4>

33
templates/index.html Normal file
View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en" style="scrollbar-gutter:stable;">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>$title</title>
<link
rel="stylesheet"
id="font-bitter-css"
href="//fonts.googleapis.com/css?family=Bitter:400,700"
type="text/css"
media="screen"
/>
<link rel="stylesheet" href="$root/app.css" />
</head>
<body class="bg-white">
<header>
<div style="display: inline-block;">
<h1><a href="/">Web Dev Solutions</a></h1>
<h3 style="text-align: left">Catalin Mititiuc</h3>
</div>
</header>
<main>
$body
</main>
<footer>
<p>100% Human Made, No AI Used</p>
<p>$app_name $version</p>
</footer>
</body>
</html>

76
templates/root.html.heex Normal file
View File

@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en" style="scrollbar-gutter:stable;">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token" content={get_csrf_token()} />
<.live_title suffix=" · Catalin Mititiuc">
<%= assigns[:page_title] || "WebDevCat.me" %>
</.live_title>
<link
rel="stylesheet"
id="font-bitter-css"
href="//fonts.googleapis.com/css?family=Bitter:400,700"
type="text/css"
media="screen"
/>
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
<%= if assigns[:cgit] do %>
<link phx-track-static rel="stylesheet" href={~p"/assets/cgit.css"} />
<style>
article > * { max-width: unset; }
div#cgit table.list {
table-layout: auto;
width: 100%;
display: table;
}
div#cgit div.content {
overflow: scroll;
}
div#cgit table.tabs {
table-layout: auto;
width: 100%;
display: table;
}
div#cgit table.blob {
table-layout: auto;
width: 100%;
display: table;
}
div#cgit table.tabs {
table-layout: auto;
width: 100%;
display: table;
}
td.linenumbers { width: 1px; }
td.lines { max-width: 1px; overflow: hidden; }
td.linenumbers pre, td.lines pre {
line-height: 1.25em;
}
pre { overflow-x: scroll; overflow-y: hidden; }
code { font-size: unset; }
</style>
<% end %>
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
</script>
</head>
<body class="bg-white">
<header>
<div style="display: inline-block;">
<h1><a href="/">Web Dev Solutions</a></h1>
<h3 style="text-align: left">Catalin Mititiuc</h3>
</div>
</header>
<main>
<%= @inner_content %>
</main>
<footer>
<p>100% Human Made, No AI Used</p>
<p><%= app_name() %> <%= version() %></p>
</footer>
</body>
</html>