1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
6
+ < title > Unofficial Documentation for Flouci API</ title >
7
+ < meta name ="description " content ="Comprehensive unofficial documentation for Flouci API - Learn how to integrate payments, manage transactions, and implement Flouci in your applications. " />
8
+ < meta name ="keywords " content ="Flouci, API Documentation, Payment Integration, Tunisia Payment Gateway " />
9
+ < meta name ="author " content ="MCzen Technologies " />
10
+
11
+ <!-- Favicon -->
12
+ < link rel ="icon " type ="image/png " href ="https://mczen-technologies.com/favicon.ico " />
13
+
14
+ <!-- Open Graph / Facebook -->
15
+ < meta property ="og:type " content ="website " />
16
+ < meta property ="og:url " content ="https://mczen-technologies.github.io/flouci-api/ " />
17
+ < meta property ="og:title " content ="Unofficial Documentation for Flouci API " />
18
+ < meta property ="og:description " content ="Comprehensive unofficial documentation for Flouci API - Learn how to integrate payments and manage transactions. " />
19
+ < meta property ="og:image " content ="https://mczen-technologies.com/assets/img/mczen-technologies.jpg " />
20
+
21
+ <!-- Twitter -->
22
+ < meta property ="twitter:card " content ="summary_large_image " />
23
+ < meta property ="twitter:site " content ="@mczen_tech " />
24
+
25
+ <!-- Preload -->
26
+ < link rel ="preconnect " href ="https://cdn.jsdelivr.net " />
27
+ < link rel ="dns-prefetch " href ="https://cdn.jsdelivr.net " />
28
+
29
+ < style >
30
+ : root {
31
+ --primary-color : # 6B46C1 ;
32
+ --text-color : # 2D3748 ;
33
+ --bg-color : # F7FAFC ;
34
+ }
35
+
36
+ * {
37
+ margin : 0 ;
38
+ padding : 0 ;
39
+ box-sizing : border-box;
40
+ }
41
+
42
+ body {
43
+ font-family : system-ui, -apple-system, sans-serif;
44
+ background-color : var (--bg-color );
45
+ color : var (--text-color );
46
+ line-height : 1.5 ;
47
+ }
48
+
49
+ # loading {
50
+ position : fixed;
51
+ top : 0 ;
52
+ left : 0 ;
53
+ right : 0 ;
54
+ bottom : 0 ;
55
+ background : rgba (255 , 255 , 255 , 0.9 );
56
+ display : flex;
57
+ flex-direction : column;
58
+ align-items : center;
59
+ justify-content : center;
60
+ z-index : 1000 ;
61
+ }
62
+
63
+ .spinner {
64
+ width : 50px ;
65
+ height : 50px ;
66
+ border : 5px solid # f3f3f3 ;
67
+ border-top : 5px solid var (--primary-color );
68
+ border-radius : 50% ;
69
+ animation : spin 1s linear infinite;
70
+ }
71
+
72
+ @keyframes spin {
73
+ 0% { transform : rotate (0deg ); }
74
+ 100% { transform : rotate (360deg ); }
75
+ }
76
+
77
+ # error {
78
+ display : none;
79
+ position : fixed;
80
+ top : 20px ;
81
+ right : 20px ;
82
+ padding : 1rem ;
83
+ background : # FED7D7 ;
84
+ border-left : 4px solid # C53030 ;
85
+ border-radius : 4px ;
86
+ color : # C53030 ;
87
+ z-index : 1000 ;
88
+ }
89
+
90
+ .header {
91
+ background : white;
92
+ padding : 1rem ;
93
+ box-shadow : 0 1px 3px rgba (0 , 0 , 0 , 0.1 );
94
+ position : sticky;
95
+ top : 0 ;
96
+ z-index : 100 ;
97
+ }
98
+
99
+ .header-content {
100
+ max-width : 1200px ;
101
+ margin : 0 auto;
102
+ display : flex;
103
+ justify-content : space-between;
104
+ align-items : center;
105
+ }
106
+
107
+ .logo {
108
+ font-size : 1.25rem ;
109
+ font-weight : bold;
110
+ color : var (--primary-color );
111
+ }
112
+
113
+ .version {
114
+ font-size : 0.875rem ;
115
+ color : # 718096 ;
116
+ }
117
+ </ style >
118
+ </ head >
119
+ < body >
120
+ < div id ="loading ">
121
+ < div class ="spinner "> </ div >
122
+ < p style ="margin-top: 1rem "> Loading documentation...</ p >
123
+ </ div >
124
+
125
+ < div id ="error ">
126
+ Failed to load API documentation. Please try refreshing the page.
127
+ </ div >
128
+
129
+ < header class ="header ">
130
+ < div class ="header-content ">
131
+ < div class ="logo "> Flouci API Docs</ div >
132
+ < div class ="version "> Unofficial Documentation</ div >
133
+ </ div >
134
+ </ header >
135
+
136
+ < script id ="api-reference " data-url ="https://cdn.jsdelivr.net/gh/mczen-technologies/flouci-api@main/spec.json "> </ script >
137
+
138
+ < script >
139
+ // Configuration for API Reference
140
+ const configuration = {
141
+ theme : 'purple' ,
142
+ hideExport : false ,
143
+ hideInternal : true ,
144
+ downloadFileName : 'Flouci-api-spec' ,
145
+ scrollYOffset : 60 ,
146
+ expandResponses : "200,201" ,
147
+ showExtensions : false ,
148
+ noAutoAuth : false ,
149
+ pathInMiddlePanel : false ,
150
+ requiredPropsFirst : true ,
151
+ } ;
152
+
153
+ // Initialize API Reference
154
+ const apiReference = document . getElementById ( 'api-reference' ) ;
155
+ apiReference . dataset . configuration = JSON . stringify ( configuration ) ;
156
+
157
+ // Loading state management
158
+ const loading = document . getElementById ( 'loading' ) ;
159
+ const error = document . getElementById ( 'error' ) ;
160
+
161
+ // Function to handle loading error
162
+ function handleLoadError ( ) {
163
+ loading . style . display = 'none' ;
164
+ error . style . display = 'block' ;
165
+ console . error ( 'Failed to load API documentation' ) ;
166
+ }
167
+
168
+ // Function to handle successful load
169
+ function handleLoadSuccess ( ) {
170
+ loading . style . display = 'none' ;
171
+ }
172
+
173
+ // Load API Reference script
174
+ const script = document . createElement ( 'script' ) ;
175
+ script . src = 'https://cdn.jsdelivr.net/npm/@scalar/api-reference' ;
176
+ script . onload = handleLoadSuccess ;
177
+ script . onerror = handleLoadError ;
178
+ document . body . appendChild ( script ) ;
179
+
180
+ // Add timeout for loading
181
+ setTimeout ( ( ) => {
182
+ if ( loading . style . display !== 'none' ) {
183
+ handleLoadError ( ) ;
184
+ }
185
+ } , 10000 ) ;
186
+
187
+ // Service Worker Registration for offline support
188
+ if ( 'serviceWorker' in navigator ) {
189
+ window . addEventListener ( 'load' , ( ) => {
190
+ navigator . serviceWorker . register ( '/sw.js' ) . catch ( err => {
191
+ console . log ( 'ServiceWorker registration failed: ' , err ) ;
192
+ } ) ;
193
+ } ) ;
194
+ }
195
+
196
+ // Analytics (if needed)
197
+ if ( typeof window !== 'undefined' && window . location . hostname !== 'localhost' ) {
198
+ // Add your analytics code here
199
+ }
200
+ </ script >
201
+ </ body >
202
+ </ html >
0 commit comments