Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.61 KB

README.md

File metadata and controls

79 lines (57 loc) · 1.61 KB

BootstrapProvider

Swift 4 MIT License

Vapor Provider for Bootstrap Leaf Tags.

Live Example

Installation

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"),
]

Setup

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

Tags are Documented in the Wiki

Example:

#container() {

    #row("justify-content-md-center") {
        <h1>Centered Text</h1>
    }

    #row() {
        #button:primary("Primary")
    }
}

License

BootstrapProvider is available under the MIT license. See the LICENSE file for more info.