On 29/08/2014, at 10:15 AM, Ryan wrote:

>> So I'm not sure what you can do. It's basic HTML deliberately
>> to meet these requirements.
> 
> But it looks bad. I've seen several very nicely done sites that render 
> perfectly fine in most browsers (I use Opera Mini, which is horribly glitchy, 
> and most of these work fine there as well).

Fine. So make a better page, commit is as src/web/index2.html?

>> I'm actually more concerned with fdoc layout, but that's a bit harder
>> to work with because the HTML is generated. The buttons use SVG 
>> so the whole thing is scalable. Code is of course going to
>> run off the right edge of small windows, this can't be helped.
> 
> Again, looks fine in Opera Mini. I just wish that the code samples had 
> horizontal scrollbars.

That should be easy enough to add.

In an fdoc, see

        src/lib/plugins/fdoc2html.flx

line 254, function inline_felix (b:string) takes formatted
felix code and displays it as <pre class flxgb>.

It formats by calling xlat_felix which is set by
dynamically loading the plugin 

  xlat_felix = Dynlink::load-plugin-func2 [bool * string, string, string] (
    dll-name="flx2html", setup-str=config_data, entry-point="flx2html"
  );

Other code snippets work the same (Python, Ocaml, C++ etc).

Flx2html is a bit complicated, the other formatters are simpler.

So basically instead of wrapping the result in <pre class flxbg>
you could do something to add a horizontal scrollbar.

The function to do that could be universal, and be applied
to the other kinds of snippet too.

I don't know off hand how to do that but it can't be too hard.
Javascript is OK in fdocs (although HTML5 method would be better
if possible).

>> 
>> The hierarchical document format is a bit lame. A better way
>> of providing a contents like a drop down widget or left
>> margin would be great. All that stuff is run by plugins
>> 
>>      src/lib/plugins/*
> 
> See: ReadTheDocs Sphinx theme.

Yes but that doesn't answer the question, how to organise
the actual specification data. It's easy enough to break
it up into one set of top level pages, for example.
But is that a good idea?

however i'm looking at the ReadTheDocs stuff, looks interesting.

however restructured text is useless for our purposes, its designed
for micky mouse docs .. not serious stuff. fdoc is a lightweight layer
on top of ordinary HTML so is much better, because I can make it
do what I need eg format Felix code with colour and hyperlinks.

For example:

Hyperlinks are created by the webserver using a search path,
so we can link to C include files on any system (provided the search
path is right of course). This has to be done online, i.e. live on the
webserver. I can't be done offline (unless the offline system puts
C files in the same place as the server :)

That said .. a top level read-the-docs interface to the online docs
seems like a good idea.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to