0 Votes

Changes for page Home

Last modified by Alex Cotiugă on 2026/01/13 13:12

From version 7.149
edited by Alex Cotiugă
on 2025/11/17 11:42
Change comment: There is no comment for this version
To version 7.137
edited by Alex Cotiugă
on 2025/11/17 09:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -116,7 +116,7 @@
116 116   #set ($classes = "service")
117 117   ## If this is the last item AND the total number is odd, center it
118 118   #if ($foreach.count == $servicesSize && ($servicesSize % 2) == 1)
119 - #set ($classes = "service service-center")
119 + #set ($classes = "service service--center")
120 120   #end
121 121  
122 122   <article class="$classes">
XWiki.StyleSheetExtension[0]
Code
... ... @@ -35,11 +35,8 @@
35 35  
36 36   .lead {
37 37   color: @muted;
38 - text-align: center;
38 + max-width: 72ch;
39 39   }
40 - h2 {
41 - text-align: center;
42 - }
43 43  
44 44   section {
45 45   padding: 32px 0;
... ... @@ -102,6 +102,7 @@
102 102   display: flex;
103 103   flex-direction: column;
104 104   align-items: center;
102 + gap: 1rem;
105 105   }
106 106  
107 107   .hero-cta {
... ... @@ -189,15 +189,10 @@
189 189   display: flex;
190 190   flex-wrap: wrap;
191 191   gap: 24px;
192 -
193 - /* center the whole block under the heading */
194 - max-width: 960px;
195 - margin-left: auto;
196 - margin-right: auto;
197 - justify-content: center;
198 198   }
199 199  
200 200   .service {
193 + /* 2 items per row: 50% minus half the gap so row fits in 100% */
201 201   flex: 0 1 calc(50% - 12px);
202 202   display: flex;
203 203   align-items: flex-start;
... ... @@ -224,11 +224,13 @@
224 224   font-size: 1.125rem;
225 225   font-weight: 800;
226 226   }
220 +
227 227   p {
228 228   margin: 0 0 6px;
229 229   color: @text;
230 230   line-height: 1.5;
231 231   }
226 +
232 232   ul {
233 233   margin: .45rem 0 0;
234 234   padding-left: 1.1rem;
... ... @@ -235,6 +235,7 @@
235 235   color: @muted;
236 236   font-size: 13px;
237 237   }
233 +
238 238   li {
239 239   margin: .25rem 0;
240 240   line-height: 1.45;
... ... @@ -242,12 +242,9 @@
242 242   }
243 243   }
244 244  
245 - /* ==== 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 */
246 246   .service-center {
247 - /* same width as siblings */
248 - flex: 0 1 calc(55% - 12px);
249 -
250 - /* push to center */
251 251   margin-left: auto;
252 252   margin-right: auto;
253 253   }
... ... @@ -256,12 +256,11 @@
256 256   @media (max-width: 767px) {
257 257   .services-grid {
258 258   gap: 16px;
259 - max-width: 100%;
260 260   }
261 -
262 - .service,
263 - .service-center {
253 + .service {
264 264   flex: 0 1 100%;
255 + }
256 + .service-center {
265 265   margin-left: 0;
266 266   margin-right: 0;
267 267   }