Changes for page Home
Last modified by Alex Cotiugă on 2026/01/13 13:12
From version 7.150
edited by Alex Cotiugă
on 2025/11/17 11:43
on 2025/11/17 11:43
Change comment:
There is no comment for this version
To version 7.133
edited by Alex Cotiugă
on 2025/11/17 09:07
on 2025/11/17 09:07
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -109,17 +109,9 @@ 109 109 <p class="lead"> 110 110 All the XWiki services you need, delivered with precision and care 111 111 </p> 112 - 113 - #set ($servicesSize = $servicesSectionData.size()) 114 114 <div class="services-grid"> 115 115 #foreach ($entry in $servicesSectionData) 116 - #set ($classes = "service") 117 - ## If this is the last item AND the total number is odd, center it 118 - #if ($foreach.count == $servicesSize && ($servicesSize % 2) == 1) 119 - #set ($classes = "service service-center") 120 - #end 121 - 122 - <article class="$classes"> 114 + <article class="service"> 123 123 <div class="service-icon"> 124 124 <i class="fa fa-$entry.icon" aria-hidden="true"></i> 125 125 </div>
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -29,15 +29,14 @@ 29 29 30 30 .container { 31 31 max-width: @maxw; 32 + margin: 0 auto; 33 + padding: 0 16px; 32 32 } 33 33 34 34 .lead { 35 35 color: @muted; 36 - text-align: center;38 + max-width: 72ch; 37 37 } 38 - h2 { 39 - text-align: center; 40 - } 41 41 42 42 section { 43 43 padding: 32px 0; ... ... @@ -100,6 +100,7 @@ 100 100 display: flex; 101 101 flex-direction: column; 102 102 align-items: center; 102 + gap: 1rem; 103 103 } 104 104 105 105 .hero-cta { ... ... @@ -186,21 +186,16 @@ 186 186 margin-top: 20px; 187 187 display: flex; 188 188 flex-wrap: wrap; 189 - gap: 24px; 190 - 191 - /* center the whole block under the heading */ 192 - max-width: 960px; 193 - margin-left: auto; 194 - margin-right: auto; 195 - justify-content: center; 189 + gap: 24px; // space between items 196 196 } 197 197 198 198 .service { 193 + /* 2 items per row: 50% minus half the gap so row fits in 100% */ 199 199 flex: 0 1 calc(50% - 12px); 200 200 display: flex; 201 201 align-items: flex-start; 202 202 gap: 16px; 203 - margin-bottom: 8px; 198 + margin-bottom: 8px; // extra vertical breathing room 204 204 205 205 .service-icon { 206 206 width: 42px; ... ... @@ -222,11 +222,13 @@ 222 222 font-size: 1.125rem; 223 223 font-weight: 800; 224 224 } 220 + 225 225 p { 226 226 margin: 0 0 6px; 227 227 color: @text; 228 228 line-height: 1.5; 229 229 } 226 + 230 230 ul { 231 231 margin: .45rem 0 0; 232 232 padding-left: 1.1rem; ... ... @@ -233,6 +233,7 @@ 233 233 color: @muted; 234 234 font-size: 13px; 235 235 } 233 + 236 236 li { 237 237 margin: .25rem 0; 238 238 line-height: 1.45; ... ... @@ -240,12 +240,9 @@ 240 240 } 241 241 } 242 242 243 - /* ==== Center last item on its own row while keeping 50% width ==== */ 241 + /* Center the last item when odd: 242 + auto margins in a flex row push it to the middle */ 244 244 .service-center { 245 - /* same width as siblings */ 246 - flex: 0 1 calc(55% - 12px); 247 - 248 - /* push to center */ 249 249 margin-left: auto; 250 250 margin-right: auto; 251 251 } ... ... @@ -254,12 +254,11 @@ 254 254 @media (max-width: 767px) { 255 255 .services-grid { 256 256 gap: 16px; 257 - max-width: 100%; 258 258 } 259 - 260 - .service, 261 - .service-center { 253 + .service { 262 262 flex: 0 1 100%; 255 + } 256 + .service--center { 263 263 margin-left: 0; 264 264 margin-right: 0; 265 265 }