x3v commited on
Commit
e7097c7
·
verified ·
1 Parent(s): 42be06e

MAKE IT MORE MODERN TECH INSPIRED

Browse files
Files changed (4) hide show
  1. components/game.js +45 -11
  2. components/navbar.js +22 -10
  3. index.html +6 -6
  4. style.css +33 -3
components/game.js CHANGED
@@ -7,47 +7,81 @@ class SnakeGame extends HTMLElement {
7
  width: 400px;
8
  height: 400px;
9
  margin: 0 auto;
10
- background-color: #f0fdf4;
11
- border: 2px solid #059669;
 
 
12
  position: relative;
13
  overflow: hidden;
14
  }
 
 
 
 
 
 
 
 
 
 
 
 
15
  .snake-body {
16
  position: absolute;
17
  width: 20px;
18
  height: 20px;
19
- background-color: #10b981;
20
  border-radius: 4px;
 
 
21
  }
22
  .food {
23
  position: absolute;
24
- width: 20px;
25
- height: 20px;
26
- background-color: #ef4444;
27
  border-radius: 50%;
 
 
 
28
  }
29
- .controls {
 
 
 
 
30
  display: flex;
31
  justify-content: center;
32
  gap: 1rem;
33
  margin-top: 1rem;
34
  }
35
  button {
36
- padding: 0.5rem 1rem;
37
- background-color: #10b981;
38
  color: white;
39
  border: none;
40
  border-radius: 0.5rem;
41
  cursor: pointer;
 
 
 
 
 
 
 
42
  }
43
  .score {
44
  text-align: center;
45
  margin-top: 1rem;
46
  font-size: 1.2rem;
47
- color: #059669;
 
 
 
48
  font-weight: bold;
 
49
  }
50
- </style>
51
  <div class="game-container" id="game-board"></div>
52
  <div class="score">Score: <span id="score">0</span></div>
53
  <div class="controls">
 
7
  width: 400px;
8
  height: 400px;
9
  margin: 0 auto;
10
+ background-color: rgba(15, 23, 42, 0.8);
11
+ border: 2px solid rgba(99, 102, 241, 0.5);
12
+ border-radius: 0.75rem;
13
+ box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
14
  position: relative;
15
  overflow: hidden;
16
  }
