better layout, add back dark mode
This commit is contained in:
parent
e6eb0cdbd7
commit
6de9031055
12 changed files with 117 additions and 35 deletions
|
@ -1,3 +1,17 @@
|
|||
@import "tailwindcss/base";
|
||||
@import "tailwindcss/components";
|
||||
@import "tailwindcss/utilities";
|
||||
|
||||
body {
|
||||
--pagefind-ui-border-width: 1px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#search {
|
||||
--pagefind-ui-primary: #eeeeee;
|
||||
--pagefind-ui-text: #eeeeee;
|
||||
--pagefind-ui-background: rgb(64, 64, 64);
|
||||
--pagefind-ui-border: rgb(163, 163, 163);
|
||||
--pagefind-ui-tag: #152028;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ defmodule SloaneSH.Layouts.Helpers do
|
|||
def sorted_post_attrs(%Context{} = ctx) do
|
||||
ctx.posts
|
||||
|> Enum.map(& &1.attrs)
|
||||
|> Enum.sort_by(& &1[:date], &Date.compare/2)
|
||||
|> Enum.sort_by(& &1[:date], {:desc, Date})
|
||||
end
|
||||
|
||||
def fmt_date(date) do
|
||||
|
|
|
@ -9,10 +9,15 @@ defmodule SloaneSH.Layouts.Partials do
|
|||
:def,
|
||||
:header,
|
||||
~S"""
|
||||
<header class="flex flex-row justify-between gap-2 border-b border-neutral-700 pb-4 mb-2" data-pagefind-ignore>
|
||||
<div class="flex flex-col gap-2">
|
||||
<a href="/"><h1 class="text-2xl">sloane.sh</h1></a>
|
||||
<nav class="flex flex-row gap-2 text-xl">
|
||||
<header class="flex flex-row justify-between gap-2 pb-4 mb-2" data-pagefind-ignore>
|
||||
<div class="flex flex-col justify-end">
|
||||
<%= if attrs[:title] do %>
|
||||
<h1 class="text-3xl font-extrabold"><%= attrs[:title] %></h1>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 items-end">
|
||||
<a href="/"><span class="text-lg font-bold">sloane.sh</span></a>
|
||||
<nav class="flex flex-row gap-2">
|
||||
<a href="/" class="<%= cx(underline: attrs[:permalink] == "/") %>">home</a>
|
||||
<a href="/posts" class="<%= cx(underline: Map.get(attrs, :permalink, "") =~ ~r[^/posts]) %>">posts</a>
|
||||
<a href="/search" class="<%= cx(underline: attrs[:permalink] == "/search") %>">search</a>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= header(ctx, attrs) %>
|
||||
<main class="prose-neutral prose prose-xl" data-pagefind-body>
|
||||
<main class="prose-neutral prose max-w-none dark:prose-invert" data-pagefind-body>
|
||||
<%= inner_content %>
|
||||
</main>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%= header(ctx, attrs) %>
|
||||
|
||||
<article class="prose-neutral prose prose-xl" data-pagefind-body>
|
||||
<article class="prose-neutral prose max-w-none dark:prose-invert" data-pagefind-body>
|
||||
<%= inner_content %>
|
||||
</article>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<title><%= prefix_title("sloane.sh", attrs[:page_title]) %></title>
|
||||
<link rel="stylesheet" href="/assets/css/app.css" />
|
||||
</head>
|
||||
<body class="w-full max-w-3xl bg-white text-neutral-900">
|
||||
<body class="w-full max-w-3xl bg-white text-neutral-900 dark:bg-neutral-900 dark:text-neutral-200">
|
||||
<%= inner_content %>
|
||||
<script defer src="/assets/js/app.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
+++
|
||||
page_title = "home"
|
||||
permalink = "/"
|
||||
+++
|
||||
|
||||
hey, i'm sloane! i'm a professional software engineer and an amateur musician, photographer, wife, chef, and pet mom.
|
||||
|
||||
#### around the web
|
||||
|
||||
- [@sloane](https://tech.lgbt/@sloane) on the fediverse
|
||||
- [@sloanelybutsurely](https://github.com/sloanelybutsurely) on github
|
||||
- [@sloane_of_arc](https://instagram.com/sloane_of_arc) on instagram
|
27
priv/site/pages/home.md.eex
Normal file
27
priv/site/pages/home.md.eex
Normal file
|
@ -0,0 +1,27 @@
|
|||
+++
|
||||
page_title = "home"
|
||||
permalink = "/"
|
||||
+++
|
||||
|
||||
hey, i'm sloane! i'm a professional software engineer and an amateur musician, photographer, wife, chef, and pet mom.
|
||||
|
||||
### around the web
|
||||
|
||||
- [@sloane](https://tech.lgbt/@sloane) on the fediverse
|
||||
- [@sloanelybutsurely](https://github.com/sloanelybutsurely) on github
|
||||
- [@sloane_of_arc](https://instagram.com/sloane_of_arc) on instagram
|
||||
|
||||
### writing
|
||||
|
||||
i write more than i share but here are some things that have made it out of my drafts folder recently
|
||||
|
||||
<%= for post <- Enum.take(sorted_post_attrs(ctx), 3) do %>
|
||||
- <%= fmt_date(post[:date]) %>: [<%= post[:title] %>](<%= post[:permalink] %>)
|
||||
<% end %>
|
||||
|
||||
|
||||
### projects
|
||||
|
||||
#### 🌱 [screen.garden](https://screen.garden)
|
||||
|
||||
real-time collaboration across obsidian and the web. currently in closed beta.
|
|
@ -1,9 +1,16 @@
|
|||
<div class="mt-6" id="search"></div>
|
||||
</main>
|
||||
<div class="mt-6 mx-auto" id="search"></div>
|
||||
|
||||
<link rel="stylesheet" href="/pagefind/pagefind-ui.css" />
|
||||
<script src="/pagefind/pagefind-ui.js"></script>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
new PagefindUI({ element: '#search', showSubResults: true });
|
||||
});
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
new PagefindUI({
|
||||
element: '#search',
|
||||
showSubResults: true,
|
||||
showImages: false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<main>
|
||||
|
|
33
priv/site/posts/2023-07-03-obsidianrc.md
Normal file
33
priv/site/posts/2023-07-03-obsidianrc.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
+++
|
||||
date = 2023-07-23
|
||||
title = "obsidianrc - a programmer's approach to obsidian"
|
||||
page_title = "obsidian"
|
||||
+++
|
||||
|
||||
my biggest hangup with obsidian has always been that it isn't vim. as a longtime vim user i'm used to being able to fully customize and extend my editing experience.
|
||||
|
||||
there are many existing community plugins that make it easy to customize some parts of obsidian but whenever i would have an idea or a desired workflow that didn't fit into one of those existing boxes i was stuck.
|
||||
|
||||
i had three options, roughly in order of immediate work required:
|
||||
|
||||
1. adapt my own workflows to fit the existing options
|
||||
1. contribute to an existing community plugin and hope that the original author has time to review, merge in, and publish my change
|
||||
1. build my own plugin to do exactly what i want
|
||||
|
||||
so today i had an idea for another, hopefully easier option: obsidianrc
|
||||
|
||||
an obsidianrc is a personal, custom plugin that resembles an "[rc](https://superuser.com/questions/144339/vimrc-screenrc-bashrc-kshrc-etc-what-does-the-rc-mean)" file like a `.vimrc`. it has no one purpose but instead is a grab-bag of whatever the author needed at the time. an obsidian user's obsidianrc evolves with her as she comes up with new workflows or changes her existing workflows.
|
||||
|
||||
the freedom of the obsidianrc is that it never needs to be used by anyone but its author. it's a workbench covered in jigs. if any bit of functionality ever sticks out as generally useful the code is easily (famous last words perhaps...) extracted into its own plugin and published in the community plugin repo.
|
||||
|
||||
## create your own obsidianrc
|
||||
|
||||
1. use the [obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin) template
|
||||
1. name your repo `obsidianrc`
|
||||
1. install your obsidianrc in your vault
|
||||
1. fill your obsidianrc with whatever need whenever you need it
|
||||
1. (optional) use [BRAT](https://github.com/TfTHacker/obsidian42-brat) to install your obsidianrc and keep it up-to-date
|
||||
|
||||
## what's in my obsidianrc?
|
||||
|
||||
well at time of writing, not much. but you can take a look for yourself: [sloanelybutsurely/obsidianrc](https://github.com/sloanelybutsurely/obsidianrc)
|
19
priv/site/posts/2023-12-28-in-review-2023.md
Normal file
19
priv/site/posts/2023-12-28-in-review-2023.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
+++
|
||||
date = 2023-12-28
|
||||
title = "in review: 2023"
|
||||
page_title = "in review: 2023"
|
||||
+++
|
||||
|
||||
- **january**: visited family in florida
|
||||
- **february**: switched to injections (dolls, i implore you to do the same)
|
||||
- **march**: back in florida for an elastic on-site (and an evening at disney world)
|
||||
- **april**: saw caroline polachek live
|
||||
- **may**: visited a friend in kentucky
|
||||
- **june**: was in a friend’s wedding, had brunch with friends passing through town, performed with the columbus gay men’s chorus, pride!! 🏳️🌈
|
||||
- **july**: vacationed in northern michigan, went to a minor league baseball game, saw an airshow (hayley’s first!), started a new job
|
||||
- **august**: went to the state fair
|
||||
- **september**: just enjoyed the last bits of summer
|
||||
- **october**: saw kim petras live in DC, started working towards my private pilot certificate
|
||||
- **november**: celebrated my 30th birthday
|
||||
- **december**: celebrated the holidays and rang in the new year with family and friends
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
+++
|
||||
title = "Test Post"
|
||||
page_title = "Test Post"
|
||||
date = 2024-02-16
|
||||
+++
|
||||
|
||||
# Test Post
|
||||
|
||||
this is just a test of the posts functionality
|
||||
|
||||
Does this work ?
|
Loading…
Reference in a new issue