<commit_before>(defpackage :fu-er-com
  (:use :cl :hunchentoot :cl-who :parenscript))
(in-package :fu-er-com)

(defun sidebar (selected)
  (with-html-output-to-string (*standard-output* nil)
    (htm
      (:div :class "sidebar sidebar-nav-text"
       (:div :class "sidebar-banner"
        (:a :href "/"
          (:img :class "sidebar-banner-image"
                :src "/avatar_1.png")))
       (:div :class "sidebar-content"
        (:nav
          (:ul :class "sidebar-nav"
           (if (string-equal selected "Portfolio")
             (htm
               (:li :class "sidebar-nav-selected"
                  (:a :href "/portfolio"
                  "Portfolio")))
             (htm
               (:li (:a :href "/portfolio" "Portfolio"))))

           (:ul :class "sidebar-sub-nav sidebar-sub-text"
             (dolist (cat '("games" "vector" "raster" "sketches"))
               (cond ((string-equal cat selected)
                    (htm (:li :class "sidebar-nav-selected"
                           (:a
                             :href (concatenate 'string "/portfolio?category="
                                                cat)
                             (str (string-capitalize cat))))))
                   (t
                    (htm (:li
                           (:a
                             :href (concatenate 'string "/portfolio?category="
                                                cat)
                           (str (string-capitalize cat)))))))))

           (dolist (cat '("About" "Resume" "Links"))<commit_msg>Add a random-avatar function<commit_after>(defpackage :fu-er-com
  (:use :cl :hunchentoot :cl-who :parenscript))
(in-package :fu-er-com)

(defun random-avatar ()
  "/avatar_1.png")

(defun sidebar (selected)
  (with-html-output-to-string (*standard-output* nil)
    (htm
      (:div :class "sidebar sidebar-nav-text"
       (:div :class "sidebar-banner"
        (:a :href "/"
          (:img :class "sidebar-banner-image"
                :src (str (random-avatar)))))
       (:div :class "sidebar-content"
        (:nav
          (:ul :class "sidebar-nav"
           (if (string-equal selected "Portfolio")
             (htm
               (:li :class "sidebar-nav-selected"
                  (:a :href "/portfolio"
                  "Portfolio")))
             (htm
               (:li (:a :href "/portfolio" "Portfolio"))))

           (:ul :class "sidebar-sub-nav sidebar-sub-text"
             (dolist (cat '("games" "vector" "raster" "sketches"))
               (cond ((string-equal cat selected)
                    (htm (:li :class "sidebar-nav-selected"
                           (:a
                             :href (concatenate 'string "/portfolio?category="
                                                cat)
                             (str (string-capitalize cat))))))
                   (t
                    (htm (:li
                           (:a
                             :href (concatenate 'string "/portfolio?category="
                                                cat)
                           (str (string-capitalize cat)))))))))

           (dolist (cat '("About" "Resume" "Links"))
{'fraction_non_alphanumeric': 0.14141732283464567, 'fraction_numerical': 0.0006299212598425197, 'mean_word_length': 1.2604982206405695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1622169', 'n_tokens_mistral': 917, 'n_tokens_neox': 846, 'n_words': 204}