Swiftpack.co - Package - MakeupStudio/Makeup

Makeup 💋

Swift DSL for rendering HTML. Not the first, but the best (will become, one day... 😌)

Usage

// Swift
document {
    html {
        head {
            title("My first Site")
        }
        body {
            header {
                h1("Hello, world!")
            }
            main {
                h2("Rendered by Makeup.")
                a("GitHub")
                    .href("https://github.com/maximkrouk/Makeup")
                    .foreground(color: .livingCoral)
            }
            footer {
                h6("Makeup. Swift HTML-rendering framework.")
            }
        }
        .font(name: .arial)
        .foreground(color: .white)
        .background(color: .ultraviolet)
    }
}

is rendered to:

<!DOCTYPE HTML>
<html>
    <head>
        <title>
            My first Site
        </title>
    </head>
    <body style="font-family:'arial';color:rgba(255.0,255.0,255.0,255.0);background-color:rgba(100.0,83.0,148.0,255.0);">
        <header>
            <h1>
                Hello, world!
            </h1>
        </header>
        <main>
            <h2>
                Rendered by Makeup.
            </h2>
            <a href="https://github.com/maximkrouk/Makeup", style="color:rgba(250.0,114.0,104.0,255.0);">
                GitHub
            </a>
        </main>
        <footer>
            <h6>
                Makeup. Swift HTML-rendering framework.
            </h6>
        </footer>
    </body>
</html>

and looks like:

Example-iPhone5

Installation

Add the package to Your SwiftPM package dependencies:

.package(url: "https://github.com/MakeupStudio/Makeup.git", from: "0.1.1")

then add Makeup dependency to your target.

Still in Beta

[Not recommended to for production use yet, but you are welcome to test it out 😉 ]

Calendar:

  • ✅ Basics (Nodes, Attributes, some CSS)

  • ✅ Assets (WebColor, WebSize, Webfonts)

  • ✅ Preparations for semantic filtering

  • ✅ Function Builders

  • ✅ Html building functions

  • ✅ String literal support

  • ✅ Rendering

  • ⏱ NodeWrapper attibutes modification via suffixed methods (dot-notation like in the Usage example)

    • November 2019
  • 🗳 Xcode documentation in sources

    • November 2019 – December 2019
  • ⏱ Git-flow

    • December 2019
  • ⏱ First release (API v1, static pages & simple sites production ready) (1.0.0)

    • December 2019
  • 🗳 Contribution guide with explanations of the package architecture

    • December 2019 – Janruary 2020
  • 🗳 Attributes extended support (via static factories)

    • January 2020
  • 🗳 CSS extended support

    • January 2020 – February 2020
  • 🗳 JS support

    • February 2020 – March 2020
  • 🗳 API v2 (2.0.0)

    • March 2020
  • 🗳 External docs & Examples

    • up to May 2020
  • 🗳 Testing

    • up to May 2020
  • 🗳 API v3 (stable) (3.0.0)

    • May 2020 - June 2020

✅ - Done

⏱ - In progress

🗳 - Waiting


Contact me if You want to contribute before the guide is provided.


Thanks for inspiration and ideas

Pointfree.co, David Okun & WWDC2019

David's Twitter

PointFree's Twitter

Vaux

Swift-html


You may contact me here if You have any questions.


Github

link
Stars: 7
Help us keep the lights on

Dependencies

Used By

Total: 1