<commit_before>;;This is where the main template, and the functions for working with it are located.

(in-package :web-common)

(setf *PS-PRINT-PRETTY* t)
(setf *INDENT-NUM-SPACES* 2)
(setf cl-who::*html-mode* :HTML5)
(setf parenscript::*js-string-delimiter* #\")
(setf hunchentoot::*show-lisp-errors-p* t)
(setf *catch-errors-p* t)

(defparameter *javascript-files* '("https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js")
"List of javascript files to include in the template")

(defparameter *css-files* '( "http://twitter.github.com/bootstrap/assets/css/bootstrap-1.1.1.min.css")
"List of css files to include in the template")

(defvar *menus* nil
"List of menus to add to the main toolbar")

(defvar *page-title* "MBMS"
"The title that goes in the head tags, and the main menu bar")

(defun add-javascript-file (filename)
"Adds a javascript file to the list of files to be included in the template"
(setf *javascript-files* (append *javascript-files* filename)))

(defun add-css-file (filename)
"Adds a css file to the list of files to be included in the template"
(setf *css-files* (append *css-files* filename)))

(defun add-menus( new-menu-list)
"Adds a menu definition to the list of menus to be included in the template"
;( print new-menu-list)
(dolist (menu new-menu-list)
	(pushnew menu *menus* :test (lambda (left right) 
;																(print "hello" left)
																( equal (menu-entry-name left) (menu-entry-name right))))))
;					 :key (lambda( k) (menu-entry-name k)))))

;(setf *menus* 
;			(append *menus

(defstruct menu-entry
	name
	items)

(defstruct sub-menu-entry
	name
	url)

(defun sub-menu ( menu-item-list)
"Add a menu item to the menu"
(unless ( null menu-item-list)
	(let ((cur-menu-item (first menu-item-list)))
		(cl-who:with-html-output (*standard-output*)
			(:li
			 (:a :href (sub-menu-entry-url cur-menu-item)
					 (format *standard-output* <commit_msg>Removed commented out debugging lines<commit_after>;;This is where the main template, and the functions for working with it are located.

(in-package :web-common)

(setf *PS-PRINT-PRETTY* t)
(setf *INDENT-NUM-SPACES* 2)
(setf cl-who::*html-mode* :HTML5)
(setf parenscript::*js-string-delimiter* #\")
(setf hunchentoot::*show-lisp-errors-p* t)
(setf *catch-errors-p* t)

(defparameter *javascript-files* '("https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js")
"List of javascript files to include in the template")

(defparameter *css-files* '( "http://twitter.github.com/bootstrap/assets/css/bootstrap-1.1.1.min.css")
"List of css files to include in the template")

(defvar *menus* nil
"List of menus to add to the main toolbar")

(defvar *page-title* "MBMS"
"The title that goes in the head tags, and the main menu bar")

(defun add-javascript-file (filename)
"Adds a javascript file to the list of files to be included in the template"
(setf *javascript-files* (append *javascript-files* filename)))

(defun add-css-file (filename)
"Adds a css file to the list of files to be included in the template"
(setf *css-files* (append *css-files* filename)))

(defun add-menus( new-menu-list)
"Adds a menu definition to the list of menus to be included in the template"
(dolist (menu new-menu-list)
	(pushnew menu *menus* :test (lambda (left right) 
																( equal (menu-entry-name left) (menu-entry-name right))))))

(defstruct menu-entry
	name
	items)

(defstruct sub-menu-entry
	name
	url)

(defun sub-menu ( menu-item-list)
"Add a menu item to the menu"
(unless ( null menu-item-list)
	(let ((cur-menu-item (first menu-item-list)))
		(cl-who:with-html-output (*standard-output*)
			(:li
			 (:a :href (sub-menu-entry-url cur-menu-item)
					 (format *standard-output* 
{'fraction_non_alphanumeric': 0.14857142857142858, 'fraction_numerical': 0.006233766233766234, 'mean_word_length': 4.073781291172596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5812053', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1362, 'n_words': 418}