File tree Expand file tree Collapse file tree 3 files changed +66
-56
lines changed
src/webviews/apps/welcome Expand file tree Collapse file tree 3 files changed +66
-56
lines changed Original file line number Diff line number Diff line change 1+ import { css , html , LitElement } from 'lit' ;
2+ import { customElement } from 'lit/decorators.js' ;
3+ import '../../shared/components/button' ;
4+ import '../../shared/components/code-icon' ;
5+
6+ declare global {
7+ interface HTMLElementTagNameMap {
8+ 'gl-feature-card' : GlFeatureCard ;
9+ }
10+ }
11+
12+ @customElement ( 'gl-feature-card' )
13+ export class GlFeatureCard extends LitElement {
14+ static override styles = [
15+ css `
16+ :host {
17+ display: flex;
18+ gap: 1em;
19+ }
20+
21+ .image {
22+ width: 50%;
23+ }
24+
25+ .content {
26+ margin-top: 0.5em;
27+ flex: 1;
28+ display: flex;
29+ flex-direction: column;
30+ gap: 0.5em;
31+ }
32+
33+ @media (max-width: 640px) {
34+ :host {
35+ flex-direction: column;
36+ }
37+
38+ .image {
39+ width: 100%;
40+ }
41+
42+ .content {
43+ margin-top: 0;
44+ margin-left: 0.3em;
45+ margin-right: 0.3em;
46+ }
47+
48+ ::slotted(*) {
49+ width: 100%;
50+ }
51+ }
52+ ` ,
53+ ] ;
54+
55+ override render ( ) : unknown {
56+ return html `
57+ < div class ="image ">
58+ < slot name ="image "> </ slot >
59+ </ div >
60+ < div class ="content ">
61+ < slot > </ slot >
62+ </ div >
63+ ` ;
64+ }
65+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import '../../shared/components/code-icon';
66declare global {
77 interface HTMLElementTagNameMap {
88 'gl-feature-carousel' : GlFeatureCarousel ;
9- 'gl-feature-card' : GlFeatureCard ;
109 }
1110}
1211
@@ -117,58 +116,3 @@ export class GlFeatureCarousel extends LitElement {
117116 ` ;
118117 }
119118}
120-
121- @customElement ( 'gl-feature-card' )
122- export class GlFeatureCard extends LitElement {
123- static override styles = [
124- css `
125- :host {
126- display: flex;
127- gap: 1em;
128- }
129-
130- .image {
131- width: 50%;
132- }
133-
134- .content {
135- margin-top: 0.5em;
136- flex: 1;
137- display: flex;
138- flex-direction: column;
139- gap: 0.5em;
140- }
141-
142- @media (max-width: 640px) {
143- :host {
144- flex-direction: column;
145- }
146-
147- .image {
148- width: 100%;
149- }
150-
151- .content {
152- margin-top: 0;
153- margin-left: 0.3em;
154- margin-right: 0.3em;
155- }
156-
157- ::slotted(*) {
158- width: 100%;
159- }
160- }
161- ` ,
162- ] ;
163-
164- override render ( ) : unknown {
165- return html `
166- < div class ="image ">
167- < slot name ="image "> </ slot >
168- </ div >
169- < div class ="content ">
170- < slot > </ slot >
171- </ div >
172- ` ;
173- }
174- }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { WelcomeStateProvider } from './stateProvider';
1111import '../shared/components/gitlens-logo' ;
1212import { welcomeStyles } from './welcome.css' ;
1313import './components/feature-carousel' ;
14+ import './components/feature-card' ;
1415
1516@customElement ( 'gl-welcome-app' )
1617export class GlWelcomeApp extends GlAppHost < State > {
You can’t perform that action at this time.
0 commit comments