frontend.css.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php if ( isset( $settings->number_spacing ) ) : ?>
  2. .fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number {
  3. font-size: 1px;
  4. margin-left: <?php echo $settings->number_spacing ?>px;
  5. margin-right: <?php echo $settings->number_spacing ?>px;
  6. }
  7. <?php endif; ?>
  8. .fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-unit-label {
  9. <?php
  10. if ( ! empty( $settings->label_size ) ) {
  11. echo 'font-size: ' . $settings->label_size . 'px;';
  12. }
  13. ?>
  14. }
  15. <?php if ( isset( $settings->layout ) && $settings->layout == 'default' ) : ?>
  16. .fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-unit {
  17. <?php
  18. if ( isset( $settings->vertical_padding ) ) {
  19. echo 'padding-top: ' . $settings->vertical_padding . 'px;';
  20. echo 'padding-bottom: ' . $settings->vertical_padding . 'px;';
  21. }
  22. if ( isset( $settings->horizontal_padding ) ) {
  23. echo 'padding-left: ' . $settings->horizontal_padding . 'px;';
  24. echo 'padding-right: ' . $settings->horizontal_padding . 'px;';
  25. }
  26. if ( isset( $settings->border_radius ) ) {
  27. echo 'border-radius: ' . $settings->border_radius . 'px;';
  28. }
  29. ?>
  30. <?php if ( ! empty( $settings->number_bg_color ) ) : ?>
  31. background-color: <?php echo esc_html( vamtam_el_sanitize_accent( $settings->number_bg_color ) ) ?>;
  32. <?php endif ?>
  33. }
  34. <?php if ( $settings->show_separator == 'yes' ) : ?>
  35. <?php if ( $settings->separator_type == 'colon' ) : ?>
  36. .fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number:after {
  37. <?php
  38. if ( isset( $settings->number_spacing ) ) {
  39. echo 'width: ' . ( $settings->number_spacing * 2 ) . 'px;';
  40. echo 'right: -' . ( $settings->number_spacing * 2 ) . 'px;';
  41. }
  42. ?>
  43. <?php if ( isset( $settings->separator_color ) ) : ?>
  44. color: <?php echo esc_html( vamtam_el_sanitize_accent( $settings->separator_color ) ) ?>;
  45. <?php endif ?>
  46. }
  47. <?php endif; ?>
  48. <?php if ( $settings->separator_type == 'line' ) : ?>
  49. .fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number:after {
  50. <?php
  51. if ( isset( $settings->number_spacing ) ) {
  52. echo 'right: -' . $settings->number_spacing . 'px;';
  53. }
  54. ?>
  55. <?php if ( isset( $settings->separator_color ) ) : ?>
  56. border-color: <?php echo esc_html( vamtam_el_sanitize_accent( $settings->separator_color ) ) ?>;
  57. <?php endif ?>
  58. }
  59. <?php endif; ?>
  60. <?php endif ?>
  61. <?php elseif ( isset( $settings->layout ) && $settings->layout == 'circle' ) : ?>
  62. .fl-node-<?php echo $id ?> .fl-countdown-unit {
  63. position: absolute;
  64. top: 50%;
  65. left: 50%;
  66. transform: translate(-50%,-50%);
  67. }
  68. .fl-node-<?php echo $id ?> .fl-countdown-number{
  69. <?php
  70. if ( ! empty( $settings->circle_width ) ) {
  71. echo 'width: ' . $settings->circle_width . 'px;';
  72. echo 'height: ' . $settings->circle_width . 'px;';
  73. } else {
  74. echo 'max-width: 100px;';
  75. echo 'max-height: 100px;';
  76. }
  77. ?>
  78. }
  79. .fl-node-<?php echo $id ?> .fl-countdown-circle-container{
  80. <?php
  81. if ( ! empty( $settings->circle_width ) ) {
  82. echo 'max-width: ' . $settings->circle_width . 'px;';
  83. echo 'max-height: ' . $settings->circle_width . 'px;';
  84. } else {
  85. echo 'max-width: 100px;';
  86. echo 'max-height: 100px;';
  87. }
  88. ?>
  89. }
  90. .fl-node-<?php echo $id ?> .fl-countdown .svg circle{
  91. <?php
  92. if ( ! empty( $settings->circle_dash_width ) ) {
  93. echo 'stroke-width: ' . $settings->circle_dash_width . 'px;';
  94. }
  95. ?>
  96. }
  97. <?php endif; ?>