forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Styles for the category list and component list (angular#48)
* make sidenav shell look like mocks * toolbar shadow * fix lint * category list styles * component list styles
- Loading branch information
Showing
13 changed files
with
161 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<app-navbar></app-navbar> | ||
<app-navbar [class.md-elevation-z6]="showShadow"></app-navbar> | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
material-docs-app { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
material-docs-app > app-component-sidenav { | ||
flex: 1 1 auto; | ||
} | ||
|
||
app-navbar { | ||
position: relative; | ||
z-index: 10; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/app/pages/component-category-list/_component-category-list-theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@mixin component-category-list-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
|
||
.docs-component-category-list-header { | ||
background: md-color($primary); | ||
|
||
h1 { | ||
color: md-color($primary, default-contrast); | ||
} | ||
} | ||
|
||
.docs-component-category-list-card-summary { | ||
color: md-color($foreground, secondary-text); | ||
} | ||
} |
24 changes: 16 additions & 8 deletions
24
src/app/pages/component-category-list/component-category-list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
<md-card | ||
*ngFor="let category of docItems.getItemsInCategories()" | ||
class="docs-component-category-list-category" | ||
[routerLink]="['/components/category/', category.id]"> | ||
<md-card-title>{{category.name}}</md-card-title> | ||
<p>{{category.summary}}</p> | ||
<img md-card-image src="../../../assets/img/component-categories/{{category.id}}.svg"> | ||
</md-card> | ||
<div class="docs-component-category-list-header"> | ||
<h1>Component Library</h1> | ||
</div> | ||
|
||
<div class="docs-component-category-list"> | ||
<md-card | ||
*ngFor="let category of docItems.getItemsInCategories()" | ||
class="docs-component-category-list-card" | ||
[routerLink]="['/components/category/', category.id]"> | ||
<md-card-title>{{category.name}}</md-card-title> | ||
<p class="docs-component-category-list-card-summary">{{category.summary}}</p> | ||
<div class="docs-component-category-list-card-image" | ||
[style.backgroundImage]="'url(\'../../../assets/img/component-categories/' + category.id +'.svg\')'"> | ||
</div> | ||
</md-card> | ||
</div> |
34 changes: 32 additions & 2 deletions
34
src/app/pages/component-category-list/component-category-list.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
.docs-component-category-list-category { | ||
.docs-component-category-list { | ||
padding: 20px; | ||
} | ||
|
||
.docs-component-category-list-card { | ||
display: inline-block; | ||
width: 300px; | ||
width: 260px; | ||
margin: 20px; | ||
vertical-align: top; | ||
cursor: pointer; | ||
} | ||
|
||
.docs-component-category-list-card-image { | ||
width: 100%; | ||
height: 160px; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
|
||
.docs-component-category-list-card-summary { | ||
height: 2.4em; | ||
} | ||
|
||
.docs-component-category-list-header { | ||
padding-left: 20px; | ||
|
||
h1 { | ||
font-size: 30px; | ||
font-weight: 300; | ||
margin: 0; | ||
padding: 50px; | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
src/app/pages/component-category-list/component-category-list.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@mixin component-list-theme($theme) { | ||
$primary: map-get($theme, primary); | ||
$accent: map-get($theme, accent); | ||
$warn: map-get($theme, warn); | ||
$background: map-get($theme, background); | ||
$foreground: map-get($theme, foreground); | ||
|
||
.docs-component-list-header { | ||
background: md-color($primary); | ||
|
||
h1 { | ||
color: md-color($primary, default-contrast); | ||
} | ||
} | ||
|
||
.docs-component-list-item { | ||
color: md-color($foreground, secondary-text); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<div class="docs-component-list-header"> | ||
<h1> {{category.name}} </h1> | ||
</div> | ||
|
||
<div class="docs-component-list-category"> | ||
<h2>{{category.name}}</h2> | ||
<a *ngFor="let component of category.items" | ||
class="docs-component-list-item" | ||
[routerLink]="['/components/component/', component.id]"> | ||
<img src="../../../assets/img/components/{{component.id}}.svg" | ||
class="docs-component-list-item-icon" | ||
[alt]="component.name"> | ||
<div class="docs-component-list-item-icon" | ||
[attr.aria-label]="component.name" | ||
[style.backgroundImage]="'url(\'../../../assets/img/components/' + component.id + '.svg\')'"> | ||
</div> | ||
{{component.name}} | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters