layout.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {% assign horizontal = include.horizontal | default: false %}
  2. <form class="card">
  3. <div class="card-header">
  4. <h3 class="card-title">{{ include.title | default: 'Basic form' }}</h3>
  5. </div>
  6. <div class="card-body">
  7. <div class="mb-3{% if horizontal %} row{% endif %}">
  8. <label class="{% if horizontal %}col-3 col-form-label{% else %}form-label{% endif %} required">Email address</label>
  9. <div{% if horizontal %} class="col"{% endif %}>
  10. <input type="email" class="form-control" aria-describedby="emailHelp" placeholder="Enter email">
  11. <small class="form-hint">We'll never share your email with anyone else.</small>
  12. </div>
  13. </div>
  14. <div class="mb-3{% if horizontal %} row{% endif %}">
  15. <label class="{% if horizontal %}col-3 col-form-label{% else %}form-label{% endif %} required">Password</label>
  16. <div{% if horizontal %} class="col"{% endif %}>
  17. <input type="password" class="form-control" placeholder="Password">
  18. <small class="form-hint">
  19. Your password must be 8-20 characters long, contain letters and numbers, and must not contain
  20. spaces, special characters, or emoji.
  21. </small>
  22. </div>
  23. </div>
  24. <div class="mb-3{% if horizontal %} row{% endif %}">
  25. <label class="{% if horizontal %}col-3 col-form-label{% else %}form-label{% endif %}">Select</label>
  26. <div{% if horizontal %} class="col"{% endif %}>
  27. <select class="form-select">
  28. <option>Option 1</option>
  29. <optgroup label="Optgroup 1">
  30. <option>Option 1</option>
  31. <option>Option 2</option>
  32. </optgroup>
  33. <option>Option 2</option>
  34. <optgroup label="Optgroup 2">
  35. <option>Option 1</option>
  36. <option>Option 2</option>
  37. </optgroup>
  38. <optgroup label="Optgroup 3">
  39. <option>Option 1</option>
  40. <option>Option 2</option>
  41. </optgroup>
  42. <option>Option 3</option>
  43. <option>Option 4</option>
  44. </select>
  45. </div>
  46. </div>
  47. <div class="{% if horizontal %}row{% else %}mb-3{% endif %}">
  48. <label class="{% if horizontal %}col-3 col-form-label pt-0{% else %}form-label{% endif %}">Checkboxes</label>
  49. <div{% if horizontal %} class="col"{% endif %}>
  50. <label class="form-check">
  51. <input class="form-check-input" type="checkbox" checked>
  52. <span class="form-check-label">Option 1</span>
  53. </label>
  54. <label class="form-check">
  55. <input class="form-check-input" type="checkbox">
  56. <span class="form-check-label">Option 2</span>
  57. </label>
  58. <label class="form-check">
  59. <input class="form-check-input" type="checkbox" disabled>
  60. <span class="form-check-label">Option 3</span>
  61. </label>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="card-footer text-end">
  66. <button type="submit" class="btn btn-primary">Submit</button>
  67. </div>
  68. </form>