PythonMindset commited on
Commit
0d87e65
·
1 Parent(s): b640b0e

Add mobile performance optimization: disable animations on mobile for smooth scrolling

Browse files
Files changed (2) hide show
  1. index.html +2 -2
  2. static/css/mobile-performance.css +32 -0
index.html CHANGED
@@ -12,7 +12,7 @@
12
  <meta charset="UTF-8">
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
  <title>Portfolio - Cheikh Niang | Data Scientist</title>
15
- <link rel="stylesheet" href="/static/css/style.css">
16
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
17
  </head>
18
  <body>
@@ -381,4 +381,4 @@
381
 
382
  <script src="/static/js/script.js"></script>
383
  </body>
384
- </html>
 
12
  <meta charset="UTF-8">
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
  <title>Portfolio - Cheikh Niang | Data Scientist</title>
15
+ <link rel="stylesheet" href="/static/css/style.css">`n <link rel="stylesheet" href="/static/css/mobile-performance.css">
16
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
17
  </head>
18
  <body>
 
381
 
382
  <script src="/static/js/script.js"></script>
383
  </body>
384
+ </html>
static/css/mobile-performance.css ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* DÉSACTIVATION TOTALE DES ANIMATIONS SUR MOBILE - Performance maximale */
2
+ @media (max-width: 768px) {
3
+ /* Supprimer TOUTES les animations et transitions */
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ animation: none !important;
8
+ transition: none !important;
9
+ }
10
+
11
+ /* Garder seulement la transition du menu */
12
+ .sidebar,
13
+ .menu-toggle {
14
+ transition: transform 0.3s ease !important;
15
+ }
16
+
17
+ /* Forcer tous les éléments animés à être visibles immédiatement */
18
+ .animate-on-scroll,
19
+ .animate-from-left,
20
+ .animate-from-right,
21
+ .animate-zoom {
22
+ opacity: 1 !important;
23
+ transform: none !important;
24
+ }
25
+
26
+ /* Activer le scroll natif optimisé */
27
+ body,
28
+ .main-content {
29
+ -webkit-overflow-scrolling: touch;
30
+ overflow-y: auto;
31
+ }
32
+ }