Compare commits

..

No commits in common. "1f9246e8db66a1875511355125c2994ebc73fc0f" and "e8115b0c01580b4fd95f33d9c29d37c6b8a1c24f" have entirely different histories.

17 changed files with 18 additions and 40 deletions

View file

@ -12,9 +12,6 @@ html {
--line-trim: -0.6666666666666667px;
font-size: var(--font-size);
line-height: var(--line-height);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.container {
@ -25,31 +22,27 @@ a {
@apply text-blue;
}
nav a {
@apply text-dark;
}
.box {
--tw-border-opacity: 1;
border-color: rgb(181 190 255 / var(--tw-border-opacity));
border: 2px solid;
margin: 0 5px;
margin: 12px 5px;
padding: 12px 5px;
padding-left: 29px;
padding-right: 29px;
}
.cache-bust {
padding-left: 1px;
}
p {
@apply font-sans;
margin-bottom: var(--vspace);
}
a:hover, a.current {
@apply bg-light text-dark border-light;
}
a.current {
border: 0;
a:hover {
@apply bg-light text-dark;
}
ul>li {

View file

@ -10,7 +10,7 @@ module.exports = {
colors: {
transparent: 'transparent',
current: 'currentColor',
dark: 'rgb(7, 12, 0)',
dark: 'rgb(15, 24, 1)',
red: 'rgb(207, 23, 44)',
green: 'rgb(25, 114, 13)',
yellow: 'rgb(217, 196, 38)',

View file

@ -60,7 +60,6 @@ defmodule PreDotHn do
index = make_index(posts)
PreDotHn.LinkLog.run()
PreDotHn.Static.run()
Enum.map([index | posts], &write_page/1)
end
@ -213,7 +212,7 @@ defmodule PreDotHn do
</head>
<body class="bg-dark font-mono text-light">
<.menu slug={@slug} />
<.menu />
<%= render_slot(@inner_block) %>
</body>
</html>
@ -222,11 +221,13 @@ defmodule PreDotHn do
def menu(assigns) do
~H"""
<nav class="text-light flex justify-center">
<div class="container flex">
<a class={"box rounded-tr !mt-[28px] !-mb-[2px] !border-b-light #{if @slug == "index", do: "current"}"} href="/">About Me</a>
<a class={"box rounded-tr !mt-[28px] !-mb-[2px] !border-b-light #{if @slug == "blog", do: "current"}"} href="/blog">Blog</a>
<a class={"box rounded-tr !mt-[28px] !-mb-[2px] !border-b-light #{if @slug == "link-log", do: "current"}"} href="/link-log">Link Log</a>
<nav class="block bg-blue text-dark flex justify-center">
<div class="container flex ml-[-0.95rem]">
<a class="px-[0.6rem]" href="/">About Me</a>
<span>|</span>
<a class="px-[0.6rem]" href="/blog">Blog</a>
<span>|</span>
<a class="px-[0.6rem]" href="/link-log">Link Log</a>
</div>
</nav>
"""
@ -244,7 +245,7 @@ defmodule PreDotHn do
~H"""
<.layout title={@title} slug={@slug} description={assigns[:description]}>
<main class="container mx-auto z-10 relative">
<main class="container mx-auto py-[2.6rem]">
<section class="box border border-light">
<h1><%= @title %></h1>
<%= {:safe, @body} %>

View file

@ -1,15 +0,0 @@
defmodule PreDotHn.Static do
def run() do
"site/static/**/*"
|> Path.wildcard()
|> Enum.each(fn path ->
build_path = String.replace(path, "site", "priv")
if File.dir?(path) do
File.mkdir_p!(build_path)
else
File.copy!(path, build_path)
end
end)
end
end

View file

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View file

@ -4,5 +4,4 @@ set -e
set -x
mix pre_dot_hn.build
s3cmd sync -MP priv/static/ s3://pre.hn --exclude "*.css"
s3cmd put -P -m "text/css" priv/static/assets/app.css s3://pre.hn/assets/app.css
s3cmd sync -P priv/static/ s3://pre.hn

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB