[Initial clinton@unknownlamer.org**20081206053738] addfile ./beesknees.asd hunk ./beesknees.asd 1 - +(defpackage :beesknees.system + (:use :cl :asdf)) + +(in-package :beesknees.system) + +(defsystem "beesknees" + :components + ((:module + :src + :components + ((:file "packages") + (:file "applications" :depends-on ("packages")) + (:file "frontend" :depends-on ("packages")) + (:file "site-control" :depends-on ("packages"))))) + :depends-on (:ucw :golgonooza)) adddir ./src addfile ./src/applications.lisp hunk ./src/applications.lisp 1 +(in-package :beesknees.web) + +(defclass bee-application (standard-application + static-roots-application-mixin) + + ()) + +(defclass bee-frontend-application (bee-application) + ()) addfile ./src/frontend.lisp hunk ./src/frontend.lisp 1 - +(in-package :beesknees.web) + +(defcomponent bee-window (standard-window-component) + () + (:default-initargs + :title "The Bee's Knees" + :stylesheet '("static/css/common.css"))) + +(defcomponent dummy-component () + ()) + +(defmethod render ((self dummy-component)) + (<:p (<:strong (<:format "(~A) " (class-name (class-of self)))) + (<:as-html "Nothing to see here. Move along."))) + +(defclass bee-widget (html-block-element-mixin) + () + (:documentation "Widget component that sets css-class to class-name by default")) + +(defmethod initialize-instance :after ((c bee-widget) + &rest keys) + (setf (html-element.css-class c) + (or (getf keys :css-class) + (string-downcase (symbol-name (class-name (class-of c))))))) + +(defcomponent composite-container (html-block-element-mixin container) + () + (:default-initargs :css-class "ucw-composite-container")) + +(defmethod render ((container composite-container)) + (mapc (arnesi:compose #'render #'cdr) (container.contents container))) + +(defcomponent bee-video (bee-widget dummy-component) + ()) + +(defcomponent bee-blog (bee-widget dummy-component) + ()) + +(defcomponent bee-home (bee-widget composite-container) + () + (:default-initargs + :contents `((video . ,(make-instance 'bee-video)) + (blog . ,(make-instance 'bee-blog))))) + +(defcomponent bee-about (bee-widget dummy-component) + ()) + +(defcomponent bee-contact (bee-widget dummy-component) + ()) + +(defcomponent bee-links (bee-widget dummy-component) + ()) + +(defcomponent bee-tabbed-pane (tabbed-pane) + ((img-root :initarg :img-root))) + +(defmethod render-pane-options ((pane bee-tabbed-pane)) + (<:div :class "ucw-tabbed-pane-options" + (arnesi:dolist* (component (container.contents pane)) + (<:div + :class (if (funcall (container.key-test pane) + (car component) + (container.current-component-key pane)) + "ucw-tabbed-pane-selected" + "ucw-tabbed-pane-not-selected") + (