app.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /* @tailwind base;
  2. @tailwind components;
  3. @tailwind utilities;
  4. @layer components {
  5. .btn-primary {
  6. @apply py-2 px-5 bg-violet-500 text-white font-semibold rounded-full shadow-md hover:bg-violet-700 focus:outline-none focus:ring focus:ring-violet-400 focus:ring-opacity-75;
  7. }
  8. }
  9. @layer components {
  10. .btn-danger {
  11. @apply py-2 px-5 bg-red-500 text-white font-semibold rounded-full shadow-md hover:bg-red-700 focus:outline-none focus:ring focus:ring-red-400 focus:ring-opacity-75;
  12. }
  13. } */
  14. body {
  15. margin: 0;
  16. padding: 0;
  17. background-color: rgb(38, 26, 51);
  18. background-image: url(../images/landscape.jpg);
  19. background-size: cover;
  20. background-attachment: fixed;
  21. background-position-y: 0;
  22. }
  23. header * {
  24. margin: 0;
  25. padding: 0;
  26. list-style: none;
  27. text-decoration: none;
  28. }
  29. header {
  30. height: 200px;
  31. width: 100vw;
  32. transition: all 0.1s ease;
  33. }
  34. .navbar {
  35. /* position: absolute; */
  36. padding: 50px;
  37. display: flex;
  38. justify-content: space-between;
  39. align-items: center;
  40. width: 100%;
  41. box-sizing: border-box;
  42. }
  43. .navbar a {
  44. color: white;
  45. }
  46. .navbar .logo {
  47. font-size: 4em;
  48. font-weight: bold;
  49. }
  50. .navbar .nav-links ul {
  51. display: flex;
  52. }
  53. .navbar .nav-links ul li {
  54. margin: 0 25px;
  55. }
  56. .navbar .nav-links > ul > li {
  57. font-size: 1.1em;
  58. }
  59. .navbar .nav-links ul li.active a {
  60. color: #ed3c57;
  61. font-weight: 600;
  62. }
  63. .navbar .menu-burger {
  64. display: none;
  65. position: absolute;
  66. top: 50px;
  67. right: 30px;
  68. width: 35px;
  69. }
  70. .navbar .nav-links ul li {
  71. display: flex;
  72. justify-content: center;
  73. align-items: center;
  74. flex-direction: column;
  75. }
  76. /* Body */
  77. main {
  78. width: 100%;
  79. box-sizing: border-box;
  80. margin: 0 auto;
  81. max-width: 900px;
  82. background-color: white;
  83. padding: 0 30px;
  84. border-radius: 15px;
  85. min-height: 70vh;
  86. }
  87. img, .contenu-flex {
  88. max-width: 100%;
  89. }
  90. .article-preview {
  91. max-height: 100px;
  92. overflow: hidden;
  93. text-overflow: ellipsis;
  94. }
  95. .article-preview {
  96. max-height: 600px; /* Hauteur maximale pour chaque article */
  97. overflow: hidden; /* Masque le contenu qui dépasse */
  98. position: relative; /* Nécessaire pour le gradient ou autre effet de coupure */
  99. margin-bottom: 30px;
  100. }
  101. .article-preview p {
  102. /* margin: 0; */
  103. display: -webkit-box;
  104. -webkit-line-clamp: 15; /* Nombre maximum de lignes (ici 5) */
  105. line-clamp: 15;
  106. -webkit-box-orient: vertical;
  107. overflow: hidden;
  108. text-overflow: ellipsis;
  109. }
  110. .article-preview::after {
  111. content: '';
  112. position: absolute;
  113. bottom: 0;
  114. left: 0;
  115. right: 0;
  116. height: 100px;
  117. background: linear-gradient(to bottom, transparent, white);
  118. }
  119. main h2 {
  120. font-size: 2.5em;
  121. color: rgb(34, 34, 34);
  122. }
  123. main h2 a {
  124. color: rgb(34, 34, 34);
  125. text-decoration: no;
  126. }
  127. main h2 a:hover {
  128. color: rgb(20,20,20);
  129. }
  130. .article-by {
  131. display: block;
  132. font-size: 0.5em;
  133. color: gray;
  134. }
  135. .table-articles {
  136. width: 100%;
  137. }
  138. @media screen and (max-width: 1400px) {
  139. header {
  140. height: 250px;
  141. }
  142. }
  143. @media screen and (max-width: 900px) {
  144. header.big {
  145. height: 100vh;
  146. }
  147. .navbar {
  148. padding: 0;
  149. position: absolute;
  150. }
  151. .nav-links {
  152. top: 0;
  153. left: 0;
  154. position: absolute;
  155. background-color: rgba(0, 255, 221, 0.308);
  156. width: 100%;
  157. height: 100vh;
  158. display: flex;
  159. justify-content: center;
  160. align-items: center;
  161. backdrop-filter: blur(7px);
  162. margin-left: -100%;
  163. transition: all 0.1s ease;
  164. }
  165. .nav-links ul {
  166. display: flex;
  167. flex-direction: column;
  168. align-items: center;
  169. }
  170. .navbar .menu-burger {
  171. display: block;
  172. }
  173. .nav-links.mobile-menu {
  174. margin-left: 0;
  175. }
  176. .navbar .nav-links > ul > li {
  177. margin: 25px 0;
  178. font-size: 1.2em;
  179. }
  180. .navbar .nav-links ul li {
  181. flex-direction: column;
  182. }
  183. .navbar .logo {
  184. position: absolute;
  185. top: 40px;
  186. left: 30px;
  187. font-size: 2em;
  188. }
  189. header {
  190. height: 30vh;
  191. }
  192. main {
  193. padding: 0 20px;
  194. }
  195. }