Reorganize functions
This commit is contained in:
parent
0d352e816c
commit
6772dc38b3
2 changed files with 14 additions and 8 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
(defpackage ml-sbt/section
|
(defpackage ml-sbt/section
|
||||||
(:use :cl)
|
(:use :cl)
|
||||||
|
(:import-from #:ml-sbt/utility
|
||||||
|
#:make-col-class
|
||||||
|
#:combine-classes)
|
||||||
(:import-from #:ml-sbt/btn
|
(:import-from #:ml-sbt/btn
|
||||||
#:btn-group-outline-primary)
|
#:btn-group-outline-primary)
|
||||||
(:export
|
(:export
|
||||||
|
@ -14,13 +17,6 @@
|
||||||
|
|
||||||
(in-package :ml-sbt/section)
|
(in-package :ml-sbt/section)
|
||||||
|
|
||||||
(defun make-col-class (breakpoint value)
|
|
||||||
(when value
|
|
||||||
(format nil "col~@[-~(~a~)~]~@[-~a~]" breakpoint value)))
|
|
||||||
|
|
||||||
(defun combine-classes (&rest class-specs)
|
|
||||||
(string-trim " " (format nil "~{~a ~}" (remove nil class-specs))))
|
|
||||||
|
|
||||||
(defmacro with-title-bar (head &rest items)
|
(defmacro with-title-bar (head &rest items)
|
||||||
"Creates a Bootstrap-styled title bar with an optional set of action buttons.
|
"Creates a Bootstrap-styled title bar with an optional set of action buttons.
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,9 @@
|
||||||
:sizing
|
:sizing
|
||||||
:spacing
|
:spacing
|
||||||
:text
|
:text
|
||||||
:valign)
|
:valign
|
||||||
|
:make-col-class
|
||||||
|
:combine-classes)
|
||||||
(:documentation "A module for generating Bootstrap utility classes."))
|
(:documentation "A module for generating Bootstrap utility classes."))
|
||||||
|
|
||||||
(in-package :ml-sbt/utility)
|
(in-package :ml-sbt/utility)
|
||||||
|
@ -553,3 +555,11 @@ Example 3:
|
||||||
; This will generate a string 'align-middle'"
|
; This will generate a string 'align-middle'"
|
||||||
(let ((align-str (if (null align) "" (format nil "align-~a" align))))
|
(let ((align-str (if (null align) "" (format nil "align-~a" align))))
|
||||||
(string-clean align-str)))
|
(string-clean align-str)))
|
||||||
|
|
||||||
|
|
||||||
|
(defun make-col-class (breakpoint value)
|
||||||
|
(when value
|
||||||
|
(format nil "col~@[-~(~a~)~]~@[-~a~]" breakpoint value)))
|
||||||
|
|
||||||
|
(defun combine-classes (&rest class-specs)
|
||||||
|
(string-trim " " (format nil "~{~a ~}" (remove nil class-specs))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue