Hi,

After re-reading the section on conf files in the user guide and
looking at the existing conf files I think I figured out what you
mean.  By creating a new collapse.conf file with the following (and
making some changes to the JS), I seem to be able to replicate most of
the behaviour of the filter:

[paradef-default]
collapse-style=template="collapseblock",subs=["normal"]

[blockdef-open]
collapse-style=template="collapseblock",subs=["normal"]

[collapseblock]
<div class="collapse-wrapper">
<div class="collapse-head">
<div class="control"><a href="#" onclick="javascript:collapse(this);
return false;" title="collapse">{expandtext=+ more}</a></div>
<div class="content">{title=Click to expand...}</div>
</div>
<div class="collapse-body">
<div class="control"><a href="#" onclick="javascript:collapse(this);
return false;" title="collapse">{collapsetext=- less}</a></div>
<div class="content">|</div>
</div>
</div>


I still need to expand the [collapseblock] to replicate some options,
but am I on the right lines here?

Cheers,
Will

On Aug 19, 11:44 am, Will <[email protected]> wrote:
> Hi Lex,
>
> Firstly, I'd just like to mention I'm an asciidoc noob - was only
> introduced to it a little over 6 months ago, so apologies for any
> stupid questions :)
>
> > 1. do you really need a filter, since you can embed extra js and css
> > anyway and everything else seems to be within asciidoc capabilities.
>
> Hmmm...I'm not sure how the same results could be achieved without the
> filter, can you explain a bit more?  I'm always *very* interested to
> learn new tips/tricks!
>
> I'd think in the worst case scenario, using the filter would achieve
> the results in a much simpler way (well, depending on how it is
> achieved without the filter I guess).
>
> > 2. please change your instructions to advise making local xhtml.conf
> > etc containing only the changes.  Do not encourage people to edit the
> > asciidoc system files as they will be overwritten when asciidoc is
> > upgraded. 
> > Seehttp://www.methods.co.nz/asciidoc/userguide.html#_configuration_file_...
> > andhttp://www.methods.co.nz/asciidoc/userguide.html#X27
>
> I have been conscious of this tbh, and always try to avoid modifying
> any system file.  However, I'm not sure the best way to include the
> additional JS & CSS files.  Currently, the contents are embedded (or
> the files are linked to) in the <head> section of the output via the
> conf file, but I can't see a way to extend this - creating a [header]
> section in a user conf file seems to replace the section completely.
> I've also looked at using a docinfo file, but that seems to require
> the docinfo.html file to reside in the same directory as the source
> file which isn't ideal.
>
> Thanks a lot for the comments & advice, really appreciate it!
>
> Cheers,
> Will
>
> On Aug 19, 2:27 am, Lex Trotman <[email protected]> wrote:
>
>
>
>
>
>
>
> > On 18 August 2011 23:55, Will <[email protected]> wrote:
>
> > > Hi,
>
> > > I recently created an AsciiDoc filter to create collapsible/expandable
> > > blocks in XHTML output.
>
> > > I've put the required files on SourceForge in case it can be of use to
> > > anyone else:
>
> > >https://sourceforge.net/projects/collapsefilter/
>
> > > Any comments will be appreciated.
>
> > Hi Will,
>
> > Nice results.
>
> > Couple of comments though.
>
> > 1. do you really need a filter, since you can embed extra js and css
> > anyway and everything else seems to be within asciidoc capabilities.
>
> > 2. please change your instructions to advise making local xhtml.conf
> > etc containing only the changes.  Do not encourage people to edit the
> > asciidoc system files as they will be overwritten when asciidoc is
> > upgraded. 
> > Seehttp://www.methods.co.nz/asciidoc/userguide.html#_configuration_file_...
> > andhttp://www.methods.co.nz/asciidoc/userguide.html#X27
>
> > Cheers
> > Lex
>
> > > Cheers,
> > > Will
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "asciidoc" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/asciidoc?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to