Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
165 stars 43 forks source link

Add tag "modal" #262

Closed kort3x closed 2 years ago

kort3x commented 5 years ago

https://getbootstrap.com/docs/4.0/components/modal/

Stephanevg commented 5 years ago

Hi @kort3x Modal is not a HTML tag, but a bootstrap class. Bootstrap classes are supported out of the box on PSHTML.

Currently, there is no example on how to use that bootstrap feature in PSHTML. I)ll create a PSHTML example when I have a minute:

HTML example to convert

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
kort3x commented 5 years ago

I know modal isn't a html tag but maybe there should be a cmdlet/snippet in PSHTML for ease of use?

Stephanevg commented 5 years ago

Do you have an example of what you would like to have?