about.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. @use 'sass:map';
  2. $progress-bar-colors: (
  3. 'blue': #048dff,
  4. 'yellow': #eebb4d,
  5. 'pink': #ed63d2,
  6. 'green': #2dca73,
  7. 'sky': #00c9e3,
  8. 'orange': #ff7c7c,
  9. );
  10. @mixin circular-progress-bar-color() {
  11. @each $color, $value in $progress-bar-colors {
  12. &.#{$color} {
  13. .circular-progress-bar {
  14. border-color: $value;
  15. }
  16. }
  17. }
  18. }
  19. @mixin circular-progress-animation-breakpoints() {
  20. $progress: 50;
  21. $duration: 0;
  22. @for $i from 1 through 10 {
  23. .circular-progress-percentage-#{$progress} {
  24. animation: circular-loading-#{$progress} #{$duration}s linear forwards 1.8s;
  25. }
  26. $progress: $progress + 5;
  27. $duration: $duration + 0.18;
  28. }
  29. }
  30. @mixin circular-progress-animation-keyframes($progress, $degree, $keyframes) {
  31. @for $i from 1 through $keyframes {
  32. @keyframes circular-loading-#{$progress} {
  33. 0% {
  34. transform: rotate(0);
  35. }
  36. 100% {
  37. transform: rotate(#{$degree}deg);
  38. }
  39. }
  40. $progress: $progress + 5;
  41. $degree: $degree + 18;
  42. }
  43. }
  44. .about-section {
  45. .social-link {
  46. list-style: none;
  47. padding: 0.2rem;
  48. a {
  49. font-size: 1.5rem;
  50. color: get-light-color('text-color');
  51. padding: 0.5rem;
  52. &:hover {
  53. color: get-light-color('accent-color');
  54. @include transition();
  55. }
  56. }
  57. }
  58. .circular-progress {
  59. width: 150px;
  60. height: 150px;
  61. line-height: 150px;
  62. background: none;
  63. margin: 0 auto;
  64. box-shadow: none;
  65. position: relative;
  66. &::after {
  67. content: '';
  68. width: 100%;
  69. height: 100%;
  70. border-radius: 50%;
  71. border: 12px solid get-light-color('bg-primary');
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. }
  76. span {
  77. width: 50%;
  78. height: 100%;
  79. overflow: hidden;
  80. position: absolute;
  81. top: 0;
  82. z-index: 1;
  83. }
  84. .circular-progress-bar {
  85. width: 100%;
  86. height: 100%;
  87. background: none;
  88. border-width: 12px;
  89. border-style: solid;
  90. position: absolute;
  91. top: 0;
  92. }
  93. .circular-progress-left {
  94. left: 0;
  95. .circular-progress-bar {
  96. left: 100%;
  97. border-top-right-radius: 80px;
  98. border-bottom-right-radius: 80px;
  99. border-left: 0;
  100. transform-origin: center left;
  101. }
  102. }
  103. .circular-progress-right {
  104. right: 0;
  105. .circular-progress-bar {
  106. left: -100%;
  107. border-top-left-radius: 80px;
  108. border-bottom-left-radius: 80px;
  109. border-right: 0;
  110. transform-origin: center right;
  111. animation: circular-loading-1 1.8s linear forwards;
  112. }
  113. }
  114. .circular-progress-value {
  115. width: 90%;
  116. height: 90%;
  117. padding: 1rem;
  118. border-radius: 50%;
  119. background: get-light-color('text-color');
  120. font-size: 1rem;
  121. color: get-light-color('bg-primary');
  122. line-height: initial;
  123. text-align: center;
  124. position: absolute;
  125. top: 5%;
  126. left: 5%;
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. }
  131. @include circular-progress-bar-color();
  132. @include circular-progress-animation-breakpoints();
  133. @include circular-progress-animation-keyframes($progress: 50, $degree: 0, $keyframes: 10);
  134. @include circular-progress-animation-keyframes($progress: 1, $degree: 180, $keyframes: 5);
  135. }
  136. @include media('<=large') {
  137. .circular-progress {
  138. margin-bottom: 20px;
  139. }
  140. }
  141. @include media('<=medium') {
  142. .about-section.container {
  143. max-width: 100%;
  144. }
  145. .circular-progress {
  146. width: 135px;
  147. height: 135px;
  148. }
  149. }
  150. @include media('<=small') {
  151. .circular-progress {
  152. width: 150px;
  153. height: 150px;
  154. }
  155. .circular-progress .circular-progress-value {
  156. font-size: 1rem;
  157. }
  158. }
  159. @include media('<=tiny') {
  160. .col-6 {
  161. flex: auto;
  162. max-width: 100%;
  163. }
  164. .social-link {
  165. flex-wrap: wrap;
  166. }
  167. .certificate-badge {
  168. padding-left: 2rem;
  169. padding-right: 2rem;
  170. }
  171. .circular-progress {
  172. width: 200px;
  173. height: 200px;
  174. .circular-progress-left .circular-progress-bar {
  175. border-top-right-radius: 100px;
  176. border-bottom-right-radius: 100px;
  177. }
  178. .circular-progress-right .circular-progress-bar {
  179. border-top-left-radius: 100px;
  180. border-bottom-left-radius: 100px;
  181. }
  182. }
  183. }
  184. }
  185. html[data-theme='dark'] {
  186. .about-section {
  187. .social-link {
  188. a {
  189. color: get-dark-color('text-color');
  190. &:hover {
  191. color: get-dark-color('accent-color');
  192. }
  193. }
  194. }
  195. .circular-progress {
  196. &::after {
  197. border: 12px solid get-dark-color('bg-primary');
  198. }
  199. .circular-progress-value {
  200. background: get-dark-color('inverse-text-color');
  201. color: get-dark-color('text-color');
  202. }
  203. }
  204. }
  205. }