Mrdips commited on
Commit
4d54963
·
verified ·
1 Parent(s): c8d5835

оптимизация

Browse files
components/api-connector.js CHANGED
@@ -1,3 +1,4 @@
 
1
  class ApiConnector extends HTMLElement {
2
  connectedCallback() {
3
  this.attachShadow({ mode: 'open' });
@@ -12,6 +13,10 @@ class ApiConnector extends HTMLElement {
12
  border-radius: 8px;
13
  padding: 1rem;
14
  background: #f9fafb;
 
 
 
 
15
  }
16
  .header {
17
  display: flex;
@@ -22,6 +27,7 @@ class ApiConnector extends HTMLElement {
22
  width: 24px;
23
  height: 24px;
24
  margin-right: 0.5rem;
 
25
  }
26
  h3 {
27
  margin: 0;
@@ -38,20 +44,31 @@ class ApiConnector extends HTMLElement {
38
  font-size: 0.875rem;
39
  border-radius: 4px;
40
  cursor: pointer;
 
41
  }
42
  .connect {
43
  background: #3b82f6;
44
  color: white;
45
  border: none;
46
  }
 
 
 
47
  .docs {
48
  background: white;
49
  border: 1px solid #e5e7eb;
50
  }
 
 
 
51
  </style>
52
  <div class="connector">
53
  <div class="header">
54
- <img src="http://static.photos/technology/200x200/${Math.floor(Math.random() * 100)}" class="icon">
 
 
 
 
55
  <h3><slot name="name">API Connector</slot></h3>
56
  </div>
57
  <div><slot name="description">Connect to external APIs</slot></div>
@@ -64,4 +81,4 @@ class ApiConnector extends HTMLElement {
64
  }
65
  }
66
 
67
- customElements.define('api-connector', ApiConnector);
 
1
+
2
  class ApiConnector extends HTMLElement {
3
  connectedCallback() {
4
  this.attachShadow({ mode: 'open' });
 
13
  border-radius: 8px;
14
  padding: 1rem;
15
  background: #f9fafb;
16
+ transition: box-shadow 0.2s;
17
+ }
18
+ .connector:hover {
19
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
20
  }
21
  .header {
22
  display: flex;
 
27
  width: 24px;
28
  height: 24px;
29
  margin-right: 0.5rem;
30
+ flex-shrink: 0;
31
  }
32
  h3 {
33
  margin: 0;
 
44
  font-size: 0.875rem;
45
  border-radius: 4px;
46
  cursor: pointer;
47
+ transition: all 0.15s;
48
  }
49
  .connect {
50
  background: #3b82f6;
51
  color: white;
52
  border: none;
53
  }
54
+ .connect:hover {
55
+ background: #2563eb;
56
+ }
57
  .docs {
58
  background: white;
59
  border: 1px solid #e5e7eb;
60
  }
61
+ .docs:hover {
62
+ background: #f3f4f6;
63
+ }
64
  </style>
65
  <div class="connector">
66
  <div class="header">
67
+ <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2">
68
+ <path d="M12 2L2 7l10 5 10-5-10-5z"/>
69
+ <path d="M2 17l10 5 10-5"/>
70
+ <path d="M2 12l10 5 10-5"/>
71
+ </svg>
72
  <h3><slot name="name">API Connector</slot></h3>
73
  </div>
74
  <div><slot name="description">Connect to external APIs</slot></div>
 
81
  }
82
  }
83
 
84
+ customElements.define('api-connector', ApiConnector);
components/ide-card.js CHANGED
@@ -1,3 +1,4 @@
 
1
  class IdeCard extends HTMLElement {
2
  connectedCallback() {
3
  this.attachShadow({ mode: 'open' });
@@ -16,7 +17,7 @@ class IdeCard extends HTMLElement {
16
  }
17
  .card:hover {
18
  transform: translateY(-2px);
19
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
20
  }
21
  .header {
22
  display: flex;
@@ -28,6 +29,7 @@ class IdeCard extends HTMLElement {
28
  height: 32px;
29
  margin-right: 0.5rem;
30
  border-radius: 4px;
 
31
  }
32
  h3 {
33
  margin: 0;
@@ -50,21 +52,32 @@ class IdeCard extends HTMLElement {
50
  border-radius: 4px;
51
  text-decoration: none;
52
  display: inline-block;
 
53
  }
54
  .primary {
55
  background: #3b82f6;
56
  color: white;
57
  border: none;
58
  }
 
 
 
59
  .secondary {
60
  background: white;
61
  border: 1px solid #e5e7eb;
62
  color: #4b5563;
63
  }
 
 
 
64
  </style>
65
  <div class="card">
66
  <div class="header">
67
- <img src="http://static.photos/technology/200x200/${Math.floor(Math.random() * 100)}" class="icon">
 
 
 
 
68
  <h3><slot name="name">IDE</slot></h3>
69
  </div>
70
  <div class="description"><slot name="description">Development environment</slot></div>
@@ -77,4 +90,4 @@ class IdeCard extends HTMLElement {
77
  }
78
  }
79
 
80
- customElements.define('ide-card', IdeCard);
 
1
+
2
  class IdeCard extends HTMLElement {
3
  connectedCallback() {
4
  this.attachShadow({ mode: 'open' });
 
17
  }
18
  .card:hover {
19
  transform: translateY(-2px);
20
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
21
  }
22
  .header {
23
  display: flex;
 
29
  height: 32px;
30
  margin-right: 0.5rem;
31
  border-radius: 4px;
32
+ flex-shrink: 0;
33
  }
34
  h3 {
35
  margin: 0;
 
52
  border-radius: 4px;
53
  text-decoration: none;
54
  display: inline-block;
55
+ transition: all 0.15s;
56
  }
57
  .primary {
58
  background: #3b82f6;
59
  color: white;
60
  border: none;
61
  }
62
+ .primary:hover {
63
+ background: #2563eb;
64
+ }
65
  .secondary {
66
  background: white;
67
  border: 1px solid #e5e7eb;
68
  color: #4b5563;
69
  }
70
+ .secondary:hover {
71
+ background: #f3f4f6;
72
+ }
73
  </style>
74
  <div class="card">
75
  <div class="header">
76
+ <svg class="icon" viewBox="0 0 32 32" fill="none">
77
+ <rect width="32" height="32" rx="4" fill="#1e293b"/>
78
+ <path d="M10 10l6 4v8l-6-4v-8z" fill="#3b82f6"/>
79
+ <path d="M16 14l6 4v8l-6-4v-8z" fill="#64748b"/>
80
+ </svg>
81
  <h3><slot name="name">IDE</slot></h3>
82
  </div>
83
  <div class="description"><slot name="description">Development environment</slot></div>
 
90
  }
91
  }
92
 
93
+ customElements.define('ide-card', IdeCard);