Skip to content

Commit b0361d5

Browse files
authored
Design updates (#247)
Design updates
1 parent 6c6d679 commit b0361d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1615
-1154
lines changed

addon/components/api/x-meta-panel/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
<div class="docs-px-6 docs-pt-3 docs-mt-4 docs-border docs-border-grey-light docs-rounded docs-text-sm">
7+
<div class="docs-px-6 docs-pt-3 docs-mt-4 docs-border docs-border-grey-light docs-rounded docs-text-xs">
88
{{yield (hash
99
header=(component 'api/x-meta-panel/header')
1010
)}}

addon/components/api/x-meta-panel/header/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hbs from 'htmlbars-inline-precompile';
44
export default Component.extend({
55
tagName: '',
66
layout: hbs`
7-
<h4 class="docs-mb-2 docs-text-grey docs-font-bold docs-tracking-wide docs-uppercase docs-text-xs">
7+
<h4 class="docs-mb-2 docs-text-grey docs-font-bold docs-tracking-wide docs-uppercase docs-text-xxs">
88
{{yield}}
99
</h4>
1010
`,

addon/components/api/x-section/component.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ import Component from '@ember/component';
22
import { computed } from '@ember/object';
33
import layout from './template';
44

5+
/**
6+
@class Api/XSection
7+
@hide
8+
*/
59
export default Component.extend({
610
layout,
711
tagName: '',
812

913
/**
1014
* Params shouldn't be displayed when there are no descriptions and no subparams,
1115
* because the information is already displayed in the type signature and redundant
16+
*
17+
* @function
18+
* @hide
1219
*/
1320
shouldDisplayParams: computed('item.params.[]', function() {
1421
let params = this.get('item.params') || [];

addon/components/api/x-section/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class="docs-h3 docs-font-mono docs-font-normal"
77
>
88
{{#if (eq item.exportType 'default')}}
9-
<span class="docs-border docs-border-grey-light docs-align-text-top docs-leading-loose docs-text-xs docs-pl-2 docs-mr-2 docs-py-1 docs-rounded">
9+
<span class="docs-border docs-border-grey-light docs-align-text-top docs-leading-loose docs-text-xxs docs-pl-2 docs-mr-2 docs-py-1 docs-rounded">
1010
Default
1111
</span>
1212
{{/if}}

addon/components/docs-demo/template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{#each snippets as |snippet|}}
1111
<button {{action 'selectSnippet' snippet}}
1212
class='
13-
docs-mr-4 docs-text-sm docs-no-underline outline-none
13+
docs-mr-4 docs-text-xs docs-no-underline outline-none
1414
hover:docs-text-grey-darkest
1515
{{if snippet.isActive 'docs-text-grey-darkest' 'docs-text-grey-dark'}}
1616
'

addon/components/docs-header/component.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import layout from './template';
33
import config from 'dummy/config/environment';
44
import { computed } from '@ember/object';
55
import { classify } from '@ember/string';
6-
import { addonLogo } from 'ember-cli-addon-docs/utils/computed';
6+
import { addonLogo, addonPrefix } from 'ember-cli-addon-docs/utils/computed';
77
import { inject as service } from '@ember/service';
88
import { reads } from '@ember/object/computed';
99

@@ -40,11 +40,38 @@ export default Component.extend({
4040

4141
didInsertElement() {
4242
this._super(...arguments);
43+
4344
this.get('projectVersion').loadAvailableVersions();
4445
},
4546

46-
logo: addonLogo(projectName),
47+
logo: classify(addonLogo(projectName)),
48+
49+
/**
50+
The prefix of your project, typically "Ember", "EmberCLI" or "EmberData".
51+
52+
By default the prefix will be autodiscovered from the `name` field of your addon's package.json.
53+
54+
```hbs
55+
{{docs-header prefix='EmberData'}}
56+
```
57+
58+
@argument prefix
59+
@type String?
60+
*/
61+
prefix: addonPrefix(projectName),
62+
63+
/**
64+
The name of your project (without the "ember", "ember-cli" or "ember-data" prefix).
65+
66+
By default the name will be autodiscovered from the `name` field of your addon's package.json.
67+
68+
```hbs
69+
{{docs-header name='MyProject'}}
70+
```
4771
72+
@argument name
73+
@type String?
74+
*/
4875
name: computed(function() {
4976
let name = projectName;
5077
name = name.replace('ember-data-', '');

addon/components/docs-header/link/template.hbs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<a href={{href}}
44
class='
5-
docs-px-4 docs-py-3 docs-transition docs-uppercase docs-text-xs docs-font-semibold
6-
docs-text-grey-darkest docs-no-underline docs-opacity-50 hover:docs-opacity-100
5+
docs-px-4 docs-py-5 docs-transition docs-uppercase docs-text-xxs docs-font-bold
6+
docs-text-grey-darkest docs-no-underline hover:docs-text-brand
77
{{if push 'docs-ml-auto'}}
88
'
99
data-test-id={{data-test-id}}>
@@ -15,9 +15,9 @@
1515
<a {{action on-click}}
1616
href='#'
1717
class='
18-
docs-px-4 docs-py-3 docs-transition docs-uppercase docs-text-xs docs-font-semibold
19-
docs-text-grey-darkest docs-no-underline docs-opacity-50 hover:docs-opacity-100
20-
{{if push 'ml-auto'}}
18+
docs-px-4 docs-py-5 docs-transition docs-uppercase docs-text-xxs docs-font-bold
19+
docs-text-grey-darkest docs-no-underline hover:docs-text-brand
20+
{{if push 'docs-ml-auto'}}
2121
'
2222
data-test-id={{data-test-id}}>
2323
{{yield}}
@@ -27,9 +27,10 @@
2727

2828
{{#link-to route
2929
class=(concat
30-
'docs-px-4 docs-py-3 docs-transition docs-uppercase docs-text-xs docs-font-semibold
31-
docs-text-grey-darkest docs-no-underline '
32-
(if (and (not isActive) (not (eq route 'index'))) 'docs-opacity-50 hover:docs-opacity-100')
30+
'docs-px-4 docs-py-5 docs-transition docs-uppercase docs-text-xxs
31+
docs-font-bold docs-no-underline docs-text-grey-darkest '
32+
(if (and (not isActive) (not (eq route 'index'))) 'hover:docs-text-brand')
33+
(if (and isActive (not (eq route 'index'))) 'docs-text-brand')
3334
)
3435
data-test-id=data-test-id
3536
}}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
input[data-search-box-input]::placeholder {
2+
@extend .docs-text-black;
3+
@extend .docs-font-bold;
4+
@extend .docs-opacity-100;
5+
6+
&:focus {
7+
@extend .docs-text-grey;
8+
}
9+
}

addon/components/docs-header/search-box/template.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
value={{query}}
1212
type="text"
1313
disabled={{fetchProject.isRunning}}
14-
placeholder='Search'
15-
class='docs-w-24 docs-text-xs docs-p-2 docs-pl-6 docs-rounded focus:docs-bg-grey-lighter outline-none'
14+
placeholder='SEARCH'
15+
class='docs-w-24 docs-text-xxs docs-p-2 docs-pl-6 docs-rounded focus:docs-bg-grey-lighter outline-none'
1616
data-search-box-input
1717
data-test-search-box-input>
1818
</div>

addon/components/docs-header/template.hbs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
<header class='docs-border-b docs-shadow-sm'>
2-
<div class='docs-flex docs-items-center docs-max-w-3xl docs-mx-auto'>
1+
<header class='docs-shadow docs-relative docs-z-40 docs-bg-white'>
2+
<div class='docs-flex docs-items-center docs-max-w-site-container docs-mx-auto md:docs-px-2'>
3+
34
{{#docs-header/link 'index'}}
4-
<div class="docs-text-center docs-text-xs">
5-
{{#if logo}}
6-
<div class='docs-h-4 docs-pb-1'>
7-
{{docs-logo logo=logo}}
5+
<span class='docs-leading-none docs-font-title docs-text-large-2 docs-font-normal docs-normal-case docs-block docs-mr-6'>
6+
{{#if prefix}}
7+
<div class='docs-text-xxs'>
8+
{{prefix}}
89
</div>
910
{{/if}}
10-
<span class='docs-font-medium docs-normal-case docs-block docs--mt-2px'>{{name}}</span>
11-
</div>
11+
{{name}}
12+
</span>
1213
{{/docs-header/link}}
1314

1415
<div class='docs-flex-1 docs-flex docs-items-center docs-overflow-auto docs-overflow-momentum docs-mask-image md:docs-no-mask-image'>
@@ -48,7 +49,7 @@
4849
{{/if}}
4950

5051
{{!-- Something to take up space on mobile, so the scrolling nav isn't hugging the edge --}}
51-
<div class='docs-h-px docs-px-3 md:docs-hidden'></div>
52+
<div class='docs-h-px docs-px-3 sm:docs-hidden'></div>
5253
</div>
5354
</div>
5455
</header>

0 commit comments

Comments
 (0)