17
+ .game-container::before {
18
+ content: "";
19
+ position: absolute;
20
+ inset: 0;
21
+ background-image:
22
+ linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
23
+ linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
24
+ background-size: 20px 20px;
25
+ }
26
+ position: relative;
27
+ overflow: hidden;
28
+ }
29
  .snake-body {
30
  position: absolute;
31
  width: 20px;
32
  height: 20px;
33
+ background: linear-gradient(135deg, #6366f1, #8b5cf6);
34
  border-radius: 4px;
35
+ box-shadow: 0 0 5px rgba(139, 92, 246, 0.7);
36
+ z-index: 2;
37
  }
38
  .food {
39
  position: absolute;
40
+ width: 16px;
41
+ height: 16px;
42
+ background: linear-gradient(135deg, #f43f5e, #f97316);
43
  border-radius: 50%;
44
+ box-shadow: 0 0 10px rgba(244, 63, 94, 0.7);
45
+ z-index: 2;
46
+ animation: pulse 1s infinite alternate;
47
  }
48
+ @keyframes pulse {
49
+ from { transform: scale(1); }
50
+ to { transform: scale(1.2); }
51
+ }
52
+ .controls {
53
  display: flex;
54
  justify-content: center;
55
  gap: 1rem;
56
  margin-top: 1rem;
57
  }
58
  button {
59
+ padding: 0.5rem 1.5rem;
60
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
61
  color: white;
62
  border: none;
63
  border-radius: 0.5rem;
64
  cursor: pointer;
65
+ font-weight: 600;
66
+ transition: all 0.3s;
67
+ box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
68
+ }
69
+ button:hover {
70
+ transform: translateY(-2px);
71
+ box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
72
  }
73
  .score {
74
  text-align: center;
75
  margin-top: 1rem;
76
  font-size: 1.2rem;
77
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
78
+ -webkit-background-clip: text;
79
+ background-clip: text;
80
+ color: transparent;
81
  font-weight: bold;
82
+ letter-spacing: 0.05em;
83
  }
84
+ </style>
85
  <div class="game-container" id="game-board"></div>
86
  <div class="score">Score: <span id="score">0</span></div>
87
  <div class="controls">
components/navbar.js CHANGED
@@ -4,10 +4,11 @@ class CustomNavbar extends HTMLElement {
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
- background: rgba(255, 255, 255, 0.8);
8
- backdrop-filter: blur(10px);
9
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
10
- position: fixed;
 
11
  width: 100%;
12
  top: 0;
13
  z-index: 50;
@@ -23,24 +24,35 @@ class CustomNavbar extends HTMLElement {
23
  .logo {
24
  font-weight: 700;
25
  font-size: 1.5rem;
26
- color: #6366f1;
 
 
 
27
  text-decoration: none;
 
28
  }
29
- .nav-links {
30
  display: flex;
31
  gap: 1.5rem;
32
  align-items: center;
33
  }
34
  .nav-link {
35
- color: #4b5563;
36
  font-weight: 500;
37
- transition: color 0.3s;
38
  text-decoration: none;
 
 
39
  }
40
  .nav-link:hover {
41
- color: #6366f1;
 
42
  }
43
- .mobile-menu-btn {
 
 
 
 
44
  display: none;
45
  background: none;
46
  border: none;
 
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
+ background: rgba(0, 0, 0, 0.7);
8
+ backdrop-filter: blur(16px);
9
+ box-shadow: 0 4px 30px rgba(99, 102, 241, 0.3);
10
+ border-bottom: 1px solid rgba(99, 102, 241, 0.2);
11
+ position: fixed;
12
  width: 100%;
13
  top: 0;
14
  z-index: 50;
 
24
  .logo {
25
  font-weight: 700;
26
  font-size: 1.5rem;
27
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
28
+ -webkit-background-clip: text;
29
+ background-clip: text;
30
+ color: transparent;
31
  text-decoration: none;
32
+ letter-spacing: 0.05em;
33
  }
34
+ .nav-links {
35
  display: flex;
36
  gap: 1.5rem;
37
  align-items: center;
38
  }
39
  .nav-link {
40
+ color: #e5e7eb;
41
  font-weight: 500;
42
+ transition: all 0.3s;
43
  text-decoration: none;
44
+ padding: 0.5rem 1rem;
45
+ border-radius: 0.5rem;
46
  }
47
  .nav-link:hover {
48
+ color: white;
49
+ background: rgba(99, 102, 241, 0.2);
50
  }
51
+ .active-link {
52
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
53
+ color: white;
54
+ }
55
+ .mobile-menu-btn {
56
  display: none;
57
  background: none;
58
  border: none;
index.html CHANGED
@@ -4,8 +4,8 @@
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Trisha | Designer & Developer</title>
8
- <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <script>
@@ -13,15 +13,15 @@
13
  theme: {
14
  extend: {
15
  colors: {
16
- primary: '#10b981',
17
- secondary: '#059669',
18
  }
19
  }
20
  }
21
  }
22
- </script>
23
  </head>
24
- <body class="bg-gray-50 text-gray-800 font-sans antialiased">
25
  <head>
26
  <meta charset="UTF-8">
27
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Rajeev Mishra | AI/ML Engineer</title>
8
+ <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <script>
 
13
  theme: {
14
  extend: {
15
  colors: {
16
+ primary: '#6366f1',
17
+ secondary: '#8b5cf6',
18
  }
19
  }
20
  }
21
  }
22
+ </script>
23
  </head>
24
+ <body class="bg-gray-900 text-gray-100 font-sans antialiased">
25
  <head>
26
  <meta charset="UTF-8">
27
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
style.css CHANGED
@@ -12,11 +12,19 @@ html {
12
  }
13
  /* Custom gradient text */
14
  .text-gradient {
15
- background: linear-gradient(to right, #10b981, #059669);
16
  -webkit-background-clip: text;
17
  background-clip: text;
18
  -webkit-text-fill-color: transparent;
19
  }
 
 
 
 
 
 
 
 
20
  /* Animation for section entries */
21
  @keyframes fadeInUp {
22
  from {
@@ -43,12 +51,34 @@ html {
43
  background: #f1f1f1;
44
  }
45
  ::-webkit-scrollbar-thumb {
46
- background: #10b981;
47
  border-radius: 10px;
48
  }
49
 
50
  ::-webkit-scrollbar-thumb:hover {
51
- background: #059669;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
  /* Hero section */
54
  .hero-image {
 
12
  }
13
  /* Custom gradient text */
14
  .text-gradient {
15
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
16
  -webkit-background-clip: text;
17
  background-clip: text;
18
  -webkit-text-fill-color: transparent;
19
  }
20
+
21
+ /* Glassmorphism effect */
22
+ .glass-card {
23
+ background: rgba(30, 41, 59, 0.7);
24
+ backdrop-filter: blur(16px);
25
+ border: 1px solid rgba(99, 102, 241, 0.2);
26
+ box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.2);
27
+ }
28
  /* Animation for section entries */
29
  @keyframes fadeInUp {
30
  from {
 
51
  background: #f1f1f1;
52
  }
53
  ::-webkit-scrollbar-thumb {
54
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
55
  border-radius: 10px;
56
  }
57
 
58
  ::-webkit-scrollbar-thumb:hover {
59
+ background: #8b5cf6;
60
+ }
61
+
62
+ /* Glowing hover effect */
63
+ .hover-glow:hover {
64
+ box-shadow: 0 0 15px rgba(139, 92, 246, 0.7);
65
+ transition: box-shadow 0.3s ease;
66
+ }
67
+
68
+ /* Tech grid pattern */
69
+ .tech-bg::before {
70
+ content: "";
71
+ position: absolute;
72
+ top: 0;
73
+ left: 0;
74
+ right: 0;
75
+ bottom: 0;
76
+ background-image:
77
+ linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
78
+ linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
79
+ background-size: 30px 30px;
80
+ opacity: 0.3;
81
+ z-index: -1;
82
  }
83
  /* Hero section */
84
  .hero-image {