Vapor Provider for Bootstrap Leaf Tags.
Swift Package Manager:
Swift3
dependencies: [
.Package(url: "https://github.com/khoogheem/BootstrapProvider", majorVersion: 0)
]
Swift4
dependencies: [
.package(url: "https://github.com/khoogheem/BootstrapProvider", from: "0.5.0"),
]
Vapor 2:
In your Config+Setup.swit file where you setup your providers you will need to add:
try addProvider(BootstrapProvider.Provider.self)
If you don't want all of the Tags you can add your own in Droplet+Setup.swift:
if let leaf = self.view as? LeafRenderer {
leaf.stem.register(Button(size: .standard, color: .primary))
leaf.stem.register(Button(size: .large, color: .primary))
leaf.stem.register(Button(size: .standard, color: .dark))
}
Tags are Documented in the Wiki
Example:
#container() {
#row("justify-content-md-center") {
<h1>Centered Text</h1>
}
#row() {
#button:primary("Primary")
}
}
BootstrapProvider is available under the MIT license. See the LICENSE file for more info.