frontend.css.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php if ( ! empty( $settings->number_size ) || ! empty( $settings->number_color ) ) : ?>
  2. .fl-node-<?php echo $id ?> .fl-number-string {
  3. <?php
  4. if ( ! empty( $settings->number_size ) ) {
  5. echo 'font-size: ' . $settings->number_size . 'px;';
  6. }
  7. ?>
  8. }
  9. <?php endif; ?>
  10. <?php if ( ! empty( $settings->text_color ) ) : ?>
  11. .fl-node-<?php echo esc_html( $id ) ?> .fl-module-content .fl-number-before-text,
  12. .fl-node-<?php echo esc_html( $id ) ?> .fl-module-content .fl-number-after-text {
  13. color: <?php echo esc_html( vamtam_el_sanitize_accent( $settings->text_color ) ) ?>;
  14. }
  15. <?php endif; ?>
  16. <?php if ( isset( $settings->layout ) && $settings->layout === 'default' ) : ?>
  17. .fl-node-<?php echo $id ?> .fl-number-text {
  18. text-align: <?php echo esc_html( $settings->text_align ) ?>;
  19. }
  20. <?php endif ?>
  21. <?php if ( isset( $settings->layout ) && $settings->layout === 'circle' ) : ?>
  22. .fl-node-<?php echo $id ?> .fl-number-text {
  23. position: absolute;
  24. top: 50%;
  25. left: 50%;
  26. transform: translate(-50%,-50%);
  27. }
  28. .fl-node-<?php echo $id ?> .fl-number-circle-container {
  29. <?php
  30. if ( ! empty( $settings->circle_width ) ) {
  31. echo 'max-width: ' . $settings->circle_width . 'px;';
  32. echo 'max-height: ' . $settings->circle_width . 'px;';
  33. } else {
  34. echo 'max-width: 100px;';
  35. echo 'max-height: 100px;';
  36. }
  37. ?>
  38. }
  39. .fl-node-<?php echo $id ?> .svg circle{
  40. <?php
  41. if ( ! empty( $settings->circle_dash_width ) ) {
  42. echo 'stroke-width: ' . $settings->circle_dash_width . 'px;';
  43. }
  44. ?>
  45. }
  46. <?php endif; ?>