<commit_before>(ns lambda-blog.templates.entries
  (:refer-clojure :exclude [time])
  (:require [lambda-blog.templates.bits :refer [info-label row text-centered well]]
            [lambda-blog.templates.page :refer [page]]
            [lambda-blog.utils :refer [format-date pathcat]]
            [s-html.tags :refer [a article div footer h1 header hr i li nav p span time ul]]))

(defn entry-title [{:keys [path path-to-root tags timestamp title]}]
  (text-centered
   (h1 (a {:href (pathcat path-to-root path)} title))
   (p "Posted on " (time (format-date timestamp)))
   (nav (map #(info-label
               (a {:class :tag
                   :href (pathcat path-to-root (:path %))}
                  (:id %)))
             (sort-by :id tags)))))

(defn pager [{:keys [path-to-root]} {:keys [path title] :as link} class]
  (div {:class [:col-xs-2 :col-sm-3]}
       (when link
         (nav
          (ul {:class :pager}
              (li {:class class}
                  (a {:href (pathcat path-to-root path)}
                     (when (= class :previous)
                       (i {:class [:fa :fa-chevron-left]}))
                     (span {:class [:title-short :hidden-xs]}
                           title)
                     (when (= class :next)
                       (i {:class [:fa :fa-chevron-right]})))))))))

(defn entry
  [{:keys [contents next previous] :as ent}]
  (article
   (header
    (well
     (row
      (pager ent previous :previous)
      (div {:class [:col-xs-8 :col-sm-6]}
           (entry-title ent))
      (pager ent next :next))))
   contents))

(def entry-page (partial page entry))

(defn entry-summary [{:keys [path path-to-root summary tags] :as ent}]
  (article
   (-> ent
       entry-title
       row
       well
       header)
   summary
   (p (a {:href (pathcat path-to-root path)}
         "Continue reading "
         (i {:class [:fa :fa-arrow-right]})))))
<commit_msg>Changed entry-page template not to link to the current entry.<commit_after>(ns lambda-blog.templates.entries
  (:refer-clojure :exclude [time])
  (:require [lambda-blog.templates.bits :refer [info-label row text-centered well]]
            [lambda-blog.templates.page :refer [page]]
            [lambda-blog.utils :refer [format-date pathcat]]
            [s-html.tags :refer [a article div footer h1 header hr i li nav p span time ul]]))

(defn entry-header [{:keys [path-to-root tags timestamp]} title]
  (text-centered
   (h1 title)
   (p "Posted on " (time (format-date timestamp)))
   (nav (map #(info-label
               (a {:class :tag
                   :href (pathcat path-to-root (:path %))}
                  (:id %)))
             (sort-by :id tags)))))

(defn pager [{:keys [path-to-root]} {:keys [path title] :as link} class]
  (div {:class [:col-xs-2 :col-sm-3]}
       (when link
         (nav
          (ul {:class :pager}
              (li {:class class}
                  (a {:href (pathcat path-to-root path)}
                     (when (= class :previous)
                       (i {:class [:fa :fa-chevron-left]}))
                     (span {:class [:title-short :hidden-xs]}
                           title)
                     (when (= class :next)
                       (i {:class [:fa :fa-chevron-right]})))))))))

(defn entry
  [{:keys [contents next previous title] :as ent}]
  (article
   (header
    (well
     (row
      (pager ent previous :previous)
      (div {:class [:col-xs-8 :col-sm-6]}
           (entry-header ent title))
      (pager ent next :next))))
   contents))

(def entry-page (partial page entry))

(defn entry-summary [{:keys [path path-to-root summary tags title] :as ent}]
  (article
   (-> ent
       (entry-header (a {:href (pathcat path-to-root path)}
                        title))
       row
       well
       header)
   summary
   (p (a {:href (pathcat path-to-root path)}
         "Continue reading "
         (i {:class [:fa :fa-arrow-right]})))))

{'fraction_non_alphanumeric': 0.15607524148449414, 'fraction_numerical': 0.003050330452465684, 'mean_word_length': 1.878566203365033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6944475', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1220, 'n_words': 368}