tags.clj 988 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
(ns ok.tags
  (:require [ok.layout :as layout]
            [ok.helper :refer [category-link
                               author-section
                               date-of-post-section
                               word-count-section
                               time-to-read-section
                               subheader-post]]))


(defn render-post
  "Renders a post list."
  [post]
  [:article.blog-post {:itemscope true
                       :itemtype "https://schema.org/BlogPosting"}
   [:h3.headline {:itemprop "headline"}

    [:a.nunito {:href (:permalink post)
                :itemprop "url"}
     (:title post)]]
   (subheader-post post)])


(defn render [{global-meta :meta posts :entries page :entry}]
  (layout/blog global-meta
               posts
Alain M. Lafon's avatar
Alain M. Lafon committed
27
               [:main {:id "tags"}
28 29 30 31
                [:h1.headline (str "#" (:tag page))]
                [:div.content {:id "content"}
                 (for [post posts]
                   (render-post post))]]))