jenkins-infra / jenkins.io

A static site for the Jenkins automation server
https://jenkins.io
Other
322 stars 1.23k forks source link

asciidoc plugin to toggle information #3480

Open getJv opened 4 years ago

getJv commented 4 years ago

Description

A new plugin to enable show and hide content in a page.

Preview:

asciidoc raw template

+++
<p>
  <button 
    data-target="#parameterized-build-4" 
    aria-controls="parameterized-build-4"
    aria-expanded="false" class="btn btn-secondary btn-sm" type="button" data-toggle="collapse" 
    >
    <svg class="bi bi-exclamation-circle-fill" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
        <path fill-rule="evenodd" d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/>
    </svg>
    Info
  </button>
</p>
<div class="collapse" id="parameterized-build-4">
  <div class="card card-body my-3">
+++
   image:parameterized-build-4.png[parameterized-build-4]
+++
  </div>
</div>
+++

Suggestion

When we type: toggle:Info[content]

Where info is the label and content could be any text

Links

plugin repo: https://github.com/jenkins-infra/asciidoctor-jenkins-extensions

getJv commented 4 years ago

I'm Working on it.