Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit ec406d3

Browse files
authored
Add guides (getting-started, theming) (#51)
* Add guides * Update homepage get-started link * Update second get-started link on homepage * fix test
1 parent 213b02b commit ec406d3

25 files changed

+384
-423
lines changed

src/_app-theme.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@import './app/pages/component-list/component-list-theme';
66
@import './app/pages/component-category-list/component-category-list-theme';
77

8+
@import './styles/typography-theme';
89
@import './app/shared/navbar/navbar-theme';
910
@import './app/shared/example-viewer/example-viewer-theme';
1011

@@ -20,6 +21,15 @@
2021
background: md-color($background, background);
2122
}
2223

24+
.docs-primary-header {
25+
background: md-color($primary);
26+
27+
h1 {
28+
color: md-color($primary, default-contrast);
29+
}
30+
}
31+
32+
@include docs-site-typography-theme($theme);
2333
@include nav-bar-theme($theme);
2434
@include component-viewer-sidenav-theme($theme);
2535
@include home-page-theme($theme);

src/app/pages/component-list/_component-list-theme.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
$background: map-get($theme, background);
66
$foreground: map-get($theme, foreground);
77

8-
.docs-component-list-header {
9-
background: md-color($primary);
10-
11-
h1 {
12-
color: md-color($primary, default-contrast);
13-
}
14-
}
15-
168
.docs-component-list-item {
179
color: md-color($foreground, secondary-text);
1810
}

src/app/pages/component-list/component-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="docs-component-list-header">
1+
<div class="docs-primary-header">
22
<h1> {{category.name}} </h1>
33
</div>
44

src/app/pages/component-list/component-list.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,3 @@
2121
background-repeat: no-repeat;
2222
background-position: center;
2323
}
24-
25-
.docs-component-list-header {
26-
padding-left: 20px;
27-
28-
h1 {
29-
font-size: 30px;
30-
font-weight: 300;
31-
margin: 0;
32-
padding: 50px;
33-
}
34-
}

src/app/pages/component-viewer/_component-viewer-theme.scss

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import '~@angular/material/core/theming/theming';
2+
13
@mixin component-viewer-theme($theme) {
24
$primary: map-get($theme, primary);
35
$accent: map-get($theme, accent);
@@ -8,47 +10,6 @@
810
app-component-viewer {
911
color: md-color($foreground, secondary-text);
1012

11-
.docs-component-viewer-tabbed-content {
12-
h1 {
13-
color: md-color($primary, 800);
14-
background: rgba(md-color($foreground, secondary-text), .03);
15-
}
16-
17-
h3, h2, h4, h5, p, ol, li{
18-
color: md-color($foreground, secondary-text);
19-
}
20-
21-
a {
22-
color: md-color($primary);
23-
}
24-
25-
table {
26-
box-shadow: 0 2px 2px rgba(0,0,0,0.24), 0 0 2px rgba(0,0,0,0.12);
27-
}
28-
29-
table tbody th{
30-
border: 1px solid rgba(md-color($foreground, secondary-text), .03);
31-
}
32-
33-
td {
34-
color: md-color($foreground, secondary-text);
35-
border: 1px solid rgba(md-color($foreground, secondary-text), .03);
36-
}
37-
38-
th {
39-
color: md-color($foreground, secondary-text);
40-
background: rgba(md-color($foreground, secondary-text), .03);
41-
}
42-
}
43-
44-
.docs-component-viewer-header {
45-
background: md-color($primary);
46-
47-
h1 {
48-
color: md-color($primary, default-contrast);
49-
}
50-
}
51-
5213
.md-tab-label:focus {
5314
color: md-color($foreground, secondary-text);
5415
}

src/app/pages/component-viewer/component-viewer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="docs-component-viewer-header">
1+
<div class="docs-primary-header">
22
<h1> Component - {{componentDocItem.name}} </h1>
33
</div>
44

src/app/pages/component-viewer/component-viewer.scss

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@ app-component-viewer {
22
font-weight: 400;
33
}
44

5-
.docs-component-viewer-header {
6-
padding-left: 20px;
7-
8-
h1 {
9-
font-size: 30px;
10-
font-weight: 300;
11-
margin: 0;
12-
padding: 50px;
13-
}
14-
}
15-
165
.docs-component-viewer-tabbed-content {
176
margin: 50px 70px;
187

@@ -21,74 +10,6 @@ app-component-viewer {
2110
}
2211
}
2312

24-
.docs-component-viewer-tabbed-content .docs-component-view-text-content {
25-
26-
h1 {
27-
display:inline-block;
28-
font-size: 20px;
29-
font-weight: 400;
30-
padding: 5px;
31-
}
32-
33-
h3, h2 {
34-
font-size: 20px;
35-
font-weight: 400;
36-
margin-bottom: 30px;
37-
margin-top: 80px;
38-
}
39-
40-
h4 {
41-
margin-top: 40px;
42-
}
43-
44-
h5 {
45-
font-size: 16px;
46-
}
47-
48-
.md-tab-body-wrapper h2 {
49-
margin-top: 0px;
50-
}
51-
52-
p {
53-
font-size: 16px;
54-
line-height: 28px;
55-
}
56-
57-
a {
58-
text-decoration: none;
59-
}
60-
61-
table {
62-
border-collapse: collapse;
63-
border-radius: 2px;
64-
border-spacing: 0;
65-
margin: 0 0 32px 0;
66-
width: 100%;
67-
}
68-
69-
table tbody th {
70-
max-width: 100px;
71-
padding: 13px 32px;
72-
text-align: left;
73-
}
74-
75-
td {
76-
font-weight: 400;
77-
padding: 8px 30px;
78-
79-
p {
80-
margin: 0;
81-
}
82-
}
83-
84-
th {
85-
font-size: 16px;
86-
font-weight: 400;
87-
padding: 13px 32px;
88-
text-align: left;
89-
}
90-
}
91-
9213
.md-tab-header {
9314
border: none;
9415
margin-bottom: 30px;

src/app/pages/guide-list/guide-list.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<div class="docs-primary-header">
2+
<h1>Guides</h1>
3+
</div>
14
<md-list class="docs-guide-list-item">
25
<a md-list-item
36
*ngFor="let guide of guideItems.getAllItems()"
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
<doc-viewer [documentUrl]="documentUrl"></doc-viewer>
1+
<div class="docs-primary-header">
2+
<h1>{{guide.name}}</h1>
3+
</div>
4+
5+
<doc-viewer class="docs-guide-content" [documentUrl]="guide.document"></doc-viewer>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.docs-guide-content {
2+
display: block;
3+
margin: 20px 0 0 70px;
4+
}

0 commit comments

Comments
 (0)