Arc Forumnew | comments | leaders | submitlogin
3 points by almkglor 6113 days ago | link | parent

> If you try to use a tag attribute that Arc doesn't know about, it puts a comment in the HTML <!-- ignoring mytag for a-->. Error reporting in the HTML itself seems like a bad idea.

I think it doesn't - in my experience these warnings occur when I load the file, and are printed on stderr. Not sure though, I haven't actually checked the code.

In any case I'd recommend the use of my w/html macro, in whtml.arc, which IMO is more consistent:

  (w/html
    ('head
      ('title
        (pr "This is My Page!")))
    ('body
      ('h1 (pr "This is My Page!"))
      ('.content
        ('p
          (pr "This is my content!"))
        ('p
          (pr "Another paragraph of my content."))
        ('p
          (pr "The third paragraph of my content!")))
      ('.footer
        (pr "This is where I put my footer string!"))))
.foobar is equivalent to (div class "foobar"), and if you want to put tags with other attributes, just put it in a () form (same syntax as 'tag). So you can create an image by ('(img src "foo.gif"))

w/html also supports the use of #id stuff, but because of the Arc parser, anything that starts with # will not work - you have to either also add a class, or explicitly put the div.

TODO: something like 'tagif.