Request for CSS samples #589
Replies: 11 comments
-
I would like to add my support for this proposal. Cannot find any examples on the first page of this project. Just the sentence "If you want to learn more, please read the Asciidoctor.js API documentation." - and if you go there, then you find an object reference in which member names are not even sorted alphabetically... and absolutely no explanation whatsoever in this API reference or in this project how I can assign CSS classes to elements in my ADOC, how to define DIVs in my ADOC etc. I am short before changing to MS SQL Server Reporting Services, where I have a visual designer that supports me with the first steps. If anybody here can please help to understand how elements in the ADOC can be linked to definitions in the CSS file and how I shall use the asciidoctor.js API in the themes.js file, this would be extremely valuable for this project. |
Beta Was this translation helpful? Give feedback.
-
That's a good idea.
The Asciidoctor.js API documentation describes, well, the API not the HTML generated from the built-in converter of Asciidoctor Web PDF.
All the code is open-source, you are free to improve it at https://github.com/asciidoctor/asciidoctor.js
You should not do that because you don't want to bind your document to a single output format (HTML). If you want to create a custom
You can use the
Do you mean using the built-in converter?
What is
Documentation could help but I think the best way is to use a visual designer. In my opinion, you should use the preview mode, inspect the page and play with CSS. |
Beta Was this translation helpful? Give feedback.
-
I thought a bit more about it and we might consider this issue as a documentation issue. The idea would be to provide a cookbook with recipes:
@riyashdeenr @mariomuja is that what you had in mind? do you have other ideas for recipes? |
Beta Was this translation helpful? Give feedback.
-
thanks for your thoughts! I meant template.js.. not themes.js.. sorry.. it's not clear for me, how i can use the asciidoc js api to define my document layout in template.js and in which cases i need template.js and in which cases i do not need it we have changed to ms sql server reporting services.. free and easy to use with a full fledged report builder ui.. formatting table content is not an issue with ssrs and it provides good data access without the need to write a single line of code i think asciidoc is perfect for documentation.. it was not written for flexible report design and perhaps this is the reason why it is so difficult to use a library that tries to use asciidoc for something that it was not made for an then needs helping assets like template.js, which are difficult to maintain |
Beta Was this translation helpful? Give feedback.
-
Hey!
good conversation. I was thinking more of header/footer changes. incremental page numbers, formattable date/time stamp of pdf generation, insert images into header etc.
Also font changes, and css styling changes and etc. Suppose we have recipes/cookbook on how to do some of these and some samples it would be like ah-ha moment. Say i see that and go “oh that’s how you do the date/time on the footer stuff, hmm lets see if i can tweak that or write my own stuff for the footer so it shows X instead cause now i understand that bit works”
am i going off track ?
… On 6 Sep 2020, at 8:09 PM, mariomuja ***@***.***> wrote:
thanks for your thoughts!
I meant template.js.. not themes.js.. sorry.. it's not clear for me, how i can use the asciidoc js api to define my document layout in template.js and in which cases i need template.js and in which cases i do not need it
we have changed to ms sql server reporting services.. free and easy to use with a full fledged report builder ui.. formatting table content is not an issue with ssrs and it provides good data access without the need to write a single line of code
i think asciidoc is perfect for documentation.. it was not written for flexible report design and perhaps this is the reason why it is so difficult to use a library that tries to use asciidoc for something that it was not made for an then needs helping assets like template.js, which are difficult to maintain
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#275 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKGBG6ZG6UIUQVEEXUH6P53SEN3V3ANCNFSM4OZ76ZUQ>.
|
Beta Was this translation helpful? Give feedback.
-
Thanks @mariomuja and @riyashdeenr for your feedback and sorry about the delay in responding.
This is a good question. As you can see, the site is using the exact same HTML but using CSS you can create unique design. What I'm trying to say is that, in theory, you don't necessarily need to use custom templates.
Indeed, AsciiDoc is more centered around documentation/book/article. You can still use it to produce a report but that would require to spend some time on the converter to produce the expected result.
👍
No, that's definitely the goal here!
Exactly! |
Beta Was this translation helpful? Give feedback.
-
Would love to see more documentation for newcomers too. In the book sample there is no table of contents. Although using no custom layout produces a toc, I can't see how to make or add that to a custom layout. Also is there any way to get a cover image? Tried:
|
Beta Was this translation helpful? Give feedback.
-
Yes that would be great but time is the limiting factor 🥵
You can take a look at: #216 |
Beta Was this translation helpful? Give feedback.
-
@boydkelly I've added a section in the README with a complete example to set a cover image https://github.com/Mogztter/asciidoctor-web-pdf#configuration |
Beta Was this translation helpful? Give feedback.
-
Awessome! Thank you so much. In the mean time I had just added this in the template.js for the book sample:
with css
You can see I'm just a hacker.... but it works too. One thing I'm still trying to figure out here, is where is the ?.js file that is used if no template is specified as in for the samples book, resume etc. When I type asciidoctor-web-pdf my.adoc it produces a nice toc. But the book doesn't. I'm sure I'll get to the bottom of it at some point.... |
Beta Was this translation helpful? Give feedback.
-
If you are using a custom template that's perfectly fine. If it's working for you, that's what matters 😉
Asciidoctor Web PDF has a built-in/default converter: https://github.com/Mogztter/asciidoctor-web-pdf/blob/master/lib/document/document-converter.js This converter inherits from the built-in HTML 5 converter from Asciidoctor: lib/asciidoctor/converter/html5.rb |
Beta Was this translation helpful? Give feedback.
-
This is not really an issue, but if everyone could share some their custom CSS that they use to overwrite would be sweet. We can all contribute and learn from each others CSS. not sure where to post this tho...
Beta Was this translation helpful? Give feedback.
All reactions