2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
# Table of Contents
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
1. [Cl-Sbt](#org6af45e7)
|
|
|
|
1. [Usage](#org4b1729c)
|
|
|
|
1. [Defining a Card](#org8a876fa)
|
|
|
|
2. [Defining a Dropdown](#orgcb10ca2)
|
|
|
|
2. [Installation](#org0da4cf2)
|
|
|
|
3. [Author](#org919d853)
|
|
|
|
4. [Copyright](#orgc51162e)
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="org6af45e7"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
# Cl-Sbt
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
A Common Lisp library for generating Bootstrap-based HTML markup. It provides
|
|
|
|
macros to easily create Bootstrap components such as accordions, alerts,
|
|
|
|
badges, buttons, cards, dropdowns, headers, list groups, navbars, nav-tabs,
|
|
|
|
pagination, and tables. This library is dependent on the Spinneret library for
|
|
|
|
HTML generation.
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="org4b1729c"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="org8a876fa"></a>
|
2023-07-11 19:59:29 +02:00
|
|
|
|
|
|
|
### Defining a Card
|
|
|
|
|
|
|
|
The following code demonstrates how to define a card using the card macro.
|
|
|
|
|
|
|
|
(cl-sbt-card:card
|
|
|
|
(cl-sbt-card:body
|
|
|
|
(cl-sbt-card:title "Card title")
|
|
|
|
(cl-sbt-card:subtitle "Card subtitle")
|
|
|
|
(cl-sbt-card:text "Some quick example text to build on the card title and make up the bulk of the card's content.")
|
|
|
|
(cl-sbt-card:link (:href "#") "Card link")))
|
|
|
|
|
2023-07-11 20:01:48 +02:00
|
|
|
<div class=card>
|
|
|
|
<div class=card-body>
|
|
|
|
<h5 class=card-title>Card title</h5>
|
|
|
|
<h6
|
|
|
|
class="card-subtitle mb-2 text-body-secondary">Card subtitle</h6>
|
|
|
|
<p class=card-text>Some quick example text to build on the card title and make up
|
|
|
|
the bulk of the card's content.
|
|
|
|
<a class=card-link href=#>Card link</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-11 19:59:29 +02:00
|
|
|
|
2023-07-11 21:10:11 +02:00
|
|
|
The following code demonstrates how to define a card using the card-with-img macro.
|
|
|
|
|
2023-07-11 21:08:20 +02:00
|
|
|
(cl-sbt-card:card-with-img (:img-src "test.jpg")
|
|
|
|
(cl-sbt-card:title "Card title")
|
|
|
|
(cl-sbt-card:subtitle "Card subtitle")
|
|
|
|
(cl-sbt-card:text "Some quick example text to build on the card title and make up the bulk of the card's content.")
|
|
|
|
(cl-sbt-card:link (:href "#") "Card link"))
|
2023-07-11 20:00:51 +02:00
|
|
|
|
2023-07-11 21:08:20 +02:00
|
|
|
<div class=card>
|
|
|
|
<img class=card-img-top src=test.jpg
|
|
|
|
alt="Card Image">
|
|
|
|
<div class=card-body>
|
|
|
|
<h5 class=card-title>Card title</h5>
|
|
|
|
<h6
|
|
|
|
class="card-subtitle mb-2 text-body-secondary">Card subtitle</h6>
|
|
|
|
<p class=card-text>Some quick example text to build on the card title and make up
|
|
|
|
the bulk of the card's content.
|
|
|
|
<a class=card-link href=#>Card link</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="orgcb10ca2"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
2023-07-11 19:59:29 +02:00
|
|
|
### Defining a Dropdown
|
2023-07-08 14:16:15 +02:00
|
|
|
|
2023-07-11 19:59:29 +02:00
|
|
|
The following code demonstrates how to define a dropdown using the dropdown
|
|
|
|
macro.
|
|
|
|
|
|
|
|
(cl-sbt-dropdown:dropdown (:title "Dropdown button")
|
|
|
|
(cl-sbt-dropdown:menu
|
|
|
|
(cl-sbt-dropdown:item "Action")
|
|
|
|
(cl-sbt-dropdown:item "Another action")
|
|
|
|
(cl-sbt-dropdown:item "Something else here")))
|
|
|
|
|
2023-07-11 20:01:48 +02:00
|
|
|
<div class=dropdown>
|
|
|
|
<button class="btn btn-secondary dropdown-toggle"
|
|
|
|
type=button data-bs-toggle=dropdown
|
|
|
|
aria-expanded=false>Dropdown button</button>
|
|
|
|
<ul class=dropdown-menu>
|
|
|
|
<li><a class=dropdown-item href=#>Action</a>
|
|
|
|
<li><a class=dropdown-item href=#>Another action</a>
|
|
|
|
<li><a class=dropdown-item href=#>Something else here</a>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-07-11 20:00:51 +02:00
|
|
|
|
2023-07-11 19:59:29 +02:00
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="org0da4cf2"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2023-07-11 19:59:29 +02:00
|
|
|
git clone https://git.sr.ht/~marcuskammer/cl-sbt ~/quicklisp/local-projects/cl-sbt/
|
|
|
|
|
|
|
|
(ql:quickload :cl-sbt)
|
|
|
|
|
2023-07-08 14:16:15 +02:00
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="org919d853"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|
|
- Marcus Kammer (marcus.kammer@mailbox.org)
|
|
|
|
|
|
|
|
|
2023-07-14 16:17:09 +02:00
|
|
|
<a id="orgc51162e"></a>
|
2023-07-08 14:16:15 +02:00
|
|
|
|
|
|
|
## Copyright
|
|
|
|
|
|
|
|
Copyright (c) 2023 Marcus Kammer (marcus.kammer@mailbox.org)
|