_projets-complets-print.scss 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. // =========================
  2. // PRINT
  3. // =========================
  4. @media print {
  5. * {
  6. box-shadow: none !important;
  7. }
  8. img {
  9. max-width: 100%;
  10. height: auto;
  11. }
  12. @page {
  13. margin-top: 1cm;
  14. margin-bottom: 1cm;
  15. // margin-left: 1cm;
  16. // margin-right: 1cm;
  17. }
  18. .layout-container{
  19. display: block;
  20. }
  21. .path-projets-complets {
  22. .layout-content{
  23. // width: 80vw;
  24. .print-header {
  25. position: absolute;
  26. top: 1cm;
  27. right: 1cm;
  28. display: flex;
  29. align-items: center;
  30. gap: 0.5rem;
  31. }
  32. .print-header img {
  33. width: 2cm;
  34. height: auto;
  35. }
  36. .print-header__text {
  37. text-transform: uppercase;
  38. font-family: "Source Code Pro";
  39. color: $blue-dark;
  40. font-size: 0.8rem;
  41. font-weight: 500;
  42. text-transform: uppercase;
  43. text-align: end;
  44. }
  45. .view-header,
  46. .view-filters{
  47. display: none;
  48. }
  49. .views-row{
  50. .node-type-projet {
  51. border-bottom:none;
  52. }
  53. margin-top: 3rem;
  54. break-after: page ;
  55. page-break-after: always;
  56. .projet-header-print{
  57. padding-top: 3rem;
  58. .field--name-title{
  59. font-size: 1.2rem;
  60. }
  61. .field--name-field-photo .field__item:nth-child(n+8) {
  62. display: none;
  63. }
  64. .field--name-field-photo .image-field-caption {
  65. display: none;
  66. }
  67. .field--name-field-photo {
  68. // height: 66vh;
  69. .field__label {
  70. display: none;
  71. }
  72. .field__items {
  73. height: 100%;
  74. display: grid;
  75. gap: 4px;
  76. }
  77. .field__item {
  78. overflow: visible;
  79. aspect-ratio: 3.5/2;
  80. // aspect-ratio: 4/2;
  81. }
  82. .field__item img {
  83. width: 100%;
  84. height: 100%;
  85. object-fit: cover;
  86. display: block;
  87. }
  88. .image-field-caption {
  89. display: inline-block;
  90. width: 100%;
  91. z-index: 2;
  92. font-size: 6pt;
  93. line-height: 1;
  94. margin-left: 0;
  95. margin-top: 0;
  96. margin-bottom: 0;
  97. }
  98. // 1 seule image
  99. .field__items:has(.field__item:only-child) {
  100. grid-template-columns: 1fr;
  101. // grid-template-rows: 1fr;
  102. }
  103. .field__items:has(.field__item:only-child) .field__item {
  104. grid-column: 1;
  105. // grid-row: 1;
  106. }
  107. // Plusieurs images
  108. .field__items:has(.field__item:nth-child(2)) {
  109. grid-template-columns: repeat(3, 1fr);
  110. // grid-template-rows: 4fr 2fr 2fr;
  111. }
  112. .field__items:has(.field__item:nth-child(2)) .field__item:first-child {
  113. grid-column: 1 / 4;
  114. // grid-row: 1;
  115. }
  116. // facultatif : max 7 images affichées
  117. .field__items .field__item:nth-child(n + 8) {
  118. display: none;
  119. }
  120. }
  121. // }
  122. .field--name-title {
  123. order: 2;
  124. font-family: "Marianne";
  125. font-size: 1rem;
  126. font-weight: 800;
  127. color: $blue-light;
  128. a {
  129. color: $blue-light;
  130. }
  131. }
  132. .field--name-field-equipe {
  133. order: 3;
  134. color: $blue-dark;
  135. font-size: 0.9rem;
  136. font-weight: 900;
  137. text-transform: uppercase;
  138. .field__label {
  139. display: none;
  140. }
  141. }
  142. .field--name-field-incube {
  143. order: 4;
  144. font-size: 8pt;
  145. display: inline-flex;
  146. width: fit-content;
  147. background-color: $red;
  148. color: white;
  149. font-weight: 800;
  150. padding-right: 0.3rem;
  151. padding-left: 0.2rem;
  152. margin-bottom: 1rem;
  153. // margin-top: 1rem;
  154. // flex-direction: row;
  155. &::before {
  156. content: ' Projet ';
  157. padding-right: 0.5rem;
  158. }
  159. .field__label{
  160. display: inline;
  161. }
  162. .field__item {
  163. display: none;
  164. }
  165. }
  166. .field--name-field-neuf-rehabilitation,
  167. .field--name-field-encours-fini {
  168. display: none;
  169. }
  170. .field--name-field-region {
  171. display: flex;
  172. align-items: center;
  173. gap: 0.5rem;
  174. &::before {
  175. content: "";
  176. display: block;
  177. width: 20px;
  178. height: 20px;
  179. background: url("../images/pictos/picto_lieu.svg") no-repeat center;
  180. background-size: contain;
  181. }
  182. }
  183. .field--name-field-type-de-moa {
  184. order: 6;
  185. }
  186. .field--name-field-type-de-projet {
  187. order: 7;
  188. }
  189. .field--name-field-etape-du-projet {
  190. order: 8;
  191. }
  192. .field--name-field-textes {
  193. order: 9;
  194. .field__label {
  195. display: none;
  196. }
  197. .field--name-field-titre {
  198. color: $blue-dark;
  199. font-size: 1.2rem;
  200. font-weight: 900;
  201. text-transform: uppercase;
  202. margin-bottom: 0 !important;
  203. flex-direction: row;
  204. &::after {
  205. content: ' :';
  206. padding-left: 0.5rem;
  207. }
  208. }
  209. }
  210. .field--name-field-etape-du-projet,
  211. .field--name-field-type-de-projet,
  212. .field--name-field-type-de-moa {
  213. a {
  214. color: black;
  215. }
  216. .field__label {
  217. color: $blue-dark;
  218. font-size: 0.9pt;
  219. font-weight: 900;
  220. text-transform: uppercase;
  221. margin-bottom: 0 !important;
  222. flex-direction: row;
  223. &::after {
  224. content: ':';
  225. padding-left: 0.5rem;
  226. }
  227. }
  228. }
  229. @media print {
  230. .path-projets-complets {
  231. .layout-content {
  232. width: 100% !important;
  233. margin: 0 auto !important;
  234. }
  235. .projet-content {
  236. display: block !important;
  237. }
  238. .field--name-field-photo {
  239. .field__items {
  240. display: block !important;
  241. height: auto !important;
  242. }
  243. .field__item {
  244. display: block !important;
  245. aspect-ratio: auto !important;
  246. overflow: visible !important;
  247. margin-bottom: 4mm;
  248. }
  249. .field__item img {
  250. width: 100% !important;
  251. height: auto !important;
  252. object-fit: contain !important;
  253. display: block;
  254. }
  255. blockquote{
  256. }
  257. }
  258. }
  259. }
  260. }
  261. .projet-body-print{
  262. padding-top: 3rem ;
  263. }
  264. .paragraph{
  265. break-inside: avoid;
  266. page-break-inside: avoid;
  267. }
  268. }
  269. }
  270. }
  271. .path-projets-complets .views-row {
  272. page-break-before: always;
  273. break-before: page;
  274. }
  275. .path-projets-complets .views-row:first-child {
  276. page-break-before: auto;
  277. break-before: auto;
  278. }
  279. .path-projets-complets .projet-header-print {
  280. page-break-after: always;
  281. break-after: page;
  282. }
  283. }