diff --git a/src/surveys/package.lisp b/src/surveys/package.lisp index 5c50995..96b13af 100644 --- a/src/surveys/package.lisp +++ b/src/surveys/package.lisp @@ -7,10 +7,14 @@ #:with-navbar) (:import-from #:ml-sbt/section #:with-section + #:with-section-projects #:with-title-bar) (:import-from #:ml-sbt/btn #:btn) + (:import-from #:ml-sbt/card + #:with-card*) (:import-from #:ml-sbt #:with-body-header #:with-body-main - #:with-page)) + #:with-page + #:t9n)) diff --git a/src/surveys/view.lisp b/src/surveys/view.lisp index c033121..edb2ad7 100644 --- a/src/surveys/view.lisp +++ b/src/surveys/view.lisp @@ -24,16 +24,16 @@ SURVEYS: List of survey objects." (when surveys (with-section (with-title-bar "All Surveys") - (:ol :class "list-group list-group-numbered" - (loop for survey in surveys - for title = (survey-properties-title survey) - for description = (survey-properties-description survey) - for id = (survey-id survey) do - (:li :class "list-group-item d-flex justify-content-between align-items-start" - (:div :class "ms-2 me-auto" - (:a :class "fw-bold clearfix" - :href (format nil "/survey/~a" id) - title) - (if description - (:span description) - nil))))))))))) + (with-section-projects + (dolist (survey surveys) + (let ((title (survey-properties-title survey)) + (description (survey-properties-description survey)) + (id (survey-id survey))) + (with-card* + :card-header + title + :card-items + (list description id) + :card-body + (btn (:url (format nil "/survey/~a" id)) + (t9n "view-details" lang))))))))))))