about summary refs log tree commit diff
path: root/web/blog/fragments.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-09T00·01+0000
committerVincent Ambo <tazjin@google.com>2020-02-09T00·01+0000
commit39854d71b2afa5e793acb6a76f30b038bf569cca (patch)
tree8dce2bdbbc3dd144b4d501989a5f07803bfe3f93 /web/blog/fragments.nix
parente6002f95cd3ad5c4ee449e6a51c50f07da26f287 (diff)
refactor(web): Serve static assets to //web/homepage r/490
Shuffles around the nginx locations that are served to ensure that all
static content will be served from tazj.in/static (including for the
blog).
Diffstat (limited to 'web/blog/fragments.nix')
-rw-r--r--web/blog/fragments.nix24
1 files changed, 5 insertions, 19 deletions
diff --git a/web/blog/fragments.nix b/web/blog/fragments.nix
index 4af642c01e24..646cd7d3172d 100644
--- a/web/blog/fragments.nix
+++ b/web/blog/fragments.nix
@@ -20,15 +20,13 @@ let
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <meta name="description" content="tazjin&#39;s blog">
-    <link rel="stylesheet" type="text/css" href="static/blog.css" media="all">
+    <link rel="stylesheet" type="text/css" href="/static/tazjin.css" media="all">
     <link rel="alternate" type="application/rss+xml" title="RSS-Feed" href="/rss.xml">
-    <title>tazjin&#39;s blog${lib.optionalString (title != "") (
-      ": " + (escape title)
-    )}</title>
+    <title>tazjin&#39;s blog: ${escape title}</title>
   </head>
-  <body>
+  <body class="light">
     <header>
-      <h1><a class="unstyled-link" href="/">tazjin&#39;s blog</a> </h1>
+      <h1><a class="blog-title" href="/">tazjin&#39;s interblag</a> </h1>
       <hr>
     </header>
   '';
@@ -68,18 +66,6 @@ let
   isDraft = post: (hasAttr "draft" post) && post.draft;
   isUnlisted = post: (hasAttr "listed" post) && !post.listed;
   includePost = post: !(isDraft post) && !(isUnlisted post);
-
-  indexEntry= post: "<li>a blog post</li>";
-  blogIndex = posts: writeText "blog-index.html" (lib.concatStrings (
-    [
-      (header "")
-      "<ul>"
-    ]
-    ++ (map indexEntry (filter includePost posts))
-    ++ [
-      "</ul>"
-      footer
-    ]));
 in {
-  inherit blogIndex renderPost;
+  inherit renderPost;
 }