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

style(viewers): set max width and center content #207

Merged
merged 1 commit into from
Jul 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/app/pages/component-viewer/component-viewer.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!-- TODO(jelbourn): turn this into nav tabs -->
<nav md-tab-nav-bar class="docs-component-viewer-tabbed-content">
<a md-tab-link class="docs-component-viewer-section-tab"
*ngFor="let section of ['Overview', 'API', 'Examples']"
[routerLink]="section.toLowerCase()"
routerLinkActive #rla="routerLinkActive"
[active]="rla.isActive">{{section}}</a>
</nav>
<div class="docs-component-viewer">
<nav md-tab-nav-bar class="docs-component-viewer-tabbed-content">
<a md-tab-link class="docs-component-viewer-section-tab"
*ngFor="let section of ['Overview', 'API', 'Examples']"
[routerLink]="section.toLowerCase()"
routerLinkActive #rla="routerLinkActive"
[active]="rla.isActive">{{section}}</a>
</nav>

<div class="docs-component-viewer-content">
<router-outlet></router-outlet>
<div class="docs-component-viewer-content">
<router-outlet></router-outlet>
</div>
</div>
12 changes: 11 additions & 1 deletion src/app/pages/component-viewer/component-viewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

app-component-viewer {
font-weight: 400;
margin: 20px 70px 50px 70px;
padding: 20px $content-padding-side 50px;

@media ($mat-xsmall) {
padding-left: $content-padding-side-xs;
padding-right: $content-padding-side-xs;
}
}

.docs-component-viewer {
margin: 0 auto;
max-width: 940px;
}

.docs-component-viewer-section-tab {
Expand Down
4 changes: 3 additions & 1 deletion src/app/pages/guide-viewer/guide-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<h1>{{guide.name}}</h1>
</div>

<doc-viewer class="docs-guide-content" [documentUrl]="guide.document"></doc-viewer>
<div class="docs-guide-wrapper">
<doc-viewer class="docs-guide-content" [documentUrl]="guide.document"></doc-viewer>
</div>

<app-footer></app-footer>
22 changes: 11 additions & 11 deletions src/app/pages/guide-viewer/guide-viewer.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
@import "../../../../node_modules/@angular/material/theming";

/* For desktop, the content should be aligned with the page title. */
$guide-content-margin-side: 70px;
$guide-content-margin-side-xs: 15px;
@import '../../../styles/constants';

:host {
display: flex;
flex-direction: column;
flex-grow: 1;
}

.docs-guide-content {
display: block;
margin: 20px $guide-content-margin-side 0;
flex-grow: 1;
.docs-guide-wrapper {
padding: 20px $content-padding-side 0;

@media ($mat-xsmall) {
margin-left: $guide-content-margin-side-xs;
margin-right: $guide-content-margin-side-xs;
padding-left: $content-padding-side-xs;
padding-right: $content-padding-side-xs;
}
}

.docs-guide-content {
display: block;
margin: 0 auto;
max-width: 940px;
}
6 changes: 6 additions & 0 deletions src/styles/_constants.scss
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
@import '../../node_modules/@angular/material/theming';

$small-breakpoint-width: 840px;

/* For desktop, the content should be aligned with the page title. */
$content-padding-side: 70px;
$content-padding-side-xs: 15px;