0

I am trying to create some badge-like texts for my documentation, to highlight the status of some issues.

Here are some examples (jira issues embedded in a confluence wiki)

Example for a "closed"-badge

Example for "waiting for solution"-badge

I even struggle to find any simple way to set a background-color for a text in asciidoctor-pdf.

The most promising attempt was using a themed button-macro.

btn:[Closed]

with this theme-section:

button:
  background-color: #88FF88
  border-color: #33FF33
  border-radius: 5
  border-width: 0.5
  border-offset: 3.0

The result is quite close to what I hoped to achieve, however I cannot have buttons with different colors. Or is it possible to overwrite the theme-values in the *.adoc file itself?

Is there any other possibility to create something similar in asciidoc-pdf?

1 Answer 1

2

You might be able to achive this with roles.

I have at the top of my .adoc file:

:pdf-theme: my-theme.yml

Then I have a file called my-theme.yml in the same directory as my .adoc:

extends: default

role:
  done:
    font-color: ffffff
    background-color: #88FF88
    border-color: #33FF33
    border-radius: 2
    border-width: 0.5
    border-offset: .0

When I use it, I do this:

[.done]#DONE#
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the hint, was already using roles but did not know that I can also define borders in them. I am using this configuration now: green: font-color: #006644 font_size: 7 font_style: bold background-color: #e3fcef border-color: #e3fcef border-radius: 3 border-width: 0.5 border-offset: 1.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.