This repository was archived by the owner on Dec 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 394
fix: Make site more mobile friendly #265
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 [class.mat-elevation-z6]="showShadow"></app-navbar> | ||
<app-navbar class="mat-elevation-z6"></app-navbar> | ||
<router-outlet></router-outlet> |
This file contains hidden or 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 hidden or 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 hidden or 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,8 @@ | ||
@import '../../../styles/constants'; | ||
|
||
component-overview { | ||
@media (max-width: $small-breakpoint-width) { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,19 +1,30 @@ | ||
<!-- TODO: figure out if the <nav> should go inside of a <header> element. --> | ||
<nav class="docs-navbar"> | ||
<nav class="docs-navbar-header"> | ||
<a md-button class="docs-button" routerLink="/" aria-label="Angular Material"> | ||
<img class="docs-angular-logo" | ||
src="../../../assets/img/homepage/angular-white-transparent.svg" | ||
alt="angular"> | ||
src="../../../assets/img/homepage/angular-white-transparent.svg" | ||
alt="angular"> | ||
<span>Material</span> | ||
</a> | ||
<a md-button class="docs-button" routerLink="components">Components</a> | ||
<a md-button class="docs-button" routerLink="guides">Guides</a> | ||
<a md-button class="docs-navbar-hide-small docs-button" routerLink="components">Components</a> | ||
<a md-button class="docs-navbar-hide-small docs-button" routerLink="guides">Guides</a> | ||
<div class="flex-spacer"></div> | ||
<theme-picker></theme-picker> | ||
<a md-button class="docs-button" href="https://github.com/angular/material2" aria-label="GitHub Repository"> | ||
<img class="docs-github-logo" | ||
src="../../../assets/img/homepage/github-circle-white-transparent.svg" | ||
alt="GitHub"> | ||
<a md-button class="docs-button docs-navbar-hide-small" href="https://github.com/angular/material2" | ||
aria-label="GitHub Repository"> | ||
<img class="docs-angular-logo" | ||
src="../../../assets/img/homepage/github-circle-white-transparent.svg" | ||
alt="angular"> | ||
GitHub | ||
</a> | ||
<a md-icon-button class="docs-button docs-navbar-show-small" | ||
href="https://github.com/angular/material2" aria-label="GitHub Repository"> | ||
<img class="docs-angular-logo" | ||
src="../../../assets/img/homepage/github-circle-white-transparent.svg" | ||
alt="angular"> | ||
</a> | ||
</nav> | ||
<nav class="docs-navbar docs-navbar-show-small"> | ||
<a md-button class="docs-navbar-link" routerLink="components">Components</a> | ||
<a md-button class="docs-navbar-link" routerLink="guides">Guides</a> | ||
</nav> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -25,6 +25,11 @@ | |
display: none !important; | ||
} | ||
|
||
// Prevent p tags from not breaking, causing x axis overflows. | ||
.docs-api > p { | ||
word-break: break-word; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why direct child? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did direct child because it is the case we are seeing in the issue with. My concern with doing all indirect matching was messing up how the code formatted boxes handled word and line breaks. |
||
|
||
.docs-api-class-name, | ||
.docs-api-module-import, | ||
.docs-api-class-selector-name, | ||
|
This file contains hidden or 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,7 +1,7 @@ | ||
@import '../../node_modules/@angular/material/theming'; | ||
|
||
$small-breakpoint-width: 840px; | ||
$small-breakpoint-width: 720px; | ||
|
||
/* For desktop, the content should be aligned with the page title. */ | ||
$content-padding-side: 70px; | ||
$content-padding-side-xs: 15px; | ||
$content-padding-side-xs: 15px; |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way to only make the elevation show once the page has been scrolled and stickiness has taken effect? If not, I think
showShadow
can be refactored out of the component class.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe its worth the effort to make the elevation only when scrolled, especially since we are faking the stickiness of the header. I have removed
showShadow
as you mentioned.