~timharek/timharek.no

8f632cd05ce6ddbc03557d6325bda4a8da9ce6ca — Tim Hårek Andreassen 2 months ago 0d495fc
feat: Add tag for drafts

Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
1 files changed, 14 insertions(+), 6 deletions(-)

M components/PostList.tsx
M components/PostList.tsx => components/PostList.tsx +14 -6
@@ 9,12 9,20 @@ export function PostList({ posts }: Props) {
    <ul class="space-y-4">
      {posts.map((post) => (
        <li class="h-entry border-l-4 border-primary pl-2 w-full">
          <div class="flex flex-wrap-reverse gap-2 justify-between ">
            <Link
              href={`/${post.path}`}
              label={post.title}
              className="p-name u-url"
            />
          <div class="flex flex-wrap-reverse gap-2 justify-between">
            <div class="flex gap-2">
              <Link
                href={`/${post.path}`}
                label={post.title}
                className="p-name u-url"
              />
              {post.draft &&
                (
                  <div class="text-xs border-1 border-green-400 text-green-400 py-0.5 px-2 rounded-full lowercase">
                    Draft
                  </div>
                )}
            </div>
            {post.date && (
              <time
                class="dt-published text-gray-400 font-mono"