Y las páginas de los tags
general, blog, español, spanish, common-lisp, lisp, programming — september 20, 2011
Comments
Sólo por curiosidad, he aquí cómo está implementada la generación de los links con diferente tamaño del sidebar:
(defun categories-links () (if *categories-links* *categories-links* (setf *categories-links* (multiple-value-bind (max-n-posts min-n-posts) (loop for c being the hash-values in *posts-for-category* maximizing (car c) into max minimizing (car c) into min finally (return (values max min))) (apply #'concatenate 'string (loop for k being the hash-keys in *posts-for-category* using (hash-value v) collect (format nil "<a href=\"category-~A.html\" title=\"~A topic~:*~p\" rel=\"category tag\" style=\"font-size: ~Apx;\">~3:*~A</a> " (string-downcase k) (car v) (+ 9 (round (/ (- (car v) min-n-posts) (/ (- max-n-posts min-n-posts) 10)))))))))))
Y eso sin contar con el cálculo de *posts-for-category*
.