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

Commit 956995b

Browse files
committed
avoid using a table for the guide list
1 parent 34002c3 commit 956995b

File tree

4 files changed

+15
-70
lines changed

4 files changed

+15
-70
lines changed
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '~@angular/material/core/theming/theming';
1+
@import '~@angular/material/theming';
22

33
@mixin guide-list-theme($theme) {
44
$primary: map-get($theme, primary);
@@ -7,21 +7,7 @@
77
$background: map-get($theme, background);
88
$foreground: map-get($theme, foreground);
99

10-
app-guides {
11-
12-
.docs-guide-list-item {
13-
table {
14-
box-shadow: 0 2px 2px rgba(0,0,0,0.24), 0 0 2px rgba(0,0,0,0.12);
15-
}
16-
17-
th {
18-
color: md-color($foreground, secondary-text);
19-
background: rgba(md-color($foreground, secondary-text), .03);
20-
}
21-
22-
td a {
23-
color: md-color($primary);
24-
}
25-
}
10+
.docs-guide-list .docs-guide-item {
11+
color: mat-color($primary);
2612
}
2713
}

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

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,12 @@
22
<h1>Guides</h1>
33
</div>
44

5-
<md-list class="docs-guide-list-item">
6-
<table>
7-
<tbody>
8-
<tr>
9-
<th>Core Guides</th>
10-
</tr>
11-
12-
<tr>
13-
<td>
14-
<a md-list-item
15-
*ngFor="let guide of guideItems.getAllItems()"
16-
[routerLink]="['/guide/', guide.id]">
17-
{{guide.name}}
18-
</a>
19-
</td>
20-
</tr>
21-
</tbody>
22-
</table>
23-
24-
25-
</md-list>
5+
<md-nav-list class="docs-guide-list">
6+
<a md-list-item *ngFor="let guide of guideItems.getAllItems()"
7+
class="docs-guide-item"
8+
[routerLink]="['/guide/', guide.id]">
9+
{{guide.name}}
10+
</a>
11+
</md-nav-list>
2612

2713
<app-footer></app-footer>

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

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,11 @@
44
flex-grow: 1;
55
}
66

7-
.docs-guide-list-item {
7+
.docs-guide-list {
88
margin: 50px;
99
flex-grow: 1;
10+
}
1011

11-
table {
12-
border-collapse: collapse;
13-
border-radius: 2px;
14-
border-spacing: 0;
15-
margin: 0 0 32px 0;
16-
width: 100%;
17-
}
18-
19-
table tbody th {
20-
font-weight: 400;
21-
padding: 13px 32px;
22-
text-align: left;
23-
}
24-
25-
td {
26-
padding: 8px 20px;
27-
28-
a {
29-
text-decoration: none;
30-
31-
&:hover {
32-
text-decoration: underline;
33-
}
34-
}
35-
}
12+
.docs-guide-item, .docs-guide-item:hover {
13+
text-decoration: none;
3614
}

src/styles/_typography-theme.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99

1010
.docs-component-viewer-tabbed-content,
1111
.docs-guide-content {
12-
h1 {
13-
color: mat-color($primary, 800);
14-
background: rgba(mat-color($foreground, text), .03);
15-
}
16-
17-
h3, h2, h4, h5, p, ol, li{
12+
h1, h3, h2, h4, h5, p, ol, li{
1813
color: mat-color($foreground, text);
1914
}
2015

0 commit comments

Comments
 (0)