Last modified by Isaac Mejia on 2026/06/08 19:59

From version 5.1
edited by Isaac Mejia
on 2026/06/08 19:59
Change comment: There is no comment for this version
To version 4.1
edited by Isaac Mejia
on 2026/05/27 15:35
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -eFit Financial Knowledge Base
1 +Home
Content
... ... @@ -4,65 +4,71 @@
4 4  ## eFit Financial Knowledge Base
5 5  ## ---------------------------------------------
6 6  
7 -#set ($allowedCategories = [
8 - "Member_Management",
9 - "Payment_Management",
10 - "Club_Administration",
11 - "Member_Portal",
12 - "Activity_Scheduler",
13 - "Check_In"
14 -])
7 +## 1) Find all top-level spaces in the efit wiki
8 +#set ($xwql =
9 + "select doc.fullName, doc.title, doc.name, doc.space " +
10 + "from XWikiDocument doc " +
11 + "where doc.name = 'WebHome' " +
12 + "and doc.space <> 'Main' " +
13 + "and doc.space <> 'XWiki' " +
14 + "and doc.space <> 'xwiki' " +
15 + "and doc.hidden <> true " +
16 + "order by lower(doc.space)"
17 +)##
18 +#set ($query = $services.query.xwql($xwql))##
19 +#set ($rows = $query.execute())##
15 15  
21 +## 2) Icon map
16 16  #set ($kbCategoryIcons = {
17 - "Member_Management": "👥",
18 - "Payment_Management": "💳",
19 - "Club_Administration": "⚙️",
20 - "Member_Portal": "🌐",
21 - "Activity_Scheduler": "📅",
22 - "Check_In": "✅"
23 -})
23 + "User_Guides": "📘",
24 + "Announcements": "📣",
25 + "Technical_Knowledge_Base": "⚙️"
26 +})##
24 24  
28 +## 3) Descriptions
29 +#set ($kbCategoryDescriptions = {
30 + "User_Guides": "Step-by-step guides for using Club Advantage.",
31 + "Announcements": "Feature releases and platform updates.",
32 + "Technical_Knowledge_Base": "Technical guides and troubleshooting."
33 +})##
34 +
35 +## 4) Display names
25 25  #set ($kbCategoryLabels = {
26 - "Member_Management": "Member Management",
27 - "Payment_Management": "Payment Management",
28 - "Club_Administration": "Club Administration",
29 - "Member_Portal": "Member Portal",
30 - "Activity_Scheduler": "Activity Scheduler",
31 - "Check_In": "Check-In"
32 -})
37 + "User_Guides": "User Guides",
38 + "Announcements": "Announcements",
39 + "Technical_Knowledge_Base": "Technical Knowledge Base"
40 +})##
33 33  
34 -#set ($kbCategoryDescriptions = {
35 - "Member_Management": "Add, manage, and maintain member accounts.",
36 - "Payment_Management": "Payments, invoices, point of sale, and billing.",
37 - "Club_Administration": "Club settings, contracts, and configuration.",
38 - "Member_Portal": "Member portal, access control, and Brivo.",
39 - "Activity_Scheduler": "Scheduling activities, sessions, and packages.",
40 - "Check_In": "Front counter check-in, FCCS, and time keeper."
41 -})
42 +## 5) Allowlist
43 +#set ($allowedSpaces = ["User_Guides", "Announcements", "Technical_Knowledge_Base"])##
42 42  
43 -#set ($kbCategories = [])
45 +## 6) Build category objects
46 +#set ($kbCategories = [])##
44 44  
45 -#foreach ($space in $allowedCategories)
46 - #set ($label = $kbCategoryLabels.get($space))
47 - #set ($desc = $kbCategoryDescriptions.get($space))
48 - #set ($icon = $kbCategoryIcons.get($space))
48 +#foreach ($space in $allowedSpaces)##
49 + #set ($label = $kbCategoryLabels.get($space))##
50 + #set ($desc = $kbCategoryDescriptions.get($space))##
51 + #set ($icon = $kbCategoryIcons.get($space))##
49 49  
50 - #set ($articleCount = 0)
53 + ## Count non-hidden, non-WebHome pages in this space and subspaces
54 + #set ($articleCount = 0)##
51 51   #set ($countXwql =
52 52   "select count(doc.fullName) " +
53 53   "from XWikiDocument doc " +
54 - "where doc.space = :space " +
58 + "where (doc.space = :space or doc.space like :spacePrefix) " +
55 55   "and doc.name <> 'WebHome' " +
56 56   "and doc.hidden <> true"
57 - )
58 - #set ($countQuery = $services.query.xwql($countXwql))
59 - #set ($discard = $countQuery.bindValue("space", "Main." + $space))
60 - #set ($resultList = $countQuery.execute())
61 - #if ($resultList && $resultList.size() > 0)
62 - #set ($articleCount = $resultList.get(0))
63 - #end
61 + )##
62 + #set ($countQuery = $services.query.xwql($countXwql))##
63 + #set ($discard = $countQuery.bindValue("space", $space))##
64 + #set ($discard = $countQuery.bindValue("spacePrefix", $space + ".%"))##
65 + #set ($resultList = $countQuery.execute())##
66 + #if ($resultList && $resultList.size() > 0)##
67 + #set ($articleCount = $resultList.get(0))##
68 + #end##
64 64  
65 - #set ($cleanUrl = "/Main/" + $space)
70 + ## Build clean URL
71 + #set ($cleanUrl = "/" + $space + "/")##
66 66  
67 67   #set ($entry = {
68 68   "label": $label,
... ... @@ -70,13 +70,14 @@
70 70   "icon": $icon,
71 71   "url": $cleanUrl,
72 72   "count": $articleCount
73 - })
74 - #set ($discard = $kbCategories.add($entry))
75 -#end
79 + })##
80 + #set ($discard = $kbCategories.add($entry))##
81 +#end##
76 76  
77 77  {{html clean="false"}}
78 78  <div class="kb-home">
79 79  
86 + <!-- HERO -->
80 80   <div class="kb-hero">
81 81   <h1 class="kb-hero-title">eFit Financial Knowledge Base</h1>
82 82   <p class="kb-hero-subtitle">
... ... @@ -84,6 +84,7 @@
84 84   </p>
85 85   </div>
86 86  
94 + <!-- CATEGORY GRID -->
87 87   <div class="kb-section">
88 88   <h2 class="kb-section-title">Browse by category</h2>
89 89  
... ... @@ -120,8 +120,97 @@
120 120   </div>
121 121  
122 122  </div>
131 +
132 +<style>
133 +body.viewbody.page-WebHome #xwikicontent .kb-hero {
134 + padding: 4.2rem 1rem 3.3rem !important;
135 + max-width: 1100px;
136 + margin: 0 auto;
137 + text-align: center;
138 +}
139 +
140 +body.viewbody.page-WebHome #xwikicontent .kb-hero-title {
141 + font-size: 3.5rem !important;
142 + font-weight: 800 !important;
143 + line-height: 1.15;
144 + margin-bottom: 1rem !important;
145 + color: #0f172a;
146 +}
147 +
148 +body.viewbody.page-WebHome #xwikicontent .kb-hero-subtitle {
149 + font-size: 1.35rem !important;
150 + line-height: 1.7;
151 + color: #4b5563 !important;
152 + max-width: 720px;
153 + margin: 0 auto 2.3rem !important;
154 +}
155 +
156 +body.viewbody.page-WebHome #xwikicontent .kb-section {
157 + margin-top: 4.6rem !important;
158 +}
159 +
160 +body.viewbody.page-WebHome #xwikicontent .kb-section-title {
161 + text-align: center;
162 + font-size: 1.5rem;
163 + font-weight: 700;
164 + margin-bottom: 2rem;
165 + color: #0f172a;
166 +}
167 +
168 +body.viewbody.page-WebHome #xwikicontent .kb-category-grid {
169 + display: grid;
170 + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
171 + gap: 1.5rem;
172 + max-width: 1100px;
173 + margin: 0 auto;
174 + padding: 0 1rem;
175 +}
176 +
177 +body.viewbody.page-WebHome #xwikicontent .kb-card {
178 + display: flex;
179 + flex-direction: column;
180 + justify-content: space-between;
181 + padding: 1.5rem;
182 + border: 1px solid #e5e7eb;
183 + border-radius: 12px;
184 + text-decoration: none;
185 + color: inherit;
186 + background: #fff;
187 + box-shadow: 0 1px 3px rgba(0,0,0,0.06);
188 + transition: box-shadow 0.2s, transform 0.2s;
189 +}
190 +
191 +body.viewbody.page-WebHome #xwikicontent .kb-card:hover {
192 + box-shadow: 0 8px 24px rgba(0,0,0,0.1);
193 + transform: translateY(-2px);
194 +}
195 +
196 +body.viewbody.page-WebHome #xwikicontent .kb-card-title {
197 + font-size: 1.1rem;
198 + font-weight: 700;
199 + color: #2563eb;
200 + margin-bottom: 0.5rem;
201 +}
202 +
203 +body.viewbody.page-WebHome #xwikicontent .kb-card-icon {
204 + margin-right: 0.4rem;
205 +}
206 +
207 +body.viewbody.page-WebHome #xwikicontent .kb-card-body {
208 + font-size: 0.95rem;
209 + color: #6b7280;
210 + line-height: 1.5;
211 +}
212 +
213 +body.viewbody.page-WebHome #xwikicontent .kb-card-meta {
214 + margin-top: 1rem;
215 + font-size: 0.85rem;
216 + color: #9ca3af;
217 + text-transform: uppercase;
218 + letter-spacing: 0.05em;
219 +}
220 +</style>
221 +
123 123  {{/html}}
124 124  {{/velocity}}
125 -
126 126  {{include reference="KBSupportCTA.WebHome"/}}
127 -