index.styl 6.3 KB

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