jilangdi commited on
Commit
710f15a
·
verified ·
1 Parent(s): dbd2934

完全复现UI设计

Browse files
Files changed (3) hide show
  1. index.html +3 -4
  2. script.js +16 -80
  3. style.css +0 -20
index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Googly Bear Search</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://unpkg.com/feather-icons"></script>
@@ -26,7 +26,7 @@
26
  <!-- Main Content -->
27
  <main class="flex-grow flex flex-col items-center justify-center -mt-20 px-4">
28
  <div class="mb-8">
29
- <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="Googly Bear" class="w-56 md:w-72">
30
  </div>
31
 
32
  <div class="w-full max-w-xl relative">
@@ -44,7 +44,7 @@
44
 
45
  <div class="flex justify-center mt-8 space-x-2">
46
  <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
47
- Bear Search
48
  </button>
49
  <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
50
  I'm Feeling Lucky
@@ -80,6 +80,5 @@
80
  <script>
81
  feather.replace();
82
  </script>
83
- <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
84
  </body>
85
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Google</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://unpkg.com/feather-icons"></script>
 
26
  <!-- Main Content -->
27
  <main class="flex-grow flex flex-col items-center justify-center -mt-20 px-4">
28
  <div class="mb-8">
29
+ <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="Google" class="w-56 md:w-72">
30
  </div>
31
 
32
  <div class="w-full max-w-xl relative">
 
44
 
45
  <div class="flex justify-center mt-8 space-x-2">
46
  <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
47
+ Google Search
48
  </button>
49
  <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
50
  I'm Feeling Lucky
 
80
  <script>
81
  feather.replace();
82
  </script>
 
83
  </body>
84
  </html>
script.js CHANGED
@@ -1,84 +1,20 @@
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.0">
6
- <title>Google</title>
7
- <link rel="stylesheet" href="style.css">
8
- <script src="https://cdn.tailwindcss.com"></script>
9
- <script src="https://unpkg.com/feather-icons"></script>
10
- <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
- <link rel="icon" href="https://www.google.com/favicon.ico">
12
- </head>
13
- <body class="bg-white min-h-screen flex flex-col">
14
- <!-- Header -->
15
- <header class="w-full flex justify-end p-4 space-x-4">
16
- <a href="#" class="text-sm text-gray-600 hover:underline">Gmail</a>
17
- <a href="#" class="text-sm text-gray-600 hover:underline">Images</a>
18
- <button class="p-2 rounded-full hover:bg-gray-100">
19
- <i data-feather="grid"></i>
20
- </button>
21
- <button class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600">
22
- Sign in
23
- </button>
24
- </header>
25
 
26
- <!-- Main Content -->
27
- <main class="flex-grow flex flex-col items-center justify-center -mt-20 px-4">
28
- <div class="mb-8">
29
- <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" alt="Google" class="w-56 md:w-72">
30
- </div>
 
 
 
31
 
32
- <div class="w-full max-w-xl relative">
33
- <div class="relative">
34
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
35
- <i data-feather="search" class="text-gray-400"></i>
36
- </div>
37
- <input type="text" class="w-full py-3 pl-10 pr-12 border border-gray-200 rounded-full hover:shadow-md focus:shadow-md focus:outline-none transition-shadow" autofocus>
38
- <div class="absolute inset-y-0 right-0 pr-3 flex items-center">
39
- <button class="p-1 text-gray-400 hover:text-gray-600">
40
- <i data-feather="mic"></i>
41
- </button>
42
- </div>
43
- </div>
44
-
45
- <div class="flex justify-center mt-8 space-x-2">
46
- <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
47
- Google Search
48
- </button>
49
- <button class="px-4 py-2 bg-gray-100 text-sm text-gray-800 rounded hover:shadow-sm hover:border hover:border-gray-200">
50
- I'm Feeling Lucky
51
- </button>
52
- </div>
53
- </div>
54
-
55
- <div class="mt-8 text-sm text-gray-600">
56
- <p>Google offered in: <a href="#" class="text-blue-600 hover:underline">Español (Latinoamérica)</a></p>
57
- </div>
58
- </main>
59
-
60
- <!-- Footer -->
61
- <footer class="bg-gray-100 w-full">
62
- <div class="px-8 py-3 border-b border-gray-300">
63
- <p class="text-sm text-gray-600">United States</p>
64
- </div>
65
- <div class="px-8 py-3 flex flex-col md:flex-row md:justify-between">
66
- <div class="flex space-x-6 mb-3 md:mb-0">
67
- <a href="#" class="text-sm text-gray-600 hover:underline">About</a>
68
- <a href="#" class="text-sm text-gray-600 hover:underline">Advertising</a>
69
- <a href="#" class="text-sm text-gray-600 hover:underline">Business</a>
70
- <a href="#" class="text-sm text-gray-600 hover:underline">How Search works</a>
71
- </div>
72
- <div class="flex space-x-6">
73
- <a href="#" class="text-sm text-gray-600 hover:underline">Privacy</a>
74
- <a href="#" class="text-sm text-gray-600 hover:underline">Terms</a>
75
- <a href="#" class="text-sm text-gray-600 hover:underline">Settings</a>
76
- </div>
77
- </div>
78
- </footer>
79
 
80
- <script>
 
81
  feather.replace();
82
- </script>
83
- </body>
84
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ // Google Search functionality would go here
3
+ document.addEventListener('DOMContentLoaded', function() {
4
+ // Search box focus effects
5
+ const searchInput = document.querySelector('input[type="text"]');
6
+ if (searchInput) {
7
+ searchInput.addEventListener('focus', function() {
8
+ this.style.boxShadow = '0 1px 6px rgba(32, 33, 36, 0.28)';
9
+ });
10
 
11
+ searchInput.addEventListener('blur', function() {
12
+ this.style.boxShadow = '';
13
+ });
14
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ // Initialize feather icons
17
+ if (window.feather) {
18
  feather.replace();
19
+ }
20
+ });
 
style.css CHANGED
@@ -30,23 +30,3 @@ button.bg-gray-100:hover {
30
  footer a {
31
  color: #70757a;
32
  }
33
- /* Logo with bear paw effect */
34
- img {
35
- height: 92px;
36
- width: auto;
37
- position: relative;
38
- }
39
-
40
- img::after {
41
- content: '';
42
- position: absolute;
43
- bottom: -10px;
44
- left: 50%;
45
- transform: translateX(-50%);
46
- width: 60px;
47
- height: 40px;
48
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 60"><path d="M50,0 C60,20 80,25 100,50 C80,50 60,40 50,30 C40,40 20,50 0,50 C20,25 40,20 50,0 Z" fill="%23FF9800"/></svg>');
49
- background-repeat: no-repeat;
50
- background-position: center;
51
- opacity: 0.8;
52
- }
 
30
  footer a {
31
  color: #70757a;
32
  }