-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1135 lines (994 loc) · 45.7 KB
/
index.html
File metadata and controls
1135 lines (994 loc) · 45.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="format-detection" content="telephone=no">
<!-- SEO Meta Tags -->
<title>RaspberryScripts - Scripts Raspberry Pi | Documentation Technique Complète</title>
<meta name="description" content="Collection complète de scripts Bash pour Raspberry Pi. Documentation technique en français et anglais. Scripts de supervision, installation et configuration pour Linux.">
<meta name="keywords" content="raspberry pi, scripts bash, linux, shell script, documentation technique, supervision, installation, configuration, raspberry pi scripts, bash automation, linux administration">
<meta name="author" content="ThePhoenixAgency">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1">
<meta name="googlebot" content="index, follow">
<meta name="language" content="French, English">
<meta name="revisit-after" content="7 days">
<link rel="canonical" href="https://ThePhoenixAgency.github.io/RaspberryScripts/">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://ThePhoenixAgency.github.io/RaspberryScripts/">
<meta property="og:title" content="RaspberryScripts - Scripts Raspberry Pi | Documentation Technique">
<meta property="og:description" content="Collection complète de scripts Bash pour Raspberry Pi. Documentation technique en français et anglais.">
<meta property="og:image" content="https://ThePhoenixAgency.github.io/RaspberryScripts/assets/logo.jpeg">
<meta property="og:locale" content="fr_FR">
<meta property="og:locale:alternate" content="en_US">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://ThePhoenixAgency.github.io/RaspberryScripts/">
<meta name="twitter:title" content="RaspberryScripts - Scripts Raspberry Pi">
<meta name="twitter:description" content="Collection complete de scripts Bash pour Raspberry Pi. Documentation technique.">
<meta name="twitter:image" content="https://ThePhoenixAgency.github.io/RaspberryScripts/assets/logo.jpeg">
<!-- Structured Data (JSON-LD) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "RaspberryScripts",
"url": "https://ThePhoenixAgency.github.io/RaspberryScripts/",
"description": "Collection complète de scripts Bash pour Raspberry Pi",
"publisher": {
"@type": "Organization",
"name": "PhoenixProject",
"url": "https://ThePhoenixAgency.github.io"
},
"inLanguage": ["fr", "en"],
"potentialAction": {
"@type": "SearchAction",
"target": "https://ThePhoenixAgency.github.io/RaspberryScripts/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<!-- Security Headers -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https://thephoenixagency.github.io https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self';">
<meta http-equiv="X-Content-Type-Options" content="nosniff">
<meta http-equiv="X-Frame-Options" content="DENY">
<meta http-equiv="X-XSS-Protection" content="1; mode=block">
<meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin">
<meta http-equiv="Permissions-Policy" content="geolocation=(), microphone=(), camera=()">
<!-- Favicon -->
<link rel="icon" type="image/jpeg" href="assets/logo.jpeg">
<link rel="apple-touch-icon" href="assets/logo.jpeg">
<!-- Sitemap -->
<link rel="sitemap" type="application/xml" href="sitemap.xml">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #000000;
--bg-secondary: #1a1a1a;
--bg-card: #1d1d1f;
--bg-card-hover: #252528;
--text-primary: #f5f5f7;
--text-secondary: #a1a1a6;
--text-tertiary: #6e6e73;
--accent: #007aff;
--accent-hover: #0051d5;
--border: rgba(255, 255, 255, 0.1);
--border-hover: rgba(255, 255, 255, 0.2);
--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
--shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
--gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
font-size: 17px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100vh;
overflow-x: hidden;
}
/* Animated background */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--gradient);
opacity: 0.05;
z-index: -1;
animation: gradientShift 20s ease infinite;
}
@keyframes gradientShift {
0%, 100% { transform: scale(1) rotate(0deg); }
50% { transform: scale(1.1) rotate(5deg); }
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
/* Premium Header */
header {
position: sticky;
top: 0;
z-index: 1000;
padding: 1.25rem 0;
backdrop-filter: saturate(180%) blur(40px);
-webkit-backdrop-filter: saturate(180%) blur(40px);
background: rgba(0, 0, 0, 0.8);
border-bottom: 1px solid var(--border);
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
}
.logo-section {
display: flex;
align-items: center;
gap: 1.25rem;
}
.logo {
width: 64px;
height: 64px;
border-radius: 16px;
object-fit: cover;
box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo:hover {
transform: scale(1.05) rotate(2deg);
box-shadow: 0 12px 32px rgba(0, 122, 255, 0.4);
}
.logo-text h1 {
font-size: 1.875rem;
font-weight: 700;
letter-spacing: -0.5px;
color: var(--text-primary);
margin: 0;
background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.logo-text p {
font-size: 0.9375rem;
color: var(--text-secondary);
margin: 0.25rem 0 0 0;
font-weight: 400;
}
.icon {
width: 20px;
height: 20px;
display: inline-block;
vertical-align: middle;
}
.icon svg {
width: 100%;
height: 100%;
fill: currentColor;
}
/* Premium Language Selector */
.language-selector {
display: flex;
gap: 0.5rem;
background: rgba(255, 255, 255, 0.05);
padding: 0.375rem;
border-radius: 12px;
backdrop-filter: blur(20px);
border: 1px solid var(--border);
}
.lang-btn {
background: transparent;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 10px;
cursor: pointer;
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-secondary);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
gap: 0.625rem;
position: relative;
}
.lang-btn:hover {
background: rgba(255, 255, 255, 0.1);
color: var(--text-primary);
transform: translateY(-1px);
}
.lang-btn.active {
background: var(--accent);
color: white;
box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}
.lang-btn.active:hover {
background: var(--accent-hover);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
}
/* Premium Content Card */
main {
padding: 4rem 0;
}
.content {
background: var(--bg-card);
backdrop-filter: saturate(180%) blur(40px);
-webkit-backdrop-filter: saturate(180%) blur(40px);
border-radius: 24px;
padding: 4rem;
box-shadow: var(--shadow);
border: 1px solid var(--border);
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.content:hover {
box-shadow: var(--shadow-hover);
border-color: var(--border-hover);
transform: translateY(-2px);
}
.content h1 {
font-size: 3rem;
font-weight: 800;
letter-spacing: -1.5px;
color: var(--text-primary);
margin-bottom: 1.5rem;
line-height: 1.1;
background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.content h2 {
font-size: 2.25rem;
font-weight: 700;
letter-spacing: -1px;
color: var(--accent);
margin-top: 3rem;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 2px solid var(--border);
}
.content h3 {
font-size: 1.75rem;
font-weight: 600;
letter-spacing: -0.5px;
color: var(--text-primary);
margin-top: 2.5rem;
margin-bottom: 1.25rem;
}
.content p {
margin-bottom: 1.5rem;
color: var(--text-secondary);
line-height: 1.8;
font-size: 1.0625rem;
}
.content ul, .content ol {
margin-left: 2rem;
margin-bottom: 1.5rem;
}
.content li {
margin-bottom: 1rem;
color: var(--text-secondary);
line-height: 1.8;
}
.content pre {
background: rgba(0, 0, 0, 0.6);
color: #f5f5f7;
padding: 2rem;
border-radius: 16px;
overflow-x: auto;
margin: 2.5rem 0;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
font-size: 0.9375rem;
line-height: 1.7;
box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
border: 1px solid var(--border);
}
.content code {
background: rgba(0, 122, 255, 0.15);
padding: 0.375rem 0.75rem;
border-radius: 8px;
font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
font-size: 0.9375rem;
color: #64d2ff;
font-weight: 500;
border: 1px solid rgba(0, 122, 255, 0.2);
}
.content pre code {
background: transparent;
padding: 0;
color: inherit;
border: none;
}
.content a {
color: var(--accent);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: all 0.2s;
font-weight: 500;
}
.content a:hover {
border-bottom-color: var(--accent);
color: #64d2ff;
}
.content blockquote {
border-left: 4px solid var(--accent);
padding-left: 2rem;
margin: 2.5rem 0;
color: var(--text-secondary);
font-style: italic;
background: rgba(0, 122, 255, 0.05);
padding: 1.5rem 2rem;
border-radius: 12px;
}
.content table {
width: 100%;
border-collapse: collapse;
margin: 2.5rem 0;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.content table th,
.content table td {
padding: 1.25rem;
border: 1px solid var(--border);
text-align: left;
}
.content table th {
background: rgba(0, 122, 255, 0.1);
font-weight: 600;
color: var(--text-primary);
}
.loading {
text-align: center;
padding: 5rem;
color: var(--text-secondary);
}
.loading-spinner {
display: inline-block;
width: 56px;
height: 56px;
border: 4px solid rgba(0, 122, 255, 0.2);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Premium Footer */
footer {
background: rgba(0, 0, 0, 0.6);
backdrop-filter: saturate(180%) blur(40px);
-webkit-backdrop-filter: saturate(180%) blur(40px);
border-top: 1px solid var(--border);
padding: 3rem 0;
margin-top: 5rem;
text-align: center;
}
.footer-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}
.footer-links {
display: flex;
gap: 2rem;
flex-wrap: wrap;
justify-content: center;
}
.footer-link {
color: var(--text-secondary);
text-decoration: none;
font-size: 0.9375rem;
display: flex;
align-items: center;
gap: 0.625rem;
transition: all 0.3s;
padding: 0.75rem 1.5rem;
border-radius: 12px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.05);
}
.footer-link:hover {
color: var(--accent);
background: rgba(0, 122, 255, 0.1);
border-color: var(--accent);
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}
.footer-copyright {
color: var(--text-tertiary);
font-size: 0.875rem;
}
/* Premium Cookie Banner */
.cookie-banner {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: rgba(29, 29, 31, 0.95);
backdrop-filter: saturate(180%) blur(40px);
-webkit-backdrop-filter: saturate(180%) blur(40px);
border-top: 1px solid var(--border);
padding: 2rem;
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
z-index: 2000;
transform: translateY(100%);
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.show {
transform: translateY(0);
}
.cookie-banner-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
flex-wrap: wrap;
}
.cookie-banner-text {
flex: 1;
min-width: 250px;
}
.cookie-banner-text p {
margin: 0;
font-size: 0.9375rem;
color: var(--text-secondary);
line-height: 1.7;
}
.cookie-banner-text a {
color: var(--accent);
text-decoration: underline;
}
.cookie-banner-actions {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.cookie-btn {
padding: 0.875rem 2rem;
border-radius: 12px;
font-size: 0.9375rem;
font-weight: 600;
cursor: pointer;
border: none;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
}
.cookie-btn-accept {
background: var(--accent);
color: white;
}
.cookie-btn-accept:hover {
background: var(--accent-hover);
transform: translateY(-2px);
box-shadow: 0 6px 24px rgba(0, 122, 255, 0.4);
}
.cookie-btn-reject {
background: rgba(255, 255, 255, 0.1);
color: var(--text-primary);
border: 1px solid var(--border);
}
.cookie-btn-reject:hover {
background: rgba(255, 255, 255, 0.15);
border-color: var(--border-hover);
}
@media (max-width: 768px) {
.container {
padding: 0 1.5rem;
}
.header-content {
flex-direction: column;
align-items: flex-start;
}
.content {
padding: 2.5rem 1.5rem;
}
.content h1 {
font-size: 2.25rem;
}
.content h2 {
font-size: 1.875rem;
}
.cookie-banner-content {
flex-direction: column;
align-items: stretch;
}
.cookie-banner-actions {
width: 100%;
}
.cookie-btn {
flex: 1;
}
}
</style>
</head>
<body>
<header>
<div class="container">
<div class="header-content">
<div class="logo-section">
<img src="assets/logo.jpeg" alt="RaspberryScripts Logo" class="logo" width="64" height="64" loading="eager">
<div class="logo-text">
<h1>RaspberryScripts</h1>
<p>Scripts Raspberry Pi - Documentation Technique</p>
</div>
</div>
<nav class="language-selector" aria-label="Sélection de langue">
<button class="lang-btn active" id="btn-fr" onclick="loadDoc('fr')" aria-label="Changer en français">
<span class="icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect width="8" height="8" x="0" y="0" fill="#002654"/>
<rect width="8" height="8" x="8" y="0" fill="#ffffff"/>
<rect width="8" height="8" x="16" y="0" fill="#002654"/>
<rect width="8" height="8" x="0" y="8" fill="#002654"/>
<rect width="8" height="8" x="8" y="8" fill="#ffffff"/>
<rect width="8" height="8" x="16" y="8" fill="#002654"/>
<rect width="8" height="8" x="0" y="16" fill="#002654"/>
<rect width="8" height="8" x="8" y="16" fill="#ffffff"/>
<rect width="8" height="8" x="16" y="16" fill="#002654"/>
</svg>
</span>
Français
</button>
<button class="lang-btn" id="btn-en" onclick="loadDoc('en')" aria-label="Switch to English">
<span class="icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect width="24" height="3" y="0" fill="#012169"/>
<rect width="24" height="2" y="3" fill="#ffffff"/>
<rect width="24" height="3" y="5" fill="#C8102E"/>
<rect width="24" height="2" y="8" fill="#ffffff"/>
<rect width="24" height="3" y="10" fill="#012169"/>
<rect width="24" height="2" y="13" fill="#ffffff"/>
<rect width="24" height="3" y="15" fill="#C8102E"/>
<rect width="24" height="2" y="18" fill="#ffffff"/>
<rect width="24" height="3" y="20" fill="#012169"/>
<rect width="8" height="12" x="0" y="6" fill="#012169"/>
<rect width="7" height="2" x="0" y="11" fill="#ffffff"/>
</svg>
</span>
English
</button>
</nav>
</div>
</div>
</header>
<main>
<div class="container">
<article class="content" id="content" role="main">
<div class="loading">
<div class="loading-spinner" aria-label="Chargement"></div>
<p>Chargement de la documentation...</p>
</div>
</article>
</div>
</main>
<footer>
<div class="container">
<div class="footer-content">
<nav class="footer-links" aria-label="Liens du footer">
<a href="https://thephoenixagency.github.io/RaspberryScripts" class="footer-link" rel="noopener noreferrer" target="_blank">
<span class="icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
</span>
GitHub
</a>
<a href="sitemap.xml" class="footer-link">
<span class="icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/>
</svg>
</span>
Sitemap
</a>
</nav>
<p class="footer-copyright">© 2026 ThePhoenixAgency - RaspberryScripts. Tous droits réservés.</p>
</div>
</div>
</footer>
<!-- Cookie Banner RGPD -->
<div id="cookieBanner" class="cookie-banner" role="dialog" aria-labelledby="cookieBannerTitle" aria-live="polite">
<div class="cookie-banner-content">
<div class="cookie-banner-text">
<p id="cookieBannerTitle"><strong>Gestion des cookies</strong> - Ce site utilise des cookies techniques nécessaires au fonctionnement du site. Aucun cookie de suivi ou publicitaire n'est utilisé. En continuant à naviguer, vous acceptez l'utilisation de ces cookies essentiels.</p>
</div>
<div class="cookie-banner-actions">
<button class="cookie-btn cookie-btn-accept" id="cookieAccept" aria-label="Accepter les cookies">Accepter</button>
<button class="cookie-btn cookie-btn-reject" id="cookieReject" aria-label="Refuser les cookies">Refuser</button>
</div>
</div>
</div>
<script>
'use strict';
// Markdown Parser intégré amélioré
function parseMarkdown(markdown) {
if (!markdown) return '';
let html = markdown;
// Code blocks first (to avoid conflicts)
html = html.replace(/```(\w+)?\n([\s\S]*?)```/g, function(match, lang, code) {
return '<pre><code>' + escapeHtml(code.trim()) + '</code></pre>';
});
// Headers
html = html.replace(/^#### (.*$)/gim, '<h4>$1</h4>');
html = html.replace(/^### (.*$)/gim, '<h3>$1</h3>');
html = html.replace(/^## (.*$)/gim, '<h2>$1</h2>');
html = html.replace(/^# (.*$)/gim, '<h1>$1</h1>');
// Bold and Italic
html = html.replace(/\*\*\*(.*?)\*\*\*/g, '<strong><em>$1</em></strong>');
html = html.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
html = html.replace(/__(.*?)__/g, '<strong>$1</strong>');
html = html.replace(/\*(.*?)\*/g, '<em>$1</em>');
html = html.replace(/_(.*?)_/g, '<em>$1</em>');
// Inline code (after code blocks)
html = html.replace(/`([^`\n]+)`/g, '<code>$1</code>');
// Links
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" rel="noopener noreferrer">$1</a>');
// Images
html = html.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '<img src="$2" alt="$1" loading="lazy">');
// Horizontal rules
html = html.replace(/^---$/gim, '<hr>');
html = html.replace(/^\*\*\*$/gim, '<hr>');
// Lists - unordered
html = html.replace(/^[\*\-\+] (.+)$/gm, '<li>$1</li>');
// Wrap consecutive list items
html = html.replace(/(<li>.*<\/li>\n?)+/g, function(match) {
return '<ul>' + match + '</ul>';
});
// Lists - ordered
html = html.replace(/^\d+\. (.+)$/gm, '<li>$1</li>');
// Wrap consecutive ordered list items (simple approach)
const orderedListPattern = /(<li>\d+\. .*<\/li>\n?)+/g;
// Blockquotes
html = html.replace(/^> (.+)$/gm, '<blockquote>$1</blockquote>');
// Paragraphs - split by double newlines
const paragraphs = html.split(/\n\n+/);
html = paragraphs.map(para => {
para = para.trim();
if (!para) return '';
if (para.match(/^<[h|u|o|l|b|p|d|t|s]/)) return para;
return '<p>' + para + '</p>';
}).join('\n\n');
return html;
}
function escapeHtml(text) {
const div = document.createElement('div');
div.textContent = text;
return div.innerHTML;
}
// Configuration
const CONFIG = {
baseUrl: 'https://thephoenixagency.github.io/RaspberryScripts',
docsPath: '/docs/Supervision',
readmePath: '/Readme.md',
errorPage: '404.html?error=true',
useRawGitHub: false
};
let currentLang = 'fr';
// Cookie Management RGPD
const CookieManager = {
COOKIE_NAME: 'cookie_consent',
COOKIE_EXPIRY: 365,
getConsent: function() {
const cookies = document.cookie.split(';');
for (let cookie of cookies) {
const [name, value] = cookie.trim().split('=');
if (name === this.COOKIE_NAME) {
return value;
}
}
return null;
},
setConsent: function(value) {
const date = new Date();
date.setTime(date.getTime() + (this.COOKIE_EXPIRY * 24 * 60 * 60 * 1000));
const expires = 'expires=' + date.toUTCString();
document.cookie = this.COOKIE_NAME + '=' + value + ';' + expires + ';path=/;SameSite=Strict;Secure';
},
showBanner: function() {
const banner = document.getElementById('cookieBanner');
if (banner) {
banner.classList.add('show');
}
},
hideBanner: function() {
const banner = document.getElementById('cookieBanner');
if (banner) {
banner.classList.remove('show');
}
},
init: function() {
const consent = this.getConsent();
if (!consent) {
setTimeout(() => this.showBanner(), 500);
}
const acceptBtn = document.getElementById('cookieAccept');
const rejectBtn = document.getElementById('cookieReject');
if (acceptBtn) {
acceptBtn.addEventListener('click', () => {
this.setConsent('accepted');
this.hideBanner();
});
}
if (rejectBtn) {
rejectBtn.addEventListener('click', () => {
this.setConsent('rejected');
this.hideBanner();
});
}
}
};
// Update language buttons
function updateLanguageButtons(lang) {
const btnFr = document.getElementById('btn-fr');
const btnEn = document.getElementById('btn-en');
if (btnFr) btnFr.classList.toggle('active', lang === 'fr');
if (btnEn) btnEn.classList.toggle('active', lang === 'en');
}
// Load documentation with proper error handling
async function loadDoc(lang) {
currentLang = lang;
const contentDiv = document.getElementById('content');
if (!contentDiv) {
console.error('Content div not found');
return;
}
// Show loading state
contentDiv.innerHTML = '<div class="loading"><div class="loading-spinner" aria-label="Chargement"></div><p>Chargement de la documentation...</p></div>';
// Update active button
updateLanguageButtons(lang);
try {
// Try multiple sources: docs first, then README as fallback
let urls = [
`${CONFIG.baseUrl}${CONFIG.docsPath}.${lang}.md`,
``https://raw.githubusercontent.com/ThePhoenixAgency/RaspberryScripts/main/docs/Supervision.${lang}.md`,
`${CONFIG.baseUrl}${CONFIG.readmePath}`,
`https://raw.githubusercontent.com/ThePhoenixAgency/RaspberryScripts/main/Readme.md`
];
let markdown = null;
let lastError = null;
// Try each URL until one works
for (let url of urls) {
try {
console.log('Trying:', url);
const response = await fetch(url, {
method: 'GET',
mode: 'cors',
credentials: 'omit',
redirect: 'follow',
referrerPolicy: 'strict-origin-when-cross-origin'
});
if (response.ok) {
markdown = await response.text();
if (markdown && markdown.trim().length > 0) {
console.log('Successfully loaded from:', url);
break;
}
} else {
lastError = `HTTP ${response.status}: ${response.statusText}`;
}
} catch (err) {
lastError = err.message;
continue;
}
}
// If all URLs failed, show error
if (!markdown || markdown.trim().length === 0) {
console.error('All URLs failed. Last error:', lastError);
contentDiv.innerHTML = '<div class="loading"><p style="color: var(--accent);">Documentation non trouvée. Redirection...</p></div>';
setTimeout(() => {
window.location.href = CONFIG.errorPage;
}, 2000);
return;
}
// Parse and display markdown
const html = parseMarkdown(markdown);
if (html && html.trim().length > 0) {
contentDiv.innerHTML = html;
console.log('Content loaded and displayed successfully');
return;
} else {
// Show raw markdown if parsing failed
contentDiv.innerHTML = '<pre>' + escapeHtml(markdown) + '</pre>';
return;
}
// Only redirect on actual HTTP errors (404, 500, etc.)
if (!response.ok) {
console.error(`HTTP Error: ${response.status} ${response.statusText}`);
// Try fallback to raw GitHub if GitHub Pages fails
if (response.status === 404 && !CONFIG.useRawGitHub) {
console.log('Trying fallback to raw GitHub...');
const fallbackUrl = `https://raw.githubusercontent.com/ThePhoenixAgency/RaspberryScripts/main/docs/Supervision.${lang}.md`;
const fallbackResponse = await fetch(fallbackUrl, {
method: 'GET',
mode: 'cors',
credentials: 'omit',
redirect: 'follow',
referrerPolicy: 'strict-origin-when-cross-origin'
});
if (fallbackResponse.ok) {
const markdown = await fallbackResponse.text();
if (markdown && markdown.trim().length > 0) {
const html = parseMarkdown(markdown);
if (html && html.trim().length > 0) {
contentDiv.innerHTML = html;
console.log('Content loaded from fallback URL');
return;
}
}
}
}
// Only redirect for client/server errors after trying fallback
if (response.status >= 400) {
// Show error message first, then redirect after delay
contentDiv.innerHTML = '<div class="loading"><p style="color: var(--accent);">Documentation non trouvée. Redirection...</p></div>';
setTimeout(() => {
window.location.href = CONFIG.errorPage;
}, 2000);
return;
}
}
// Use different variable name to avoid redeclaration
const markdownText = await response.text();
console.log('Markdown loaded, length:', markdownText.length);
// Validate content - only redirect if truly empty
if (!markdownText || markdownText.trim().length === 0) {
console.error('Empty content received');
window.location.href = CONFIG.errorPage;
return;
}
// Parse markdown
const html = parseMarkdown(markdown);
console.log('Markdown parsed, HTML length:', html.length);
// Only redirect if parsing completely failed AND we have content
if (!html || html.trim().length === 0) {
if (markdown.trim().length > 0) {
// Show raw markdown if parsing failed but content exists
console.warn('Parsing failed, showing raw markdown');
contentDiv.innerHTML = '<pre>' + escapeHtml(markdown) + '</pre>';
return;
} else {
console.error('Both markdown and HTML are empty');
window.location.href = CONFIG.errorPage;
return;
}
}
// Success - set content
contentDiv.innerHTML = html;