index.styl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. @css {
  2. /* Основные стили приложения */
  3. #app {
  4. @apply min-h-screen bg-white dark:bg-gray-900 transition-colors duration-300;
  5. }
  6. /* Header */
  7. .header {
  8. @apply bg-white dark:bg-gray-800 shadow-sm sticky top-0 z-40;
  9. }
  10. .header__nav {
  11. @apply container mx-auto px-4 py-3;
  12. }
  13. .header__nav-block {
  14. @apply flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3;
  15. }
  16. .header__nav-name {
  17. @apply text-xl sm:text-2xl font-bold bg-gradient-to-r from-primary-500 to-accent-500 bg-clip-text text-transparent text-center sm:text-left;
  18. }
  19. .header__nav-menu {
  20. @apply flex flex-wrap justify-center sm:justify-end items-center gap-2 sm:gap-4;
  21. }
  22. .header__menu-item {
  23. @apply flex items-center;
  24. }
  25. .header__menu-link {
  26. @apply text-gray-600 dark:text-gray-300 hover:text-primary-500 transition-colors duration-200 text-sm sm:text-base px-2 py-1 rounded;
  27. }
  28. .header__theme-toggle {
  29. @apply p-2 rounded-lg bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors duration-200 text-sm;
  30. }
  31. /* Main content */
  32. .main {
  33. @apply flex-1 container mx-auto px-4 py-6;
  34. }
  35. /* Page transitions */
  36. .page-slide-enter-active,
  37. .page-slide-leave-active {
  38. @apply transition-all duration-300 ease-in-out;
  39. }
  40. .page-slide-enter-from {
  41. @apply opacity-0 transform translate-x-4;
  42. }
  43. .page-slide-leave-to {
  44. @apply opacity-0 transform -translate-x-4;
  45. }
  46. /* Footer */
  47. .footer {
  48. @apply bg-gray-800 dark:bg-gray-900 text-white py-8;
  49. }
  50. .footer__content {
  51. @apply container mx-auto px-4;
  52. }
  53. .footer__sections {
  54. @apply grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8;
  55. }
  56. .footer__section {
  57. @apply flex flex-col text-center md:text-left;
  58. }
  59. .footer__section-title {
  60. @apply text-lg font-bold mb-3 md:mb-4;
  61. }
  62. .footer__section-text {
  63. @apply text-gray-400 mb-2 text-sm md:text-base;
  64. }
  65. .footer__links {
  66. @apply flex flex-col space-y-2;
  67. }
  68. .footer__link {
  69. @apply text-gray-400 hover:text-white transition-colors duration-200 text-sm md:text-base;
  70. }
  71. /* Утилитарные классы */
  72. .btn-primary {
  73. @apply bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-lg transition-colors duration-200 font-medium text-sm sm:text-base;
  74. }
  75. .btn-secondary {
  76. @apply bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-800 dark:text-white px-4 py-2 rounded-lg transition-colors duration-200 font-medium text-sm sm:text-base;
  77. }
  78. .card {
  79. @apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 sm:p-6;
  80. }
  81. .form-input {
  82. @apply w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-sm sm:text-base;
  83. }
  84. .form-label {
  85. @apply block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2;
  86. }
  87. /* Mobile menu */
  88. .mobile-menu-btn {
  89. @apply sm:hidden p-2 rounded-lg bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300;
  90. }
  91. .mobile-menu {
  92. @apply sm:hidden absolute top-full left-0 right-0 bg-white dark:bg-gray-800 shadow-lg border-t border-gray-200 dark:border-gray-700;
  93. }
  94. }
  95. /* Темная тема */
  96. @media (prefers-color-scheme: dark) {
  97. :root {
  98. color-scheme: dark;
  99. }
  100. }
  101. /* Медиа-запросы для очень маленьких экранов */
  102. @media (max-width: 360px) {
  103. .header__nav-menu {
  104. @apply gap-1;
  105. }
  106. .header__menu-link {
  107. @apply text-xs px-1;
  108. }
  109. }