app.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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. body > 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. transition: all 0.2s ease;
  87. }
  88. img, .contenu-flex {
  89. max-width: 100%;
  90. }
  91. .article-preview {
  92. max-height: 100px;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. }
  96. .article-preview {
  97. max-height: 600px; /* Hauteur maximale pour chaque article */
  98. overflow: hidden; /* Masque le contenu qui dépasse */
  99. position: relative; /* Nécessaire pour le gradient ou autre effet de coupure */
  100. margin-bottom: 30px;
  101. }
  102. .article-preview p {
  103. /* margin: 0; */
  104. display: -webkit-box;
  105. -webkit-line-clamp: 15; /* Nombre maximum de lignes (ici 5) */
  106. line-clamp: 15;
  107. -webkit-box-orient: vertical;
  108. overflow: hidden;
  109. text-overflow: ellipsis;
  110. }
  111. .article-preview::after {
  112. content: '';
  113. position: absolute;
  114. bottom: 0;
  115. left: 0;
  116. right: 0;
  117. height: 100px;
  118. background: linear-gradient(to bottom, transparent, white);
  119. }
  120. main h2 {
  121. font-size: 2.5em;
  122. color: rgb(34, 34, 34);
  123. }
  124. main h2 a {
  125. color: rgb(34, 34, 34);
  126. text-decoration: no;
  127. }
  128. main h2 a:hover {
  129. color: rgb(20,20,20);
  130. }
  131. .article-by {
  132. display: block;
  133. font-size: 0.5em;
  134. color: gray;
  135. }
  136. .table-articles {
  137. width: 100%;
  138. }
  139. .resize {
  140. position: fixed;
  141. bottom: 50px;
  142. right: 50px;
  143. }
  144. .size-max {
  145. max-width: 90vw;
  146. }
  147. .size-max-form {
  148. max-width: 85vw;
  149. }
  150. @media screen and (max-width: 1400px) {
  151. #header {
  152. height: 250px;
  153. }
  154. }
  155. @media screen and (max-width: 900px) {
  156. .resize {
  157. display: none;
  158. }
  159. #header.big {
  160. height: 100vh;
  161. }
  162. .navbar {
  163. padding: 0;
  164. position: absolute;
  165. }
  166. .nav-links {
  167. top: 0;
  168. left: 0;
  169. position: absolute;
  170. background-color: rgba(0, 255, 221, 0.308);
  171. width: 100%;
  172. height: 100vh;
  173. display: flex;
  174. justify-content: center;
  175. align-items: center;
  176. backdrop-filter: blur(7px);
  177. margin-left: -100%;
  178. transition: all 0.1s ease;
  179. }
  180. .nav-links ul {
  181. display: flex;
  182. flex-direction: column;
  183. align-items: center;
  184. }
  185. .navbar .menu-burger {
  186. display: block;
  187. }
  188. .nav-links.mobile-menu {
  189. margin-left: 0;
  190. }
  191. .navbar .nav-links > ul > li {
  192. margin: 25px 0;
  193. font-size: 1.2em;
  194. }
  195. .navbar .nav-links ul li {
  196. flex-direction: column;
  197. }
  198. .navbar .logo {
  199. position: absolute;
  200. top: 40px;
  201. left: 30px;
  202. font-size: 2em;
  203. }
  204. #header {
  205. height: 30vh;
  206. }
  207. main {
  208. padding: 0 20px;
  209. }
  210. }