Giter VIP home page Giter VIP logo

Comments (8)

segfaultxavi avatar segfaultxavi commented on June 1, 2024 1

Just for reference, I also had to change the expander class to expander collapsed so that the arrows are in sync with the initial state of the div.

A pleasure working with you!

from docfx-tmpl.

MathewSachin avatar MathewSachin commented on June 1, 2024

See this patch: https://github.com/MathewSachin/docfx-tmpl/compare/MathewSachin-patch-1

I've not tested it. But, I think it should work. Please try it out and let me know.

from docfx-tmpl.

segfaultxavi avatar segfaultxavi commented on June 1, 2024

Thanks a lot for such a quick response!
It almost works. The problem is that {{>partials/classSubtitle}} has a \n at the end, so the generated HTML looks like:

    <a href="#collapse-Fields^M
  " class="expander" data-toggle="collapse">^M

If I manually remove that extra line feed, it works. Do you know how to get rid of it?

from docfx-tmpl.

MathewSachin avatar MathewSachin commented on June 1, 2024

You could try copying classSubtitle.tmpl.partial from the default template into your template and removing all new lines from it (everything on single line).
This will override the default file.

from docfx-tmpl.

segfaultxavi avatar segfaultxavi commented on June 1, 2024

I just used {{id}} instead of {{>partials/classSubtitle}} to fix it 😄

My next question is how to make the sections appear in the collapsed state. Got any idea?

from docfx-tmpl.

MathewSachin avatar MathewSachin commented on June 1, 2024

Add class collapse on the div.

Also, when using {{id}} verify if it conflicts with other sections. I've faced a similar problem before.

from docfx-tmpl.

segfaultxavi avatar segfaultxavi commented on June 1, 2024

The collapse class worked. Thanks again!

The possible {{id}} are Fields, Methods, Properties, Implements, etc. How could there be a conflict?

from docfx-tmpl.

MathewSachin avatar MathewSachin commented on June 1, 2024

If you've verified the values of {{id}} then its fine. I'm currently unable to test it myself so just wanted to confirm.

And, you're welcome!

from docfx-tmpl.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.