Giter Club home page Giter Club logo

hypertext's People

Contributors

briancprice avatar evertt avatar sahandnayebaziz avatar stupergenius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hypertext's Issues

We could make the automatic naming even a bit better

So now the automatic naming of the library just literally takes the class name of the tag, which is cool for all the default html elements, but that doesn't work for custom elements like web-components. Custom elements are required to have a least one dash - in their name according to the html spec, AFAIK. So for example <material-button></material-button>. And how would someone name the class that represents that tag? I reckon that class would be called MaterialButton or materialButton.

With the current state of the library, if the developer would write this:

class materialButton: tag {}

Then their button would be called <materialButton></materialButton> instead of <material-button></material-button>. So how about we change the automatic naming to change camelCase class names to slug-case element names? I think it shouldn't be too hard.

Add library to CocoaPods

Hello,
Thanks for creating this library. If we can use this package also with CocoaPods, it would be really great! I have an iOS project which I'm using CocoaPods as a dependency manager in it and I think CocoaPods can increase the usage of the library :)
Cheers

I would like more (intuitive) instantiation options

I made a branch locally where I changed the init() methods to make it more intuitive, imo. You see when you write HTML, you always write the attributes of an element first (optionally of course) and then you write that element's children.

<div class="container">
  <p>
    Well hello there...
  </p>
</div>

But right now this library doesn't reflect that, because this library requires you to first write the children and then write the attributes, like so:

let view = div(setChildren: { p { "Well hello there..." } }, attributes: ["class": "container"])

My new init() methods allow you to do this:

let view = div(["class":"container"]) {
  p {
    "Well hello there..."
  }
}

Do you see how much better that reflects the actual HTML code? Would you like that too?

Ambiguous use of 'description'

cells.append(td([AttributeName.colspan: 2.description]) { totalLabel() })

I'm getting errors "Ambiguous use of 'description' after Xcode was upgraded to version 9.0. The above code is an example. This seems to be caused by the following:

`public extension Renderable {
var description: String {
return render()
}
}

extension String: Renderable {}
extension Int: Renderable {}
extension Double: Renderable {}
extension Float: Renderable {}`

In this case, Int already has a description property but since it is Renderable it is redefined. I don't know why this wasn't an issue in Xcode 8.x.

CocoaPods installation fails

Hello again,

Thanks for the quick response. Good work! I've just tried to install the library via CocoaPods with
pod 'Hypertext'in Podfile but it failed with error:

[!] Unable to find a specification for 'Hypertext'

I also tried with installing via
pod 'Hypertext', :git => '[email protected]:sahandnayebaziz/Hypertext.git', :tag => '2.1.0'
but still same. I think something is wrong with CocoaPods. You may need to delete the repo from CocoaPods and upload it again. There are some way on the web to solve this.

Also, it would be perfect for beginners to have an installation guide for the library on Readme. This is just a suggestion to attract more people in every experience level to library :)

HTML Tag not working

I guess i found a bug.
if i have this line code

let html = body { div {	b {"Hello World"}	} }.render()

this is working but if i have this line code

let html = html { body { b {"Hello World"}	} }.render()

is not any more working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.