Closed karai17 closed 9 years ago
In reference to Issue #3, I have revised the markup spec a bit. Make sure to check out the README for more info.
{ "block", id="windows",
{ "text", "Windows XP+" } ,
{ "list",
{ "text", class="link", onclick=web_link(strings.some_link), "32-bit installer" },
{ "text", class="link", onclick=web_link(strings.some_link), "32-bit zipped" },
{ "text", class="link", onclick=web_link(strings.some_link), "64-bit installer" },
{ "text", class="link", onclick=web_link(strings.some_link), "64-bit zipped" },
},
}
I'm not sure about putting the events in the middle of the markup... I always like to have them separated in the script.
Also with love.system.openURL
you could make an specific index called href
that does exactly what a link does in HTML
Yeah, I just learned about openURL recently and haven't updated the markup yet.
While I prefer defining events in scripts, I think it should also be possible for inline events too. Unless everyone considers that a serious taboo?
Hahaha HTML thinks so... I dont, I just think that it looks ugly to have it in there when it can be somewhere else. But the scripting part should be seriously well done, there are too many thinks to take into account there so I would avoid it till a solid base and rendering mechanics are implemented.
Coming back... I think everything looks right! So similar to HTML already
Yeah I haven't even looked into scripting yet beyond gathering some links (see the bottom of the README and/or TODO). I do agree that added functionality is probably better done in scripts. I'd like some more input before I decide to remove it or not.
What does everyone think about the markup syntax? I want the markup to be Lua so I don't need to run a script to convert, say, XML to Lua when it's not necessary. Is the current markup.lua example sensible or are there some serious changes needed?
The basis here is that named named keys within a table are used to define the object and its properties while the sequential keys are used to define child objects (if tables) or direct value (if string/float). Maybe value="some value" would be less ambiguous, if not more wordy?