File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { consume } from '@lit/context' ;
2
2
import { css , html } from 'lit' ;
3
- import { customElement , state } from 'lit/decorators.js' ;
3
+ import { customElement , property , state } from 'lit/decorators.js' ;
4
4
import { when } from 'lit/directives/when.js' ;
5
5
import type { State } from '../../../home/protocol' ;
6
6
import { GlElement } from '../../shared/components/element' ;
@@ -38,6 +38,11 @@ export class GlRepoAlerts extends GlElement {
38
38
` ,
39
39
] ;
40
40
41
+ @property ( { type : Boolean , reflect : true , attribute : 'has-alerts' } )
42
+ get hasAlerts ( ) {
43
+ return this . alertVisibility . header ;
44
+ }
45
+
41
46
@consume < State > ( { context : stateContext , subscribe : true } )
42
47
@state ( )
43
48
private _state ! : State ;
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ export const homeStyles = css`
57
57
}
58
58
.home__nav {
59
59
flex : none;
60
- padding : 0 ;
61
- margin-block : 0.6rem -1rem ;
62
60
}
63
61
.home__footer {
64
62
flex : none;
@@ -67,6 +65,10 @@ export const homeStyles = css`
67
65
gl-home-account-content {
68
66
margin-bottom : 0 ;
69
67
}
68
+
69
+ gl-repo-alerts : not ([has-alerts ]) {
70
+ display : none;
71
+ }
70
72
` ;
71
73
72
74
export const inlineNavStyles = css `
@@ -128,6 +130,9 @@ export const inlineNavStyles = css`
128
130
color : var (--color-foreground--50 );
129
131
margin-bottom : 0.2rem ;
130
132
}
133
+ .promo-banner : not ([has-promo ]) {
134
+ display : none;
135
+ }
131
136
` ;
132
137
133
138
export const buttonStyles = css `
Original file line number Diff line number Diff line change @@ -52,16 +52,15 @@ export class GlHomeApp extends GlApp<State> {
52
52
override render ( ) {
53
53
return html `
54
54
< div class ="home scrollable ">
55
+ < gl-home-nav class ="home__nav "> </ gl-home-nav >
55
56
< gl-repo-alerts class ="home__header "> </ gl-repo-alerts >
56
57
< main class ="home__main scrollable " id ="main ">
57
58
< gl-onboarding > </ gl-onboarding >
58
59
< gl-feature-nav .badgeSource =${ this . badgeSource } > </ gl-feature-nav >
59
60
</ main >
60
61
61
62
< footer class ="home__footer ">
62
- < gl-home-account-content id ="account-content ">
63
- < gl-home-nav class ="home__nav "> </ gl-home-nav >
64
- </ gl-home-account-content >
63
+ < gl-home-account-content id ="account-content "> </ gl-home-account-content >
65
64
</ footer >
66
65
</ div >
67
66
` ;
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ export class GlPromo extends LitElement {
52
52
@property ( { reflect : true , type : String } )
53
53
type : 'link' | 'info' = 'info' ;
54
54
55
+ @property ( { reflect : true , type : Boolean , attribute : 'has-promo' } )
56
+ get hasPromo ( ) {
57
+ return this . promo != null ;
58
+ }
59
+
55
60
override render ( ) {
56
61
if ( ! this . promo ) return ;
57
62
You can’t perform that action at this time.
0 commit comments