Skip to content

Commit 663d794

Browse files
kian23kptSplaktar
andauthoredMay 14, 2021
feat: add help/support section (#915)
- add links for additional help/support resources in homePage - add twitter, angular event and angular blog Fixes #133 Co-authored-by: Michael Prentice <splaktar@gmail.com>
1 parent 90f1562 commit 663d794

File tree

12 files changed

+163
-6
lines changed

12 files changed

+163
-6
lines changed
 

‎material.angular.io/src/_app-theme.scss

+8
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
color: mat.get-color-from-palette($primary, default-contrast);
4444
}
4545

46+
.docs-help-support {
47+
color: mat.get-color-from-palette($foreground, secondary-text);
48+
49+
a {
50+
color: mat.get-color-from-palette($foreground, text);
51+
}
52+
}
53+
4654
.is-next-version {
4755
background: mat.get-color-from-palette($next-theme, 900) !important;
4856
}

‎material.angular.io/src/app/pages/homepage/homepage.html

+1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ <h2>Guides</h2>
8585

8686
</main>
8787

88+
<app-support></app-support>
8889
<app-footer></app-footer>

‎material.angular.io/src/app/pages/homepage/homepage.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {MatCardModule} from '@angular/material/card';
1111
import {GuideItems} from '../../shared/guide-items/guide-items';
1212
import {CommonModule} from '@angular/common';
1313
import {CarouselModule} from '../../shared/carousel/carousel-module';
14+
import {Support} from '../../shared/support/support';
1415

1516
const TOP_COMPONENTS = ['datepicker', 'input', 'slide-toggle', 'slider', 'button'];
1617

@@ -39,13 +40,13 @@ const routes: Routes = [{path: '', component: Homepage}];
3940

4041
@NgModule({
4142
imports: [SvgViewerModule,
42-
MatButtonModule,
43-
FooterModule,
44-
RouterModule.forChild(routes),
45-
NavigationFocusModule, MatIconModule, MatDividerModule, MatCardModule, CommonModule,
46-
CarouselModule],
43+
MatButtonModule,
44+
FooterModule,
45+
RouterModule.forChild(routes),
46+
NavigationFocusModule, MatIconModule, MatDividerModule, MatCardModule, CommonModule,
47+
CarouselModule],
4748
exports: [Homepage],
48-
declarations: [Homepage],
49+
declarations: [Homepage, Support],
4950
providers: [GuideItems]
5051
})
5152
export class HomepageModule {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<div class="docs-help-support">
2+
<ul>
3+
<li>
4+
<a href="https://stackoverflow.com/questions/tagged/angular-material">
5+
<img src="../../../assets/img/homepage/stackoverflow-logo.svg" alt="StackOverflow icon" loading="lazy">
6+
StackOverflow
7+
</a>
8+
<div class="docs-help-support-description">Questions tagged with <a
9+
href="https://stackoverflow.com/questions/tagged/angular-material">angular-material</a> or
10+
<a href="https://stackoverflow.com/questions/tagged/angular-cdk">angular-cdk</a></div>
11+
</li>
12+
<li>
13+
<a href="https://discord.gg/angular">
14+
<img src="../../../assets/img/homepage/discord-logo.svg" alt="Discord icon" loading="lazy">
15+
Discord
16+
</a>
17+
<div class="docs-help-support-description">Angular Community on Discord</div>
18+
</li>
19+
<li>
20+
<a href="https://groups.google.com/g/angular-material2">
21+
<img src="../../../assets/img/homepage/google-groups-logo.png" alt="Google Groups icon" loading="lazy">
22+
Google Groups
23+
</a>
24+
<div class="docs-help-support-description">Angular Components discussion forum</div>
25+
</li>
26+
<li>
27+
<a href="https://twitter.com/angular">
28+
<img src="../../../assets/img/homepage/twitter-logo.svg" alt="Twitter icon" loading="lazy">
29+
Twitter
30+
</a>
31+
<div class="docs-help-support-description">Connect with @angular on Twitter</div>
32+
</li>
33+
<li>
34+
<a href="https://blog.angular.io">
35+
<img src="../../../assets/img/homepage/angular-logo.svg" alt="Angular icon" loading="lazy">
36+
Angular Blog
37+
</a>
38+
<div class="docs-help-support-description">News and Tips from the Angular Team</div>
39+
</li>
40+
</ul>
41+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
.docs-help-support {
2+
width: 75%;
3+
margin: auto;
4+
padding-bottom: 40px;
5+
}
6+
7+
.docs-help-support ul {
8+
display: flex;
9+
justify-content: space-around;
10+
list-style: none;
11+
margin: 0;
12+
padding: 18px 0;
13+
}
14+
15+
.docs-help-support ul li {
16+
text-align: center;
17+
flex: 0 1 200px;
18+
-moz-box-flex: 0;
19+
}
20+
21+
.docs-help-support ul li a {
22+
font-weight: 500;
23+
text-decoration: none;
24+
}
25+
26+
.docs-help-support ul li a:hover {
27+
text-decoration: underline;
28+
}
29+
30+
.docs-help-support ul li a img {
31+
display: block;
32+
margin: 10px auto;
33+
width: 50px;
34+
height: 50px;
35+
}
36+
37+
.docs-help-support-description {
38+
font-size: 14px;
39+
margin-top: 5px;
40+
}
41+
42+
@media screen and (max-width: 884px) {
43+
.docs-help-support {
44+
padding-bottom: 20px;
45+
}
46+
.docs-help-support ul {
47+
display: block;
48+
}
49+
50+
.docs-help-support ul li a {
51+
display: flex;
52+
align-items: center;
53+
}
54+
.docs-help-support ul li a img {
55+
margin: 10px;
56+
57+
}
58+
.docs-help-support-description {
59+
display: none;
60+
}
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {ComponentFixture, TestBed} from '@angular/core/testing';
2+
3+
import {Support} from './support';
4+
5+
describe('HelpSupportComponent', () => {
6+
let component: Support;
7+
let fixture: ComponentFixture<Support>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [Support]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(Support);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Component} from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-support',
5+
templateUrl: './support.html',
6+
styleUrls: ['./support.scss']
7+
})
8+
export class Support {
9+
}
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.