Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

110 righe
3.5 KiB

  1. namespace BootStrapComponents
  2. {
  3. public static class BT
  4. {
  5. public static string RoundedBorder => "rounded";
  6. public static string PullRight => "pull-right";
  7. public static string PullLeft => "pull-left";
  8. public static string PullCenter => "pull-center";
  9. public static string TextAlign(TextAlignment textAlignment) => "text-" + textAlignment;
  10. public static string CenterBlock => "mx-auto d-block";
  11. public static string Button(ColorType colorType, bool outline = false) => "btn btn" + (outline ? "-outline" : "") + "-" + colorType;
  12. public static string Background(ColorType colorType) => "bg-" + colorType;
  13. public static string TextColor(ColorType colorType) => "text-" + colorType;
  14. #region Position
  15. public static string Position(Postion p) => p.ToString().ToLower().Replace("_", "-");
  16. #endregion
  17. #region Flex
  18. public static string FlexDisplay => "d-flex";
  19. public static string FlexJustifyAround => "d-flex justify-content-around";
  20. public static string FlexJustifyBetween => "d-flex justify-content-between";
  21. #endregion
  22. #region Shadows
  23. public static string RegularShadow => "shadow";
  24. public static string SmallShadow => "shadow-sm";
  25. public static string LargeShadow => "shadow-lg";
  26. #endregion
  27. #region Opacity
  28. public static string Opacity75 => "opacity-75";
  29. public static string Opacity50 => "opacity-50";
  30. public static string Opacity25 => "opacity-25";
  31. #endregion
  32. #region Containers
  33. public static string FormFloating => "form-floating";
  34. public static string Row => "row";
  35. public static string Col(int i) => $"col-{i}";
  36. public static string DisplayBlock => "d-block";
  37. #endregion
  38. #region Margins
  39. public static string Margin(int m) => $"m-{m}";
  40. public static string MarginLeft(int m) => $"ml-{m}";
  41. public static string MarginRight(int m) => $"mr-{m}";
  42. public static string MarginBottom(int m) => $"mb-{m}";
  43. public static string MarginTop(int m) => $"mt-{m}";
  44. public static string Padding(int m) => $"p-{m}";
  45. public static string PaddingLeft(int m) => $"pl-{m}";
  46. public static string PaddingRight(int m) => $"pr-{m}";
  47. public static string PaddingBottom(int m) => $"pb-{m}";
  48. public static string PaddingTop(int m) => $"pt-{m}";
  49. #endregion
  50. public static class Icons
  51. {
  52. public static string Copy => "bi bi-clipboard-fill";
  53. }
  54. #region Form controls
  55. public static string Input => "form-control";
  56. #endregion
  57. }
  58. public static class Styles
  59. {
  60. public static string VerticalSelfAlign(TextAlignment alignment) => $"align-self:{alignment};";
  61. public static string ToRightGradientBackColor(string color) => $"background-image:linear-gradient(to right, {color}, transparent)";
  62. public static string ToLeftGradientBackColor(string color) => $"background-image:linear-gradient(to left, {color}, transparent)";
  63. }
  64. public enum ColorType
  65. {
  66. primary,
  67. secondary,
  68. success,
  69. danger,
  70. warning,
  71. info,
  72. light,
  73. dark,
  74. white
  75. }
  76. public enum Postion
  77. {
  78. fixed_top,
  79. sticky_top,
  80. fixed_bottom,
  81. sticky_bottom,
  82. Position_Static,
  83. Position_relative,
  84. Position_absolute,
  85. Position_Fixed,
  86. Position_sticky
  87. }
  88. }