Alexander Burger <[email protected]> writes: Hi Alex,
>> assume I want to use <menu> and <tab> in a context where calls to >> >> #+begin_src picolisp >> (html 0 "Hello" "@lib.css" NIL ...) >> #+end_src >> >> are unnessesary or even unwanted since the HTML produced by the PicoLisp >> functions should be embedded into a html-page that is produced by another >> program. >> ... >> without a surrounding '(html ... ) call. > > This should be all right. All those HTML-generating functions just print > formatted output. ok, it makes my life easier if I can simply skip the (html ...) calls in this case ... >> How can I tell <menu> and <tab> about "@lib.css" in this case? Is >> there a way to pass both, the css file and attribute-value pairs to >> these two tag-functions? > > <menu> or <tab> actually don't know or care about CSS. The line > >> (<div> '(id . main) ... > > will generate the output > > <div id="main"></div> ... > > where the class "main" refers to a CSS class. The browser which > generates the page must receive the right CSS file(s). In case of the > PicoLisp 'html' function, this is done automatically in the page header. > > In your case, it should be possible that you call (javascript "lib.css") > to generate > > <script type="text/javascript" src="http://:/lib.css"></script> > > but the problem might be to get the pathnames right. Note that for the > above the global '*JS' must be non-NIL, because otherwise 'javascript' > outputs nothing. that looks like a nice solution, but I can't make it work. I tried this: ,-------------------------- | (chdir (path "@") | (javascript "lib.css") ) `-------------------------- which should solve the pathname problem, but the CSS is not loaded, the tabs e.g. don't work and have the looks of plain links. value of *JS is: ,---------------- | "@lib/form.js" `---------------- html output is: ,---------------------------------------------------------------- | <script type="text/javascript" src="http://:/lib.css"></script> `---------------------------------------------------------------- I'm a bit confused about this part: ,---------- | http://:/ `---------- what is this :/ standing for? I know the : as path-separator on Linux, but here? -- cheers, Thorsten -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
