<commit_before>;;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: {APPNAME}; Base: 10 -*- file: templates.lisp

(in-package :{APPNAME})

;; Customize these functions to implement your desired template
(defmacro %basic-{APPNAME}-app-page ((&key (title "{APPNAME}") (styles nil) (scripts nil)) &body body)
  "Basic, no frills {APPNAME} page function, useful for error pages, system notifications, login pages, wrapping AJAX html content, etc."
  `(cl-who:with-html-output-to-string (hunchentoot::*standard-output* nil :prologue t :indent t)
  	(:html :lang "en"
  	  (:head
  	  	(:meta :http-equiv "Content-Type" :content "text/html;charset=utf-8")
  	  	(:meta :name "viewport" :content "width=device-width, initial-scale=1.0")
  	  	(:link :rel "stylesheet" :href "/static/css/bootstrap.min.css" :type "text/css" :media "screen")
  	  	(:link :rel "stylesheet" :href "/redshiftnet.css" :type "text/css" :media "screen")
  	  	(:link :rel "stylesheet" :href "/{APPNAME}.css" :type "text/css" :media "screen")
  	  	,@(mapcar (lambda (file)
	  	            `(:link :type "text/css" :rel "stylesheet" :media "screen"
	  	                    :href ,(format nil "~A" file)))
	  	             styles)
  	  	(:title ,title)
  	  	"<!--[if IE]><script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->")
  	  (:body
  	  	,@body
  	  	(:script :type "text/javascript" :src "/static/js/jquery-1.9.1.min.js")
  	  	(:script :type "text/javascript" :src "/static/js/bootstrap.min.js")
  	  	(:script :type "text/javascript" :src "/redshiftnet.js")
  	  	(:script :type "text/javascript" :src "/{APPNAME}.js")
  	  	,@(mapcar (lambda (file)
  	  	            `(:script :type "text/javascript"
  	  	                      :src ,(format nil "~A" file)))
  	  	          scripts)
  	  	))))

(defmacro %{APPNAME}-app-page ((&key (title "{APPNAME}") (styles nil) (scripts nil) header menu footer) &body body)
  "Standard app page template."
  `(%basic-{APPNAME}-app-page (:title ,title :styles ,@styles :scripts ,@scripts)
  	(cl-who:with-html-output (hunchentoot::*standard-output*)
  	  (:header :id "header"
  	  	(,@header))
  	  (:div :class "main"
  	  	(:aside :id "" (,@menu))
  	    (:div :id "content" ,@body))
  	  (:footer :id "footer"
  	  	(,@footer))
  	  )))

;; EOF
<commit_msg>Update app-page-templates<commit_after>;;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: {APPNAME}; Base: 10 -*- file: templates.lisp

(in-package :{APPNAME})

;; Customize these functions to implement your desired template
(defmacro %basic-{APPNAME}-app-page ((&key (title "{APPNAME}") (styles nil) (scripts nil)) &body body)
  "Basic, no frills {APPNAME} page function, useful for error pages, system notifications, login pages, wrapping AJAX html content, etc."
  `(cl-who:with-html-output-to-string (hunchentoot::*standard-output* nil :prologue t :indent t)
    (:html :lang "en"
      (:head
        (:meta :http-equiv "Content-Type" :content "text/html;charset=utf-8")
        (:meta :name "viewport" :content "width=device-width, initial-scale=1.0")
        (:link :rel "stylesheet" :href "/static/css/bootstrap.min.css" :type "text/css" :media "screen")
        (:link :rel "stylesheet" :href "/redshiftnet.css" :type "text/css" :media "screen")
        (:link :rel "stylesheet" :href "/{APPNAME}.css" :type "text/css" :media "screen")
        ,@(mapcar (lambda (file)
                    `(:link :type "text/css" :rel "stylesheet" :media "screen"
                            :href ,(format nil "~A" file)))
                     styles)
        (:title ,title)
        "<!--[if IE]><script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script><![endif]-->")
      (:body
        ,@body
        (:script :type "text/javascript" :src "/static/js/jquery-1.9.1.min.js")
        (:script :type "text/javascript" :src "/static/js/bootstrap.min.js")
        (:script :type "text/javascript" :src "/redshiftnet.js")
        (:script :type "text/javascript" :src "/{APPNAME}.js")
        ,@(mapcar (lambda (file)
                    `(:script :type "text/javascript"
                              :src ,(format nil "~A" file)))
                  scripts)))))

(defmacro %{APPNAME}-app-page ((&key (title "{APPNAME}") (styles nil) (scripts nil) header menu footer) &body body)
  "Standard app page template."
  `(%basic-{APPNAME}-app-page (:title ,title :styles ,@styles :scripts ,@scripts)
    (cl-who:with-html-output (hunchentoot::*standard-output*)
      (:header :id "header"
        (,@header))
      (:div :class "main"
        (:aside :id "" (,@menu))
        (:div :id "content" ,@body))
      (:footer :id "footer"
        (,@footer)))))

;; EOF

{'fraction_non_alphanumeric': 0.18970305490279854, 'fraction_numerical': 0.004272591326639607, 'mean_word_length': 2.9049207673060886, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '7298262', 'n_tokens_mistral': 1661, 'n_tokens_neox': 1591, 'n_words': 403}