Skip to content

Commit 0647243

Browse files
committed
Merge branch 'master' of github.com:ionic-team/ionic-docs
# Conflicts: # src/pages/building/android.md
2 parents 453f033 + 180b0fe commit 0647243

File tree

16 files changed

+73
-28
lines changed

16 files changed

+73
-28
lines changed

scripts/build-pages/page-types/native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function getNativePages(): Promise<Page[]> {
1919
return {
2020
title,
2121
path,
22-
body: description,
22+
body: renderMarkdown(description),
2323
repo,
2424
platforms,
2525
usage: usage ? renderMarkdown(usage) : null,

src/components.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ export namespace Components {
140140

141141
interface ContributorList {
142142
'contributors': string[];
143+
'link': any;
143144
}
144145
interface ContributorListAttributes extends StencilHTMLAttributes {
145146
'contributors'?: string[];
147+
'link'?: any;
146148
}
147149

148150
interface DocsDemo {

src/components/button/button.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ docs-button {
44
color: var(--accent-color);
55
display: inline-block;
66
font-weight: 600;
7+
white-space: nowrap;
78
}
89

910
docs-button a,

src/components/contributor-list/contributor-list.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Component, Prop } from '@stencil/core';
66
})
77
export class ContributorList {
88
@Prop() contributors: string[] = [];
9+
@Prop() link = (contributor: string) => `https://github.com/${contributor}`;
910

1011
render() {
1112
if (this.contributors.length === 0) {
@@ -16,7 +17,7 @@ export class ContributorList {
1617
<ul>
1718
{this.contributors.reverse().map(contributor => (
1819
<li>
19-
<a target="_blank" href={`https://github.com/${contributor}`}>
20+
<a target="_blank" href={this.link(contributor)}>
2021
<img src={`https://github.com/${contributor}.png?size=90`} title={`Contributor ${contributor}`}/>
2122
</a>
2223
</li>

src/components/dropdown/dropdown.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
background: none;
99
border: none;
1010
color: inherit;
11+
font-family: inherit;
1112
font-size: inherit;
1213
font-weight: inherit;
1314
line-height: inherit;

src/components/header/header.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,21 @@ docs-header {
1717
z-index: 2;
1818
}
1919

20-
.Layout:not(.is-collapsed) docs-header.hidden {
21-
transform: translateY(-100%);
20+
@media (min-width: 768px) {
21+
.Layout:not(.is-menu-toggled) docs-header.hidden {
22+
transform: translateY(-100%);
23+
}
24+
}
25+
26+
@media (max-width: 768px) {
27+
.Layout.is-menu-toggled docs-header.hidden {
28+
transform: translateY(-100%);
29+
}
2230
}
2331

2432
docs-header header {
2533
height: var(--header-height);
26-
padding: 0 1.5rem;
34+
padding: 0 1.4rem 0 0.8rem;
2735
}
2836

2937
docs-header header,

src/components/menu/menu.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docs-menu > header {
1919
display: flex;
2020
flex: none;
2121
height: var(--header-height);
22-
padding: 0 1.5rem;
22+
padding: 0 1.4rem 0 0.8rem;
2323
user-select: none;
2424
}
2525

src/components/nav/nav.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,15 @@ docs-nav a {
7474
text-overflow: ellipsis;
7575
white-space: nowrap;
7676
}
77+
78+
@media (max-width: 768px), (pointer: coarse) {
79+
.Nav {
80+
--item-spacing: 12px;
81+
font-size: 15px;
82+
}
83+
84+
.Nav-subnav {
85+
--item-spacing: 6px;
86+
font-size: 14px;
87+
}
88+
}

src/components/page-footer/page-footer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ export class DocsPageFooter {
3131
const editHref = `https://github.com/ionic-team/ionic-docs/edit/master/${path}`;
3232
const updatedHref = `https://github.com/ionic-team/ionic-docs/commits/master/${path}`;
3333
const updatedText = new Date(lastUpdated).toISOString().slice(0, 10);
34+
const contributorHref = (contributor) => `${updatedHref}?author=${contributor}`;
3435

3536
return [
36-
contributors.length ? <contributor-list contributors={contributors}/> : null,
37+
contributors.length ? <contributor-list contributors={contributors} link={contributorHref}/> : null,
3738
<docs-button round href={editHref}>Edit this page <ForwardArrow/></docs-button>,
3839
<a class="last-updated" href={updatedHref}>Updated {updatedText}</a>
3940
];

src/components/page/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class DocsPage {
4848

4949
@Watch('page')
5050
setScrollPosition() {
51-
if (this.isServer) {
51+
if (this.isServer || this.history.location.hash) {
5252
return;
5353
}
5454

0 commit comments

Comments
 (0)