@ -93,3 +93,34 @@
( if ( storage:file-exists-p "" "snippets" snippet-name )
( if ( storage:file-exists-p "" "snippets" snippet-name )
( format nil "~a" ( storage:open-text-file "" "snippets" snippet-name ) )
( format nil "~a" ( storage:open-text-file "" "snippets" snippet-name ) )
( format nil "<!-- ~a not found -->" snippet-name ) ) )
( format nil "<!-- ~a not found -->" snippet-name ) ) )
( defun insert-dashboard-cat ( )
( let ( ( timestamp ( local-time:now ) ) )
( cond ( ( and ( > ( local-time:timestamp-hour timestamp ) 6 )
( <= ( local-time:timestamp-hour timestamp ) 10 ) )
( format nil "/images/icons/morning-cat.png" ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 10 )
( <= ( local-time:timestamp-hour timestamp ) ) 12 )
( format nil "/images/icons/coffee-cat.png" ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 12 )
( <= ( local-time:timestamp-hour timestamp ) 14 ) )
( format nil "/images/icons/dinner-cat.png" ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 14 )
( <= ( local-time:timestamp-hour timestamp ) 18 ) )
( format nil "/images/icons/study-cat.png" ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 18 )
( <= ( local-time:timestamp-hour timestamp ) 20 ) )
( cond ( ( >= ( local-time:timestamp-day-of-week timestamp ) 5 )
( format nil "/images/icons/workout-cat.png" ) )
( ( = ( local-time:timestamp-day-of-week timestamp ) 6 )
( format nil "/images/icons/rock-star-cat.png" ) )
( ( = ( local-time:timestamp-day-of-week timestamp ) 7 )
( format nil "/images/icons/love-cat.png" ) ) ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 20 )
( <= ( local-time:timestamp-hour timestamp ) 22 ) )
( format nil "/images/icons/dinner-cat.png" ) )
( ( and ( > ( local-time:timestamp-hour timestamp ) 22 )
( <= ( local-time:timestamp-hour timestamp ) 24 ) )
( format nil "/images/icons/bed-time-cat.png" ) )
( t ( format nil "/images/icons/default-cat.png" ) ) ) ) )