fix: Remove assets from priv/static and put them under site/static
This commit is contained in:
parent
1dc69ae161
commit
1f9246e8db
16 changed files with 34 additions and 17 deletions
|
@ -12,6 +12,9 @@ html {
|
||||||
--line-trim: -0.6666666666666667px;
|
--line-trim: -0.6666666666666667px;
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
|
@ -22,15 +25,11 @@ a {
|
||||||
@apply text-blue;
|
@apply text-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a {
|
|
||||||
@apply text-dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
--tw-border-opacity: 1;
|
--tw-border-opacity: 1;
|
||||||
border-color: rgb(181 190 255 / var(--tw-border-opacity));
|
border-color: rgb(181 190 255 / var(--tw-border-opacity));
|
||||||
border: 2px solid;
|
border: 2px solid;
|
||||||
margin: 12px 5px;
|
margin: 0 5px;
|
||||||
padding: 12px 5px;
|
padding: 12px 5px;
|
||||||
padding-left: 29px;
|
padding-left: 29px;
|
||||||
padding-right: 29px;
|
padding-right: 29px;
|
||||||
|
@ -45,8 +44,12 @@ p {
|
||||||
margin-bottom: var(--vspace);
|
margin-bottom: var(--vspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover, a.current {
|
||||||
@apply bg-light text-dark;
|
@apply bg-light text-dark border-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.current {
|
||||||
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul>li {
|
ul>li {
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
colors: {
|
colors: {
|
||||||
transparent: 'transparent',
|
transparent: 'transparent',
|
||||||
current: 'currentColor',
|
current: 'currentColor',
|
||||||
dark: 'rgb(15, 24, 1)',
|
dark: 'rgb(7, 12, 0)',
|
||||||
red: 'rgb(207, 23, 44)',
|
red: 'rgb(207, 23, 44)',
|
||||||
green: 'rgb(25, 114, 13)',
|
green: 'rgb(25, 114, 13)',
|
||||||
yellow: 'rgb(217, 196, 38)',
|
yellow: 'rgb(217, 196, 38)',
|
||||||
|
|
|
@ -60,6 +60,7 @@ defmodule PreDotHn do
|
||||||
index = make_index(posts)
|
index = make_index(posts)
|
||||||
|
|
||||||
PreDotHn.LinkLog.run()
|
PreDotHn.LinkLog.run()
|
||||||
|
PreDotHn.Static.run()
|
||||||
|
|
||||||
Enum.map([index | posts], &write_page/1)
|
Enum.map([index | posts], &write_page/1)
|
||||||
end
|
end
|
||||||
|
@ -212,7 +213,7 @@ defmodule PreDotHn do
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-dark font-mono text-light">
|
<body class="bg-dark font-mono text-light">
|
||||||
<.menu />
|
<.menu slug={@slug} />
|
||||||
<%= render_slot(@inner_block) %>
|
<%= render_slot(@inner_block) %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -221,13 +222,11 @@ defmodule PreDotHn do
|
||||||
|
|
||||||
def menu(assigns) do
|
def menu(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<nav class="block bg-blue text-dark flex justify-center">
|
<nav class="text-light flex justify-center">
|
||||||
<div class="container flex ml-[-0.95rem]">
|
<div class="container flex">
|
||||||
<a class="px-[0.6rem]" href="/">About Me</a>
|
<a class={"box rounded-tr !mt-[28px] !-mb-[2px] !border-b-light #{if @slug == "index", do: "current"}"} href="/">About Me</a>
|
||||||
<span>|</span>
|
<a class={"box rounded-tr !mt-[28px] !-mb-[2px] !border-b-light #{if @slug == "blog", do: "current"}"} href="/blog">Blog</a>
|
||||||
<a class="px-[0.6rem]" 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>
|
||||||
<span>|</span>
|
|
||||||
<a class="px-[0.6rem]" href="/link-log">Link Log</a>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
"""
|
"""
|
||||||
|
@ -245,7 +244,7 @@ defmodule PreDotHn do
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<.layout title={@title} slug={@slug} description={assigns[:description]}>
|
<.layout title={@title} slug={@slug} description={assigns[:description]}>
|
||||||
<main class="container mx-auto py-[2.6rem]">
|
<main class="container mx-auto z-10 relative">
|
||||||
<section class="box border border-light">
|
<section class="box border border-light">
|
||||||
<h1><%= @title %></h1>
|
<h1><%= @title %></h1>
|
||||||
<%= {:safe, @body} %>
|
<%= {:safe, @body} %>
|
||||||
|
|
15
lib/pre_dot_hn/static.ex
Normal file
15
lib/pre_dot_hn/static.ex
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
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
|
BIN
site/static/images/el-problema-pixel.png
Executable file
BIN
site/static/images/el-problema-pixel.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Loading…
Reference in a new issue