Changes for page Public Web Site
Last modified by Agnease on 2026/05/30 16:24
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.StyleSheetExtension[0]
-
- code
-
... ... @@ -590,6 +590,31 @@ 590 590 } 591 591 } 592 592 593 +.resource-content { 594 + order: 1; 595 +} 596 + 597 +.resource-sidebar { 598 + order: 2; 599 +} 600 + 601 +@media (max-width: 767px) { 602 + .resource-layout { 603 + display: flex; 604 + flex-direction: column; 605 + } 606 + 607 + .resource-sidebar { 608 + order: 0; 609 + position: static; 610 + width: 100%; 611 + } 612 + 613 + .resource-content { 614 + order: 1; 615 + } 616 +} 617 + 593 593 /* ========== Homepage Resource Strip ========== */ 594 594 595 595 .homepage-resource-strip { ... ... @@ -819,18 +819,15 @@ 819 819 } 820 820 821 821 .resource-layout { 822 - display: block; 847 + display: grid; 848 + grid-template-columns: minmax(0, 760px) 280px; 849 + gap: 42px; 823 823 max-width: 1080px; 824 824 margin: 0 auto; 825 825 padding-top: 28px; 853 + align-items: start; 826 826 } 827 827 828 -.resource-layout::after { 829 - content: ""; 830 - display: block; 831 - clear: both; 832 -} 833 - 834 834 .resource-content { 835 835 color: @text; 836 836 font-size: 16px; ... ... @@ -900,10 +900,6 @@ 900 900 } 901 901 902 902 .resource-sidebar { 903 - float: right; 904 - width: 280px; 905 - margin-left: 42px; 906 - margin-bottom: 28px; 907 907 position: sticky; 908 908 top: 96px; 909 909 border: 1px solid @line; ... ... @@ -950,14 +950,11 @@ 950 950 951 951 @media (max-width: 900px) { 952 952 .resource-layout { 971 + grid-template-columns: 1fr; 953 953 padding-top: 22px; 954 954 } 955 955 956 956 .resource-sidebar { 957 - float: none; 958 - width: 100%; 959 - margin-left: 0; 960 - margin-bottom: 24px; 961 961 position: static; 962 962 } 963 963 } ... ... @@ -1221,25 +1221,41 @@ 1221 1221 } 1222 1222 1223 1223 /* ========== Resources Index ========== */ 1224 - 1225 1225 .resources-index-page { 1226 1226 background: #fff; 1227 1227 1228 - .services-grid { 1242 + /* Resources index: show cards in rows of 2, center the last one if alone */ 1243 + .resources-grid { 1244 + display: grid; 1229 1229 grid-template-columns: repeat(2, minmax(0, 1fr)); 1246 + justify-content: center; 1247 + align-items: stretch; 1230 1230 } 1231 -} 1232 1232 1233 -@media (max-width: 980px) { 1234 - .resources-index-page { 1235 - .services-grid { 1236 - grid-template-columns: 1fr; 1237 - } 1250 + .resources-grid .resource-card { 1251 + height: 100%; 1238 1238 } 1253 + 1254 + .resources-grid .resource-card:last-child:nth-child(odd) { 1255 + grid-column: 1 / -1; 1256 + max-width: calc(50% - 12px); 1257 + justify-self: center; 1258 + } 1239 1239 } 1240 1240 1261 +/* Keep 2 columns on tablets. Only switch to 1 column on smaller mobile screens. */ 1241 1241 @media (max-width: 767px) { 1242 1242 .resources-index-page { 1243 1243 padding: @section-padding-mobile; 1265 + 1266 + .resources-grid { 1267 + grid-template-columns: 1fr; 1268 + } 1269 + 1270 + .resources-grid .resource-card:last-child:nth-child(odd) { 1271 + grid-column: auto; 1272 + max-width: none; 1273 + justify-self: stretch; 1274 + } 1244 1244 } 1245 1245 }