index.styl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. // =============================================
  2. // Переменные цветов
  3. // =============================================
  4. $primary-50 = #fef2f2
  5. $primary-100 = #fee2e2
  6. $primary-200 = #fecaca
  7. $primary-300 = #fca5a5
  8. $primary-400 = #f87171
  9. $primary-500 = #ef4444
  10. $primary-600 = #dc2626
  11. $primary-700 = #b91c1c
  12. $primary-800 = #991b1b
  13. $primary-900 = #7f1d1d
  14. $accent-50 = #f0f9ff
  15. $accent-100 = #e0f2fe
  16. $accent-200 = #bae6fd
  17. $accent-300 = #7dd3fc
  18. $accent-400 = #38bdf8
  19. $accent-500 = #0ea5e9
  20. $accent-600 = #0284c7
  21. $accent-700 = #0369a1
  22. $accent-800 = #075985
  23. $accent-900 = #0c4a6e
  24. $gray-50 = #f9fafb
  25. $gray-100 = #f3f4f6
  26. $gray-200 = #e5e7eb
  27. $gray-300 = #d1d5db
  28. $gray-400 = #9ca3af
  29. $gray-500 = #6b7280
  30. $gray-600 = #4b5563
  31. $gray-700 = #374151
  32. $gray-800 = #1f2937
  33. $gray-900 = #111827
  34. $white = #ffffff
  35. $black = #000000
  36. // =============================================
  37. // Миксины
  38. // =============================================
  39. flex-center()
  40. display: flex
  41. align-items: center
  42. justify-content: center
  43. flex-between()
  44. display: flex
  45. align-items: center
  46. justify-content: space-between
  47. transition-all($duration = 0.3s)
  48. transition: all $duration ease-in-out
  49. // =============================================
  50. // Базовые стили приложения
  51. // =============================================
  52. #app
  53. min-height: 100vh
  54. background-color: $white
  55. &.dark
  56. background-color: $gray-900
  57. transition: background-color 0.3s ease-in-out
  58. // =============================================
  59. // Стили header
  60. // =============================================
  61. .header
  62. background-color: $white
  63. box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)
  64. position: sticky
  65. top: 0
  66. z-index: 50
  67. .dark &
  68. background-color: $gray-800
  69. .header__nav
  70. max-width: 1200px
  71. margin: 0 auto
  72. padding: 0.75rem 1rem
  73. .header__nav-block
  74. flex-between()
  75. .header__brand
  76. display: flex
  77. align-items: center
  78. gap: 0.75rem
  79. .header__logo
  80. width: 2rem
  81. height: 2rem
  82. object-fit: contain
  83. .header__company-name
  84. font-size: 1.25rem
  85. font-weight: bold
  86. color: $gray-900
  87. .dark &
  88. color: $white
  89. .header__nav-menu
  90. display: flex
  91. align-items: center
  92. gap: 1rem
  93. .header__menu-item
  94. display: flex
  95. align-items: center
  96. .header__menu-link
  97. color: $gray-600
  98. transition: color 0.2s ease-in-out
  99. text-decoration: none
  100. &:hover
  101. color: $primary-500
  102. .dark &
  103. color: $gray-300
  104. &:hover
  105. color: $primary-500
  106. .header__theme-toggle
  107. padding: 0.5rem
  108. border-radius: 0.5rem
  109. background-color: $gray-100
  110. color: $gray-600
  111. transition: all 0.2s ease-in-out
  112. border: none
  113. cursor: pointer
  114. &:hover
  115. background-color: $gray-200
  116. .dark &
  117. background-color: $gray-700
  118. color: $gray-300
  119. &:hover
  120. background-color: $gray-600
  121. // =============================================
  122. // Стили main content
  123. // =============================================
  124. .main
  125. flex: 1
  126. // =============================================
  127. // Анимации переходов между страницами
  128. // =============================================
  129. .page-slide-enter-active,
  130. .page-slide-leave-active
  131. transition: all 0.3s ease-in-out
  132. .page-slide-enter-from
  133. opacity: 0
  134. transform: translateX(1rem)
  135. .page-slide-leave-to
  136. opacity: 0
  137. transform: translateX(-1rem)
  138. // =============================================
  139. // Стили footer
  140. // =============================================
  141. .footer
  142. background-color: $gray-800
  143. color: $white
  144. padding: 2rem 0
  145. .dark &
  146. background-color: $gray-900
  147. .footer__content
  148. max-width: 1200px
  149. margin: 0 auto
  150. padding: 0 1rem
  151. .footer__sections
  152. display: grid
  153. grid-template-columns: 1fr
  154. gap: 2rem
  155. @media (min-width: 768px)
  156. grid-template-columns: repeat(3, 1fr)
  157. .footer__section
  158. display: flex
  159. flex-direction: column
  160. .footer__brand
  161. display: flex
  162. align-items: center
  163. gap: 0.5rem
  164. margin-bottom: 0.5rem
  165. .footer__logo
  166. width: 1.5rem
  167. height: 1.5rem
  168. object-fit: contain
  169. .footer__section-title
  170. font-size: 1.125rem
  171. font-weight: bold
  172. margin-bottom: 1rem
  173. .footer__section-text
  174. color: $gray-400
  175. margin-bottom: 0.5rem
  176. .footer__links
  177. display: flex
  178. flex-direction: column
  179. gap: 0.5rem
  180. .footer__link
  181. color: $gray-400
  182. text-decoration: none
  183. transition: color 0.2s ease-in-out
  184. &:hover
  185. color: $white
  186. // =============================================
  187. // Утилитарные классы
  188. // =============================================
  189. .btn-primary
  190. background-color: $primary-500
  191. color: $white
  192. padding: 0.5rem 1rem
  193. border-radius: 0.5rem
  194. font-weight: 500
  195. transition: background-color 0.2s ease-in-out
  196. border: none
  197. cursor: pointer
  198. text-decoration: none
  199. display: inline-block
  200. text-align: center
  201. &:hover
  202. background-color: $primary-600
  203. .btn-secondary
  204. background-color: $gray-200
  205. color: $gray-700
  206. padding: 0.5rem 1rem
  207. border-radius: 0.5rem
  208. font-weight: 500
  209. transition: background-color 0.2s ease-in-out
  210. border: none
  211. cursor: pointer
  212. text-decoration: none
  213. display: inline-block
  214. text-align: center
  215. &:hover
  216. background-color: $gray-300
  217. .dark &
  218. background-color: $gray-700
  219. color: $gray-300
  220. &:hover
  221. background-color: $gray-600
  222. .card
  223. background-color: $white
  224. border-radius: 0.5rem
  225. box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)
  226. padding: 1.5rem
  227. .dark &
  228. background-color: $gray-800
  229. .form-input
  230. width: 100%
  231. padding: 0.5rem 0.75rem
  232. border: 1px solid $gray-300
  233. border-radius: 0.5rem
  234. background-color: $white
  235. color: $gray-900
  236. outline: none
  237. transition: all 0.2s ease-in-out
  238. &:focus
  239. outline: none
  240. border-color: $primary-500
  241. box-shadow: 0 0 0 2px rgba($primary-500, 0.2)
  242. .dark &
  243. background-color: $gray-700
  244. color: $white
  245. border-color: $gray-600
  246. &:focus
  247. border-color: $primary-500
  248. .form-label
  249. display: block
  250. font-size: 0.875rem
  251. font-weight: 500
  252. color: $gray-700
  253. margin-bottom: 0.5rem
  254. .dark &
  255. color: $gray-300
  256. // =============================================
  257. // Адаптивные стили
  258. // =============================================
  259. @media (max-width: 768px)
  260. .header__nav-block
  261. flex-direction: column
  262. gap: 1rem
  263. .header__brand
  264. justify-content: center
  265. .header__nav-menu
  266. justify-content: center
  267. flex-wrap: wrap
  268. .footer__sections
  269. grid-template-columns: 1fr
  270. gap: 1.5rem
  271. @media (max-width: 480px)
  272. .header__nav
  273. padding: 0.5rem
  274. .header__company-name
  275. font-size: 1.1rem
  276. .header__menu-link
  277. font-size: 0.875rem
  278. .footer__content
  279. padding: 0 0.5rem
  280. // =============================================
  281. // Темная тема (автоматическая)
  282. // =============================================
  283. @media (prefers-color-scheme: dark)
  284. :root
  285. color-scheme: dark